summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2016-09-29 20:25:35 -0500
committerMatthias Maier <tamiko@gentoo.org>2016-09-29 21:55:15 -0500
commit22540790962b1e854108a68de7b724bbd0de87e2 (patch)
tree3351ec6c0da3e8decdb1ca60c2f7a4ea3cf00dd8 /sci-libs/cblas-reference
parentmedia-sound/gogglesmm: bump (diff)
downloadgentoo-22540790962b1e854108a68de7b724bbd0de87e2.tar.gz
gentoo-22540790962b1e854108a68de7b724bbd0de87e2.tar.bz2
gentoo-22540790962b1e854108a68de7b724bbd0de87e2.zip
sci-libs/cblas-reference: version bump to 20151113
Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-libs/cblas-reference')
-rw-r--r--sci-libs/cblas-reference/Manifest1
-rw-r--r--sci-libs/cblas-reference/cblas-reference-20151113.ebuild96
-rw-r--r--sci-libs/cblas-reference/files/eselect.cblas.reference-r18
-rw-r--r--sci-libs/cblas-reference/files/lapack-fix-build-system.patch124
4 files changed, 229 insertions, 0 deletions
diff --git a/sci-libs/cblas-reference/Manifest b/sci-libs/cblas-reference/Manifest
index 1e8316091c81..e6e6a591d226 100644
--- a/sci-libs/cblas-reference/Manifest
+++ b/sci-libs/cblas-reference/Manifest
@@ -1 +1,2 @@
DIST cblas.tgz 197694 SHA256 9b49d7177fda62b6141bf2ca29e475e86f0b12d8f72e0b944058d02b439dd52a SHA512 8edc4f939d36e6bb9bcbc4ffe414b6c991192ef2e76ec4eda16d3578591185d31e46be5e747d74c740411db6bd2c2d414a18f73193d4a288e8c7e4b83cb0895d WHIRLPOOL e3f9f2b6a58f000ac2dc02326cd5a41f8a5cc1437035e710c49eb2ff8b366906c099285c982394e69082d861be16cacd8bef2c3191d84dcace120b5d73623915
+DIST lapack-3.6.0.tgz 6792324 SHA256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 SHA512 bc50441d415ef8896dd7626d77c6104184b996e758704366288089f03d4c99d068e33153b0d13305310886017e5d2e716130f812a95cfcad36ef37fe20417ab8 WHIRLPOOL 5576d0a81b2645fe95ef7011cc398f31142b8dcd01cdf5945e3db0e73ae1768766ea54254b40f4c6a581a6fb77b911595fccd597be0536833118af5877bb0c64
diff --git a/sci-libs/cblas-reference/cblas-reference-20151113.ebuild b/sci-libs/cblas-reference/cblas-reference-20151113.ebuild
new file mode 100644
index 000000000000..eace9c75c111
--- /dev/null
+++ b/sci-libs/cblas-reference/cblas-reference-20151113.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs
+
+LPN=lapack
+LPV=3.6.0
+
+DESCRIPTION="C wrapper interface to the F77 reference BLAS implementation"
+HOMEPAGE="http://www.netlib.org/cblas/"
+SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE=""
+
+DEPEND="app-eselect/eselect-cblas"
+RDEPEND="${DEPEND}
+ >=virtual/blas-3.6
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${LPN}-${LPV}"
+PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" )
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ eapply_user
+
+ ESELECT_PROF=reference
+
+ cp "${FILESDIR}"/eselect.cblas.reference-r1 "${T}"/eselect.cblas.reference || die
+ sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.cblas.reference || die
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
+ "${T}"/eselect.cblas.reference || die
+ fi
+
+ sed -i \
+ -e 's:/CMAKE/:/cmake/:g' \
+ CBLAS/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Wno-dev
+ -DCBLAS=ON
+ -DUSE_OPTIMIZED_BLAS=ON
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
+ -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags blas) ${CFLAGS}"
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags blas) $(get_abi_CFLAGS) ${FCFLAGS}"
+ -DBUILD_SHARED_LIBS=ON
+ -DBUILD_STATIC_LIBS=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile -C CBLAS
+}
+
+src_install() {
+ cmake-utils_src_install -C CBLAS
+
+ mkdir -p "${ED}/usr/$(get_libdir)/blas/reference" || die
+ mv "${ED}/usr/$(get_libdir)"/lib* "${ED}/usr/include"/cblas* \
+ "${ED}/usr/$(get_libdir)/pkgconfig"/* \
+ "${ED}/usr/$(get_libdir)/blas/reference" || die
+
+ rmdir "${ED}/usr/$(get_libdir)/pkgconfig" || die
+ rmdir "${ED}/usr/include" || die
+ rm -rf "${ED}"/usr/lib/ || die
+
+ eselect cblas add $(get_libdir) "${T}"/eselect.cblas.reference ${ESELECT_PROF}
+}
+
+pkg_postinst() {
+ local p=cblas
+ local current_lib=$(eselect ${p} show | cut -d' ' -f2)
+ if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
+ # work around eselect bug #189942
+ local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
+ [[ -e ${configfile} ]] && rm -f ${configfile}
+ eselect ${p} set ${ESELECT_PROF}
+ elog "${p} has been eselected to ${ESELECT_PROF}"
+ else
+ elog "Current eselected ${p} is ${current_lib}"
+ elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
+ elog "\t eselect ${p} set ${ESELECT_PROF}"
+ fi
+}
diff --git a/sci-libs/cblas-reference/files/eselect.cblas.reference-r1 b/sci-libs/cblas-reference/files/eselect.cblas.reference-r1
new file mode 100644
index 000000000000..67aeb212101d
--- /dev/null
+++ b/sci-libs/cblas-reference/files/eselect.cblas.reference-r1
@@ -0,0 +1,8 @@
+blas/reference/libcblas.so /usr/@LIBDIR@/libcblas.so
+blas/reference/libcblas.so.3 /usr/@LIBDIR@/libcblas.so.3
+blas/reference/libcblas.a /usr/@LIBDIR@/libcblas.a
+../@LIBDIR@/blas/reference/cblas.pc /usr/@LIBDIR@/pkgconfig/cblas.pc
+../@LIBDIR@/blas/reference/cblas_test.h /usr/include/cblas_test.h
+../@LIBDIR@/blas/reference/cblas_mangling.h /usr/include/cblas_mangling.h
+../@LIBDIR@/blas/reference/cblas_f77.h /usr/include/cblas_f77.h
+../@LIBDIR@/blas/reference/cblas.h /usr/include/cblas.h
diff --git a/sci-libs/cblas-reference/files/lapack-fix-build-system.patch b/sci-libs/cblas-reference/files/lapack-fix-build-system.patch
new file mode 100644
index 000000000000..a187dac21a12
--- /dev/null
+++ b/sci-libs/cblas-reference/files/lapack-fix-build-system.patch
@@ -0,0 +1,124 @@
+ BLAS/CMakeLists.txt | 2 +-
+ BLAS/blas.pc.in | 6 ++++--
+ CBLAS/CMakeLists.txt | 2 +-
+ CBLAS/cblas.pc.in | 9 ++++++---
+ CMakeLists.txt | 2 +-
+ LAPACKE/CMakeLists.txt | 2 +-
+ LAPACKE/lapacke.pc.in | 6 ++++--
+ lapack.pc.in | 6 ++++--
+ 8 files changed, 22 insertions(+), 13 deletions(-)
+
+diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt
+index 45e68e9..56c8354 100644
+--- a/BLAS/CMakeLists.txt
++++ b/BLAS/CMakeLists.txt
+@@ -2,7 +2,7 @@ add_subdirectory(SRC)
+ 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}
+diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in
+index 845a25c..7a53ea5 100644
+--- a/BLAS/blas.pc.in
++++ b/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
+diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
+index 98b481f..8f98b04 100644
+--- a/CBLAS/CMakeLists.txt
++++ b/CBLAS/CMakeLists.txt
+@@ -71,7 +71,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in
+ ${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}
+diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in
+index ee20206..14a141e 100644
+--- a/CBLAS/cblas.pc.in
++++ b/CBLAS/cblas.pc.in
+@@ -1,9 +1,12 @@
+-prefix=@prefix@
+-libdir=@libdir@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/include/@PROFNAME@
+
+-Name: lapacke
++Name: cblas-reference
+ Description: C Standard Interface to BLAS Linear Algebra PACKage
+ Version: @LAPACK_VERSION@
+ URL: http://www.netlib.org/lapack/
+ Libs: -L${libdir} -lcblas
++Cflags: -I${includedir}
+ Requires: blas
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ab29bd2..31b878a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -333,7 +333,7 @@ configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in
+ ${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}
+diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
+index 008f24c..d8c4cb0 100644
+--- a/LAPACKE/CMakeLists.txt
++++ b/LAPACKE/CMakeLists.txt
+@@ -65,7 +65,7 @@ if(BUILD_TESTING)
+ 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}
+diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in
+index 75e6871..ce5201b 100644
+--- a/LAPACKE/lapacke.pc.in
++++ b/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
+diff --git a/lapack.pc.in b/lapack.pc.in
+index d34c870..0d0750f 100644
+--- a/lapack.pc.in
++++ b/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