* [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/files/, sci-libs/lapack-reference/
@ 2015-12-03 9:54 Justin Lecher
0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2015-12-03 9:54 UTC (permalink / raw
To: gentoo-commits
commit: 29e777ee0b73abb981c61de56e6138226e0843d2
Author: Ted Tanberry <ted.tanberry <AT> gmail <DOT> com>
AuthorDate: Wed Dec 2 19:29:37 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Dec 3 09:42:20 2015 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=29e777ee
sci-libs/lapack-reference: update pkg-config handling
.../files/lapack-fix-build-system.patch | 92 ++++++++++++++++++++++
.../lapack-reference/lapack-reference-3.6.0.ebuild | 13 ++-
2 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/sci-libs/lapack-reference/files/lapack-fix-build-system.patch b/sci-libs/lapack-reference/files/lapack-fix-build-system.patch
new file mode 100644
index 0000000..8661709
--- /dev/null
+++ b/sci-libs/lapack-reference/files/lapack-fix-build-system.patch
@@ -0,0 +1,92 @@
+--- lapack-3.6.0/BLAS/blas.pc.in
++++ lapack-3.6.0/BLAS/blas.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: blas
+ Description: Basic Linear Algebra Subprograms F77 reference implementations
+--- lapack-3.6.0/BLAS/CMakeLists.txt
++++ lapack-3.6.0/BLAS/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ if(BUILD_TESTING)
+ add_subdirectory(TESTING)
+ endif(BUILD_TESTING)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/blas.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.0/CBLAS/cblas.pc.in
++++ lapack-3.6.0/CBLAS/cblas.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapacke
+ Description: C Standard Interface to BLAS Linear Algebra PACKage
+--- lapack-3.6.0/CBLAS/CMakeLists.txt
++++ lapack-3.6.0/CBLAS/CMakeLists.txt
+@@ -71,7 +71,7 @@
+ ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.0/CMakeLists.txt
++++ lapack-3.6.0/CMakeLists.txt
+@@ -333,7 +333,7 @@
+ ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.0/LAPACKE/CMakeLists.txt
++++ lapack-3.6.0/LAPACKE/CMakeLists.txt
+@@ -65,7 +65,7 @@
+ endif(BUILD_TESTING)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.0/LAPACKE/lapacke.pc.in
++++ lapack-3.6.0/LAPACKE/lapacke.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapacke
+ Description: C Standard Interface to LAPACK Linear Algebra PACKage
+--- lapack-3.6.0/lapack.pc.in
++++ lapack-3.6.0/lapack.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapack
+ Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
diff --git a/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild
index ac88f98..c06fe42 100644
--- a/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild
+++ b/sci-libs/lapack-reference/lapack-reference-3.6.0.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python2_7 )
NUMERIC_MODULE_NAME="reflapack"
-inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 eutils
MY_PN=lapack
MYP=${MY_PN}-${PV}
@@ -32,10 +32,15 @@ DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )"
S="${WORKDIR}/${MYP}"
+PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" )
src_prepare() {
numeric-int64_ensure_blas_int_support
+ # the lapack(e)/(c)blas build system is somewhat broken
+ # with respect to its pkg-config files.
+ epatch "${PATCHES[@]}"
+
# rename library to avoid collision with other lapack implementations
# ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they
# are in single quotes in the following seds. They are set later by
@@ -50,9 +55,9 @@ src_prepare() {
-e '/PROPERTIES/s:lapack:${LIBNAME}:g' \
SRC/CMakeLists.txt || die
sed -i \
- -e '/Name: /s:lapack:${PROFNAME}:' \
- -e 's:-llapack:-l${LIBNAME}:g' \
- -e '/Requires: /s:blas:${BLAS_REQUIRES}\nFflags=${LAPACK_PKGCONFIG_FFLAGS}:' \
+ -e '/Name: /s:lapack:@PROFNAME@:' \
+ -e 's:-llapack:-l@LIBNAME@:g' \
+ -e '/Requires: /s:blas:@BLAS_REQUIRES@\nFflags\: ${LAPACK_PKGCONFIG_FFLAGS}:' \
lapack.pc.in || die
# some string does not get passed properly
sed -i \
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/files/, sci-libs/lapack-reference/
@ 2016-11-22 10:23 Marius Brehler
0 siblings, 0 replies; 2+ messages in thread
From: Marius Brehler @ 2016-11-22 10:23 UTC (permalink / raw
To: gentoo-commits
commit: f9a757b36cddd8bc5802b097a2fd4ccea8024c69
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Tue Nov 22 10:23:07 2016 +0000
Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
CommitDate: Tue Nov 22 10:23:07 2016 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f9a757b3
sci-libs/lapack-reference: Version bump to 3.6.1
Package-Manager: portage-2.3.0
.../files/lapack-3.6.1-fix-build-system.patch | 88 +++++++++++++++
.../lapack-reference-3.6.1-r100.ebuild | 125 +++++++++++++++++++++
2 files changed, 213 insertions(+)
diff --git a/sci-libs/lapack-reference/files/lapack-3.6.1-fix-build-system.patch b/sci-libs/lapack-reference/files/lapack-3.6.1-fix-build-system.patch
new file mode 100644
index 0000000..b16cb3e
--- /dev/null
+++ b/sci-libs/lapack-reference/files/lapack-3.6.1-fix-build-system.patch
@@ -0,0 +1,88 @@
+--- lapack-3.6.1/BLAS/blas.pc.in
++++ lapack-3.6.1/BLAS/blas.pc.in
+@@ -1,5 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
+ libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: blas
+ Description: Basic Linear Algebra Subprograms F77 reference implementations
+--- lapack-3.6.1/BLAS/CMakeLists.txt
++++ lapack-3.6.1/BLAS/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ if(BUILD_TESTING)
+ add_subdirectory(TESTING)
+ endif(BUILD_TESTING)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/blas.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.1/CBLAS/cblas.pc.in
++++ lapack-3.6.1/CBLAS/cblas.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapacke
+ Description: C Standard Interface to BLAS Linear Algebra PACKage
+--- lapack-3.6.1/CBLAS/CMakeLists.txt
++++ lapack-3.6.1/CBLAS/CMakeLists.txt
+@@ -71,7 +71,7 @@
+ ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.1/CMakeLists.txt
++++ lapack-3.6.1/CMakeLists.txt
+@@ -333,7 +333,7 @@
+ ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.1/LAPACKE/CMakeLists.txt
++++ lapack-3.6.1/LAPACKE/CMakeLists.txt
+@@ -65,7 +65,7 @@
+ endif(BUILD_TESTING)
+
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY)
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
+ DESTINATION ${PKG_CONFIG_DIR}
+--- lapack-3.6.1/LAPACKE/lapacke.pc.in
++++ lapack-3.6.1/LAPACKE/lapacke.pc.in
+@@ -1,5 +1,7 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapacke
+ Description: C Standard Interface to LAPACK Linear Algebra PACKage
+--- lapack-3.6.1/lapack.pc.in
++++ lapack-3.6.1/lapack.pc.in
+@@ -1,5 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
+ libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include
+
+ Name: lapack
+ Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
diff --git a/sci-libs/lapack-reference/lapack-reference-3.6.1-r100.ebuild b/sci-libs/lapack-reference/lapack-reference-3.6.1-r100.ebuild
new file mode 100644
index 0000000..850dde9
--- /dev/null
+++ b/sci-libs/lapack-reference/lapack-reference-3.6.1-r100.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+NUMERIC_MODULE_NAME="reflapack"
+
+inherit alternatives-2 cmake-utils eutils fortran-2 numeric-int64-multibuild python-any-r1
+
+MY_PN=lapack
+MYP=${MY_PN}-${PV}
+
+DESCRIPTION="Reference implementation of LAPACK"
+HOMEPAGE="http://www.netlib.org/lapack/"
+SRC_URI="http://www.netlib.org/lapack/${MYP}.tgz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+deprecated static-libs test xblas"
+
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ >=virtual/blas-2.1-r3[int64?,${MULTILIB_USEDEP}]
+ xblas? ( sci-libs/xblas[fortran,int64?] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
+
+S="${WORKDIR}/${MYP}"
+PATCHES=( "${FILESDIR}/lapack-${PV}-fix-build-system.patch" )
+
+src_prepare() {
+ numeric-int64_ensure_blas_int_support
+
+ # the lapack(e)/(c)blas build system is somewhat broken
+ # with respect to its pkg-config files.
+ epatch "${PATCHES[@]}"
+
+ # rename library to avoid collision with other lapack implementations
+ # ${PROFNAME}, ${LIBNAME} and ${BLAS_REQUIRES} are not defined here, they
+ # are in single quotes in the following seds. They are set later by
+ # defining a cmake variables with -DPROFNAME etc in src_configure.
+ sed \
+ -e 's:BINARY_DIR}/lapack.pc:BINARY_DIR}/${PROFNAME}.pc:' \
+ -e '/ALL_TARGETS/s:lapack):${LIBNAME}):' \
+ -e '/LAPACK_LIBRARIES/s:lapack:${LIBNAME}:g' \
+ -i CMakeLists.txt || die
+ sed -i \
+ -e 's:(lapack:(${LIBNAME}:g' \
+ -e '/PROPERTIES/s:lapack:${LIBNAME}:g' \
+ SRC/CMakeLists.txt || die
+ sed -i \
+ -e '/Name: /s:lapack:@PROFNAME@:' \
+ -e 's:-llapack:-l@LIBNAME@:g' \
+ -e '/Requires: /s:blas:@BLAS_REQUIRES@\nFflags\: ${LAPACK_PKGCONFIG_FFLAGS}:' \
+ lapack.pc.in || die
+ # some string does not get passed properly
+ sed -i \
+ -e '/lapack_testing.py/d' \
+ CTestCustom.cmake.in || die
+ # separate ebuild to tmglib
+ sed -i \
+ -e '/lapack_install_library(tmglib)/d' \
+ TESTING/MATGEN/CMakeLists.txt || die
+}
+
+src_configure() {
+ lapack_configure() {
+ local profname=$(numeric-int64_get_module_name)
+ local libname="${profname//-/_}"
+ local blas_profname=$(numeric-int64_get_blas_alternative)
+ local xblas_profname=$(numeric-int64_get_xblas_alternative)
+ local xblas_libname="${xblas_profname//-/_}"
+ local blas_requires="${blas_profname}"
+ use xblas && \
+ blas_requires+=" ${xblas_profname}"
+ local mycmakeargs=(
+ -DPROFNAME="${profname}"
+ -DBLAS_REQUIRES="${blas_requires}"
+ -DLIBNAME="${libname}"
+ -DUSE_OPTIMIZED_BLAS=ON
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})"
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_use xblas XBLAS)
+ $(cmake-utils_use_build deprecated DEPRECATED)
+ -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}"
+ -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}"
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}"
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)"
+ )
+ use xblas && \
+ mycmakeargs+=( -DXBLAS_LIBRARY:FILEPATH="${EROOT}usr/$(get_libdir)/lib${xblas_libname}.so" )
+ if $(numeric-int64_is_static_build); then
+ mycmakeargs+=(
+ -DBUILD_SHARED_LIBS=OFF
+ -DBUILD_STATIC_LIBS=ON
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_STATIC_LIBS=OFF
+ )
+ fi
+ cmake-utils_src_configure
+ }
+ numeric-int64-multibuild_foreach_all_abi_variants lapack_configure
+}
+
+src_compile() {
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_compile
+}
+
+src_test() {
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test
+}
+
+src_install() {
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install
+ numeric-int64-multibuild_install_alternative lapack reference
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-22 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-03 9:54 [gentoo-commits] proj/sci:master commit in: sci-libs/lapack-reference/files/, sci-libs/lapack-reference/ Justin Lecher
-- strict thread matches above, loose matches on Subject: below --
2016-11-22 10:23 Marius Brehler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox