From e99583862c16ab1c781c8c94eae865c0f097eaf7 Mon Sep 17 00:00:00 2001 From: Ted Tanberry Date: Thu, 3 Dec 2015 09:45:11 +0100 Subject: sci-libs/cblas-reference: revbump --- .../cblas-reference-20151113-r1.ebuild | 127 --------------------- .../cblas-reference-20151113-r2.ebuild | 127 +++++++++++++++++++++ 2 files changed, 127 insertions(+), 127 deletions(-) delete mode 100644 sci-libs/cblas-reference/cblas-reference-20151113-r1.ebuild create mode 100644 sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild diff --git a/sci-libs/cblas-reference/cblas-reference-20151113-r1.ebuild b/sci-libs/cblas-reference/cblas-reference-20151113-r1.ebuild deleted file mode 100644 index f00d97509..000000000 --- a/sci-libs/cblas-reference/cblas-reference-20151113-r1.ebuild +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -PYTHON_COMPAT=( python2_7 ) - -NUMERIC_MODULE_NAME="refcblas" - -inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs eutils - -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/${LPV}" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="static-libs test" - -REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="" -DEPEND="${RDEPEND} - test? ( ${PYTHON_DEPS} ) - virtual/pkgconfig" - -S="${WORKDIR}/${LPN}-${LPV}" -PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" ) - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/cblas/cblas.h -) -src_prepare() { - # 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 blas implementations - # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single - # quotes in the following seds. They are later set by defining cmake - # variables with -DPROFNAME etc in src_configure - sed -i \ - -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ - -e '/ALL_TARGETS/s:cblas):${LIBNAME}):' \ - -e '/_librar/s:cblas:${LIBNAME}:' \ - CMakeLists.txt \ - CBLAS/src/CMakeLists.txt || die - sed -i \ - -e 's:/CMAKE/:/cmake/:g' \ - CBLAS/CMakeLists.txt || die - sed -i \ - -e '/Name: /s:cblas:@PROFNAME@:' \ - -e 's:-lcblas:-l@LIBNAME@:g' \ - CBLAS/cblas.pc.in || die - sed -i \ - -e 's:cblas):${LIBNAME}):' \ - CBLAS/testing/CMakeLists.txt || die - sed -i \ - -e 's:BINARY_DIR}/cblas:BINARY_DIR}/${PROFNAME}:' \ - -e '/CBLAS_INCLUDE/s:include ):include/${PROFNAME} ):g' \ - CBLAS/CMakeLists.txt || die -} - -src_configure() { - cblas_configure() { - local FCFLAGS="${FCFLAGS}" - append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) - append-fflags $(get_abi_CFLAGS) - append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) - - local blas_profname=$(numeric-int64_get_blas_alternative) - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - - local mycmakeargs=( - -Wno-dev - -DCBLAS=ON - -DPROFNAME="${profname}" - -DLIBNAME="${libname}" - -DUSE_OPTIMIZED_BLAS=ON - -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" - -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)" - $(cmake-utils_use_build test TESTING) - ) - 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 cblas_configure -} - -src_compile() { - local each target_dirs=( CBLAS ) - use test && target_dirs+=( testing ) - for each in ${target_dirs[@]}; do - numeric-int64-multibuild_foreach_all_abi_variants \ - cmake-utils_src_compile -C ${each} - done - -} - -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 -C CBLAS - numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h refcblas/cblas.h - multilib_install_wrappers -} diff --git a/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild b/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild new file mode 100644 index 000000000..3a03361cd --- /dev/null +++ b/sci-libs/cblas-reference/cblas-reference-20151113-r2.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +NUMERIC_MODULE_NAME="refcblas" + +inherit alternatives-2 cmake-utils eutils fortran-2 numeric-int64-multibuild python-any-r1 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/${LPV}" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="static-libs test" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS} ) + virtual/pkgconfig" + +S="${WORKDIR}/${LPN}-${LPV}" +PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/cblas/cblas.h +) +src_prepare() { + # 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 blas implementations + # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single + # quotes in the following seds. They are later set by defining cmake + # variables with -DPROFNAME etc in src_configure + sed -i \ + -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ + -e '/ALL_TARGETS/s:cblas):${LIBNAME}):' \ + -e '/_librar/s:cblas:${LIBNAME}:' \ + CMakeLists.txt \ + CBLAS/src/CMakeLists.txt || die + sed -i \ + -e 's:/CMAKE/:/cmake/:g' \ + CBLAS/CMakeLists.txt || die + sed -i \ + -e '/Name: /s:cblas:@PROFNAME@:' \ + -e 's:-lcblas:-l@LIBNAME@:g' \ + CBLAS/cblas.pc.in || die + sed -i \ + -e 's:cblas):${LIBNAME}):' \ + CBLAS/testing/CMakeLists.txt || die + sed -i \ + -e 's:BINARY_DIR}/cblas:BINARY_DIR}/${PROFNAME}:' \ + -e '/CBLAS_INCLUDE/s:include ):include/${PROFNAME} ):g' \ + CBLAS/CMakeLists.txt || die +} + +src_configure() { + cblas_configure() { + local FCFLAGS="${FCFLAGS}" + append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) + append-fflags $(get_abi_CFLAGS) + append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) + + local blas_profname=$(numeric-int64_get_blas_alternative) + local profname=$(numeric-int64_get_module_name) + local libname="${profname//-/_}" + + local mycmakeargs=( + -Wno-dev + -DCBLAS=ON + -DPROFNAME="${profname}" + -DLIBNAME="${libname}" + -DUSE_OPTIMIZED_BLAS=ON + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" + -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)" + $(cmake-utils_use_build test TESTING) + ) + 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 cblas_configure +} + +src_compile() { + local each target_dirs=( CBLAS ) + use test && target_dirs+=( testing ) + for each in ${target_dirs[@]}; do + numeric-int64-multibuild_foreach_all_abi_variants \ + cmake-utils_src_compile -C ${each} + done + +} + +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 -C CBLAS + numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h refcblas/cblas.h + multilib_install_wrappers +} -- cgit v1.2.3-65-gdbad