* [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/, profiles/
@ 2020-12-20 13:29 Marek Szuba
0 siblings, 0 replies; only message in thread
From: Marek Szuba @ 2020-12-20 13:29 UTC (permalink / raw
To: gentoo-commits
commit: 778bcc52e751edb3d000ff58fe08c73eaa2a854e
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 13:05:42 2020 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 13:28:47 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=778bcc52
sci-libs/libsc: migrate to lua-single.eclass
Both the latest release and the live ebuild. Compatibility as per upstream
build scripts.
Uses a weird home-grown way of detecting Lua which makes implicit assumptions
about paths used by Lua headers, I think I've managed to figure it out though.
Status:
- 2.2-r100 builds and installs fine but has one test (dmatrix) failing with
a non-zero exit code, which test however has got nothing to do with Lua;
- 9999 fails to build on an unrelated matter (upstream version-processing
macros do not like "9999" appearing as version number).
Closes: https://bugs.gentoo.org/752840
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
profiles/package.mask | 1 +
.../files/libsc-2.2-autoconf_lua_version.patch | 51 +++++++++++++++++++
.../libsc-9999_20201220-autoconf_lua_version.patch | 57 ++++++++++++++++++++++
.../{libsc-9999.ebuild => libsc-2.2-r100.ebuild} | 24 ++++++---
sci-libs/libsc/libsc-9999.ebuild | 24 ++++++---
5 files changed, 141 insertions(+), 16 deletions(-)
diff --git a/profiles/package.mask b/profiles/package.mask
index 806827bc3a1..c7ee6fe1f40 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -529,6 +529,7 @@ kde-apps/kdebase-meta:5
>=net-im/swift-4.0.2-r100
>=net-p2p/eiskaltdcpp-2.2.10-r100
>=sci-astronomy/celestia-1.7.0_pre20200316-r100
+>=sci-libs/libsc-2.2-r100
>=sci-libs/plplot-5.15.0-r100
=sci-visualization/gnuplot-5.4.0-r100
=sci-visualization/gnuplot-5.4.1-r1
diff --git a/sci-libs/libsc/files/libsc-2.2-autoconf_lua_version.patch b/sci-libs/libsc/files/libsc-2.2-autoconf_lua_version.patch
new file mode 100644
index 00000000000..c2cbdb1b003
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.2-autoconf_lua_version.patch
@@ -0,0 +1,51 @@
+--- a/config/sc_include.m4
++++ b/config/sc_include.m4
+@@ -281,7 +281,7 @@ AC_DEFUN([SC_CHECK_LIBRARIES],
+ [
+ SC_REQUIRE_LIB([m], [fabs])
+ SC_CHECK_LIB([z], [adler32_combine], [ZLIB], [$1])
+-SC_CHECK_LIB([lua52 lua5.2 lua51 lua5.1 lua lua5], [lua_createtable],
++SC_CHECK_LIB([$LUA_IMPL], [lua_createtable],
+ [LUA], [$1])
+ SC_CHECK_BLAS_LAPACK([$1])
+ SC_BUILTIN_ALL_PREFIX([$1])
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,7 +74,7 @@ echo "| Checking headers"
+ echo "o---------------------------------------"
+
+ AC_CHECK_HEADERS([execinfo.h signal.h sys/time.h sys/types.h time.h])
+-AC_CHECK_HEADERS([lua.h lua5.1/lua.h lua5.2/lua.h lua5.3/lua.h])
++AC_CHECK_HEADERS([$LUA_IMPL/lua.h])
+
+ echo "o---------------------------------------"
+ echo "| Checking functions"
+--- a/src/sc_lua.h
++++ b/src/sc_lua.h
+@@ -30,23 +30,9 @@
+
+ SC_EXTERN_C_BEGIN;
+
+-#ifdef SC_HAVE_LUA5_2_LUA_H
+-#include <lua5.2/lua.h>
+-#include <lua5.2/lualib.h>
+-#include <lua5.2/lauxlib.h>
+-#else
+-#ifdef SC_HAVE_LUA5_1_LUA_H
+-#include <lua5.1/lua.h>
+-#include <lua5.1/lualib.h>
+-#include <lua5.1/lauxlib.h>
+-#else
+-#ifdef SC_HAVE_LUA_H
+-#include <lua.h>
+-#include <lualib.h>
+-#include <lauxlib.h>
+-#endif
+-#endif
+-#endif
++#include <@LUA_IMPL@/lua.h>
++#include <@LUA_IMPL@/lualib.h>
++#include <@LUA_IMPL@/lauxlib.h>
+
+ SC_EXTERN_C_END;
+
diff --git a/sci-libs/libsc/files/libsc-9999_20201220-autoconf_lua_version.patch b/sci-libs/libsc/files/libsc-9999_20201220-autoconf_lua_version.patch
new file mode 100644
index 00000000000..c138bb3fc4b
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-9999_20201220-autoconf_lua_version.patch
@@ -0,0 +1,57 @@
+--- a/config/sc_include.m4
++++ b/config/sc_include.m4
+@@ -281,7 +281,7 @@ AC_DEFUN([SC_CHECK_LIBRARIES],
+ [
+ SC_REQUIRE_LIB([m], [fabs])
+ SC_CHECK_LIB([z], [adler32_combine], [ZLIB], [$1])
+-SC_CHECK_LIB([lua53 lua5.3 lua52 lua5.2 lua51 lua5.1 lua lua5], [lua_createtable],
++SC_CHECK_LIB([$LUA_IMPL], [lua_createtable],
+ [LUA], [$1])
+ SC_CHECK_BLAS_LAPACK([$1])
+ SC_BUILTIN_ALL_PREFIX([$1])
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,7 +74,7 @@ echo "| Checking headers"
+ echo "o---------------------------------------"
+
+ AC_CHECK_HEADERS([execinfo.h signal.h sys/time.h sys/types.h time.h])
+-AC_CHECK_HEADERS([lua.h lua5.1/lua.h lua5.2/lua.h lua5.3/lua.h])
++AC_CHECK_HEADERS([$LUA_IMPL/lua.h])
+
+ echo "o---------------------------------------"
+ echo "| Checking functions"
+--- a/src/sc_lua.h
++++ b/src/sc_lua.h
+@@ -30,29 +30,9 @@
+
+ SC_EXTERN_C_BEGIN;
+
+-#ifdef SC_HAVE_LUA5_3_LUA_H
+-#include <lua5.3/lua.h>
+-#include <lua5.3/lualib.h>
+-#include <lua5.3/lauxlib.h>
+-#else
+-#ifdef SC_HAVE_LUA5_2_LUA_H
+-#include <lua5.2/lua.h>
+-#include <lua5.2/lualib.h>
+-#include <lua5.2/lauxlib.h>
+-#else
+-#ifdef SC_HAVE_LUA5_1_LUA_H
+-#include <lua5.1/lua.h>
+-#include <lua5.1/lualib.h>
+-#include <lua5.1/lauxlib.h>
+-#else
+-#ifdef SC_HAVE_LUA_H
+-#include <lua.h>
+-#include <lualib.h>
+-#include <lauxlib.h>
+-#endif
+-#endif
+-#endif
+-#endif
++#include <@LUA_IMPL@/lua.h>
++#include <@LUA_IMPL@/lualib.h>
++#include <@LUA_IMPL@/lauxlib.h>
+
+ SC_EXTERN_C_END;
+
diff --git a/sci-libs/libsc/libsc-9999.ebuild b/sci-libs/libsc/libsc-2.2-r100.ebuild
similarity index 82%
copy from sci-libs/libsc/libsc-9999.ebuild
copy to sci-libs/libsc/libsc-2.2-r100.ebuild
index 229d1ccd05f..0f53a1eb30b 100644
--- a/sci-libs/libsc/libsc-9999.ebuild
+++ b/sci-libs/libsc/libsc-2.2-r100.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit autotools toolchain-funcs eutils
+LUA_COMPAT=( lua5-{1..2} )
+
+inherit autotools lua-single toolchain-funcs eutils
DESCRIPTION="Support for parallel scientific applications"
HOMEPAGE="http://www.p4est.org/"
@@ -23,10 +25,10 @@ LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="debug examples mpi openmp romio static-libs threads"
-REQUIRED_USE="romio? ( mpi )"
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ romio? ( mpi )"
-RDEPEND="
- dev-lang/lua:*
+RDEPEND="${LUA_DEPS}
sys-apps/util-linux
virtual/blas
virtual/lapack
@@ -36,6 +38,10 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2-autoconf_lua_version.patch
+)
+
DOCS=( AUTHORS NEWS README )
AUTOTOOLS_AUTORECONF=true
@@ -50,8 +56,10 @@ pkg_pretend() {
src_prepare() {
default
+ sed -i -e "s/@LUA_IMPL@/${ELUA}/" "${S}"/src/sc_lua.h || die
+
# Inject a version number into the build system
- echo "${PV}" > ${S}/.tarball-version
+ echo "${PV}" > ${S}/.tarball-version || die
eautoreconf
}
@@ -66,7 +74,7 @@ src_configure() {
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
)
- econf "${myeconfargs[@]}"
+ econf LUA_IMPL="${ELUA}" "${myeconfargs[@]}"
}
src_install() {
diff --git a/sci-libs/libsc/libsc-9999.ebuild b/sci-libs/libsc/libsc-9999.ebuild
index 229d1ccd05f..4c588fc838b 100644
--- a/sci-libs/libsc/libsc-9999.ebuild
+++ b/sci-libs/libsc/libsc-9999.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit autotools toolchain-funcs eutils
+LUA_COMPAT=( lua5-{1..3} )
+
+inherit autotools lua-single toolchain-funcs eutils
DESCRIPTION="Support for parallel scientific applications"
HOMEPAGE="http://www.p4est.org/"
@@ -23,10 +25,10 @@ LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="debug examples mpi openmp romio static-libs threads"
-REQUIRED_USE="romio? ( mpi )"
+REQUIRED_USE="${LUA_REQUIRED_USE}
+ romio? ( mpi )"
-RDEPEND="
- dev-lang/lua:*
+RDEPEND="${LUA_DEPS}
sys-apps/util-linux
virtual/blas
virtual/lapack
@@ -36,6 +38,10 @@ DEPEND="
${RDEPEND}
virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999_20201220-autoconf_lua_version.patch
+)
+
DOCS=( AUTHORS NEWS README )
AUTOTOOLS_AUTORECONF=true
@@ -50,8 +56,10 @@ pkg_pretend() {
src_prepare() {
default
+ sed -i -e "s/@LUA_IMPL@/${ELUA}/" "${S}"/src/sc_lua.h || die
+
# Inject a version number into the build system
- echo "${PV}" > ${S}/.tarball-version
+ echo "${PV}" > ${S}/.tarball-version || die
eautoreconf
}
@@ -66,7 +74,7 @@ src_configure() {
--with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
)
- econf "${myeconfargs[@]}"
+ econf LUA_IMPL="${ELUA}" "${myeconfargs[@]}"
}
src_install() {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-20 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-20 13:29 [gentoo-commits] repo/gentoo:master commit in: sci-libs/libsc/, sci-libs/libsc/files/, profiles/ Marek Szuba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox