commit: fb2465d7e6584f980f74bdd733664c8d33bfb29d Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> AuthorDate: Thu Jul 25 04:35:48 2019 +0000 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> CommitDate: Thu Jul 25 04:39:39 2019 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=fb2465d7
sci-libs/openblas: merge into ::gentoo and remove from overlay. Closes: https://github.com/gentoo/sci/issues/917 Closes: https://github.com/gentoo/sci/issues/888 Closes: https://github.com/gentoo/sci/issues/859 Closes: https://github.com/gentoo/sci/issues/704 Closes: https://github.com/gentoo/sci/issues/686 Closes: https://github.com/gentoo/sci/issues/631 Closes: https://github.com/gentoo/sci/issues/628 Closes: https://github.com/gentoo/sci/issues/20 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> .../openblas/files/openblas-0.2.11-cpuid_x86.patch | 27 --- sci-libs/openblas/files/openblas-0.2.19-MAKE.patch | 29 ---- .../files/openblas-0.2.19-utest_ldflags.patch | 13 -- .../openblas/files/openblas-0.2.20-non-glibc.patch | 144 --------------- sci-libs/openblas/metadata.xml | 19 -- sci-libs/openblas/openblas-0.2.14-r1.ebuild | 187 -------------------- sci-libs/openblas/openblas-0.2.15-r1.ebuild | 188 -------------------- sci-libs/openblas/openblas-0.2.19-r1.ebuild | 193 --------------------- sci-libs/openblas/openblas-0.2.20.ebuild | 192 -------------------- sci-libs/openblas/openblas-9999.ebuild | 181 ------------------- 10 files changed, 1173 deletions(-) diff --git a/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch b/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch deleted file mode 100644 index c6f299132..000000000 --- a/sci-libs/openblas/files/openblas-0.2.11-cpuid_x86.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- openblas-9999-orig/cpuid_x86.c 2014-02-23 15:25:22.199394761 +1100 -+++ openblas-9999/cpuid_x86.c 2014-02-23 16:41:02.727372869 +1100 -@@ -57,9 +57,23 @@ - void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx); - #else - static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){ -+#if __x86_64 - __asm__ __volatile__ - ("cpuid": "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (op) : "cc"); -- -+#else -+ __asm volatile( -+ "push %%ebx\n\t" -+ "cpuid\n\t" -+ "mov %%ebx, (%4)\n\t" -+ "pop %%ebx" -+ :"=a" (*eax), -+ "=c" (*ecx), -+ "=d" (*edx) -+ :"a" (op), -+ "cc" -+ "S" (ebx) -+ :"memory"); -+#endif - } - #endif - diff --git a/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch b/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch deleted file mode 100644 index c77dd0f93..000000000 --- a/sci-libs/openblas/files/openblas-0.2.19-MAKE.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/Makefile b/Makefile -index 2ae0047..2071e10 100644 ---- a/Makefile -+++ b/Makefile -@@ -278,13 +278,13 @@ lapack-timing : large.tgz timing.tgz - ifndef NOFORTRAN - (cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING) - (cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz ) -- make -C $(NETLIB_LAPACK_DIR)/TIMING -+ $(MAKE) -C $(NETLIB_LAPACK_DIR)/TIMING - endif - - - lapack-test : - (cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out) -- make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc -+ $(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintstrfd xlintstrfz xlintsts xlintstz xlintstzc xlintstrfs xlintstrfc - ifneq ($(CROSS), 1) - ( cd $(NETLIB_LAPACK_DIR)/INSTALL; ./testlsame; ./testslamch; ./testdlamch; \ - ./testsecond; ./testdsecnd; ./testieee; ./testversion ) -@@ -299,7 +299,7 @@ lapack-runtest: - - blas-test: - (cd $(NETLIB_LAPACK_DIR)/BLAS && rm -f x* *.out) -- make -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing -+ $(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing - (cd $(NETLIB_LAPACK_DIR)/BLAS && cat *.out) - - diff --git a/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch b/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch deleted file mode 100644 index 2ffd5babe..000000000 --- a/sci-libs/openblas/files/openblas-0.2.19-utest_ldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/utest/Makefile b/utest/Makefile -index 3ccc0a0..ce809e3 100644 ---- a/utest/Makefile -+++ b/utest/Makefile -@@ -18,7 +18,7 @@ endif - all : run_test - - $(UTESTBIN): $(OBJS) -- $(CC) $(CFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB) - - run_test: $(UTESTBIN) - ifndef CROSS diff --git a/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch b/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch deleted file mode 100644 index afde85585..000000000 --- a/sci-libs/openblas/files/openblas-0.2.20-non-glibc.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 480e697681763cf31f015eb1ebad49a495f562c5 Mon Sep 17 00:00:00 2001 -From: Martin Kroeker <[email protected]> -Date: Mon, 24 Jul 2017 16:17:50 +0200 -Subject: [PATCH] Revert "Honor cgroup/cpuset limits when enumerating cpus" - (#1246) - ---- - driver/others/init.c | 49 +++++-------------------------------------------- - driver/others/memory.c | 37 ------------------------------------- - 2 files changed, 5 insertions(+), 81 deletions(-) - -diff --git a/driver/others/init.c b/driver/others/init.c -index 4c75d72e4..3e6176967 100644 ---- a/driver/others/init.c -+++ b/driver/others/init.c -@@ -778,11 +778,11 @@ static int initialized = 0; - void gotoblas_affinity_init(void) { - - int cpu, num_avail; --#ifndef USE_OPENMP -+#ifndef USE_OPENMP - cpu_set_t cpu_mask; - #endif - int i; -- -+ - if (initialized) return; - - initialized = 1; -@@ -826,54 +826,15 @@ void gotoblas_affinity_init(void) { - common -> shmid = pshmid; - - if (common -> magic != SH_MAGIC) { -- cpu_set_t *cpusetp; -- int nums; -- int ret; -- - #ifdef DEBUG - fprintf(stderr, "Shared Memory Initialization.\n"); - #endif - - //returns the number of processors which are currently online -- -- nums = sysconf(_SC_NPROCESSORS_CONF); -- --#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3) -- common->num_procs = nums; --#elif __GLIBC_PREREQ(2, 7) -- cpusetp = CPU_ALLOC(nums); -- if (cpusetp == NULL) { -- common->num_procs = nums; -- } else { -- size_t size; -- size = CPU_ALLOC_SIZE(nums); -- ret = sched_getaffinity(0,size,cpusetp); -- if (ret!=0) -- common->num_procs = nums; -- else -- common->num_procs = CPU_COUNT_S(size,cpusetp); -- } -- CPU_FREE(cpusetp); --#else -- ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp); -- if (ret!=0) { -- common->num_procs = nums; -- } else { --#if !__GLIBC_PREREQ(2, 6) -- int i; -- int n = 0; -- for (i=0;i<nums;i++) -- if (CPU_ISSET(i,cpusetp)) n++; -- common->num_procs = n; -- } --#else -- common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp); --#endif -- --#endif -+ common -> num_procs = sysconf(_SC_NPROCESSORS_CONF);; - - if(common -> num_procs > MAX_CPUS) { -- fprintf(stderr, "\nOpenBLAS Warning : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS); -+ fprintf(stderr, "\nOpenBLAS Warining : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS); - exit(1); - } - -@@ -886,7 +847,7 @@ void gotoblas_affinity_init(void) { - if (common -> num_nodes > 1) numa_mapping(); - - common -> final_num_procs = 0; -- for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number. -+ for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number. - - for (cpu = 0; cpu < common -> final_num_procs; cpu ++) common -> cpu_use[cpu] = 0; - -diff --git a/driver/others/memory.c b/driver/others/memory.c -index 38d063715..916950315 100644 ---- a/driver/others/memory.c -+++ b/driver/others/memory.c -@@ -175,44 +175,7 @@ int get_num_procs(void); - #else - int get_num_procs(void) { - static int nums = 0; --cpu_set_t *cpusetp; --size_t size; --int ret; --int i,n; -- - if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF); --#if !defined(OS_LINUX) -- return nums; --#endif -- --#if !defined(__GLIBC_PREREQ) -- return nums; --#endif --#if !__GLIBC_PREREQ(2, 3) -- return nums; --#endif -- --#if !__GLIBC_PREREQ(2, 7) -- ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp); -- if (ret!=0) return nums; -- n=0; --#if !__GLIBC_PREREQ(2, 6) -- for (i=0;i<nums;i++) -- if (CPU_ISSET(i,cpusetp)) n++; -- nums=n; --#else -- nums = CPU_COUNT(sizeof(cpu_set_t),cpusetp); --#endif -- return nums; --#endif -- -- cpusetp = CPU_ALLOC(nums); -- if (cpusetp == NULL) return nums; -- size = CPU_ALLOC_SIZE(nums); -- ret = sched_getaffinity(0,size,cpusetp); -- if (ret!=0) return nums; -- nums = CPU_COUNT_S(size,cpusetp); -- CPU_FREE(cpusetp); - return nums; - } - #endif diff --git a/sci-libs/openblas/metadata.xml b/sci-libs/openblas/metadata.xml deleted file mode 100644 index 55f42abc3..000000000 --- a/sci-libs/openblas/metadata.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>[email protected]</email> - <name>Gentoo Science Project</name> - </maintainer> - <longdescription lang="en"> -OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD -version. See <pkg>sci-libs/gotoblas2</pkg> for more on GotoBLAS2. -</longdescription> - <use> - <flag name="int64">Build the 64 bits integer library</flag> - <flag name="dynamic">Build dynamic architecture detection at run time (for multi targets)</flag> - </use> - <upstream> - <remote-id type="github">xianyi/OpenBLAS</remote-id> - </upstream> -</pkgmetadata> diff --git a/sci-libs/openblas/openblas-0.2.14-r1.ebuild b/sci-libs/openblas/openblas-0.2.14-r1.ebuild deleted file mode 100644 index ba7aa8298..000000000 --- a/sci-libs/openblas/openblas-0.2.14-r1.ebuild +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -NUMERIC_MODULE_NAME="openblas" - -inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild - -DESCRIPTION="Optimized BLAS library based on GotoBLAS2" -HOMEPAGE="http://xianyi.github.com/OpenBLAS/" -SRC_URI=" - https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz - https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="dynamic openmp static-libs threads" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/openblas/openblas_config.h -) - -PATCHES=( - "${DISTDIR}"/${PN}-0.2.11-gentoo.patch -) - -get_openblas_flags() { - local openblas_flags=() - use dynamic && \ - openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) - $(numeric-int64_is_int64_build) && \ - openblas_flags+=( INTERFACE64=1 ) - # choose posix threads over openmp when the two are set - # yet to see the need of having the two profiles simultaneously - if use threads; then - openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) - elif use openmp; then - openblas_flags+=( USE_OPENMP=1 ) - fi - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - local underscoresuffix="${libname#${PN}}" - if [[ "${underscoresuffix}" != "_" ]]; then - local libnamesuffix="${underscoresuffix#_}" - openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) - fi - - [[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 ) - - echo "${openblas_flags[@]}" -} - -get_openblas_abi_cflags() { - local openblas_abi_cflags=() - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 ) - else - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) - fi - $(numeric-int64_is_int64_build) && \ - openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) - echo "${openblas_abi_cflags[@]}" -} - -src_unpack() { - default - find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ - mv "${WORKDIR}"/*OpenBLAS* "${S}" || die -} - -src_prepare() { - default - - # lapack and lapacke are not modified from upstream lapack - sed \ - -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ - -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ - -i Makefile.rule || die - numeric-int64-multibuild_copy_sources -} - -src_configure() { - blas_configure() { - local openblas_abi_cflags="$(get_openblas_abi_cflags)" - local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" - sed \ - -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ - -i Makefile.rule || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure -} - -src_compile() { - # openblas already does multi-jobs - MAKEOPTS+=" -j1" - my_src_compile () { - local openblas_flags=$(get_openblas_flags) - # cflags already defined twice - unset CFLAGS || die - emake clean && emake libs shared ${openblas_flags} - mkdir -p libs && mv libopenblas* libs/ || die - # avoid pic when compiling static libraries, so re-compiling - if use static-libs; then - emake clean - emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= - mv libopenblas* libs/ || die - fi - - mv libs/libopenblas* . || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile -} - -src_test() { - my_src_test () { - local openblas_flags=$(get_openblas_flags) - emake tests ${openblas_flags} - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test -} - -src_install() { - my_src_install() { - local openblas_flags=$(get_openblas_flags) - local profname=$(numeric-int64_get_module_name) - local pcfile - # The file /usr/include/openblas/openblas_config.h is generated during the install. - # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT - # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 - # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in - # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. - sed -e '/#define USE64BITINT/d' \ - -e '/#define ARCH_X86/d' \ - -e '/#define __\(32\|64\)BIT__/d' \ - -i config_last.h \ - || die "Could not ensure there is no definition of USE64BITINT in config_last.h" - emake install \ - DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \ - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \ - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir) - if ! use static-libs; then - rm "${ED}"usr/$(get_libdir)/lib*.a || die - fi - - local openblas_abi_cflags=$(get_openblas_abi_cflags) - local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) - local libname="${profname//-/_}" - - create_pkgconfig \ - --name "${profname}" \ - --libs "-L\${libdir} -l${libname}" \ - --libs-private "-lm" \ - --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ - ${profname} - - if [[ ${CHOST} == *-darwin* ]] ; then - cd "${ED}"/usr/$(get_libdir) || die - local d - for d in *.dylib; do - ebegin "Correcting install_name of ${d}" - install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die - eend $? - done - fi - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then - multilib_prepare_wrappers - multilib_check_headers - fi - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install - - printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die - numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} - numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} - - multilib_install_wrappers - - dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt -} diff --git a/sci-libs/openblas/openblas-0.2.15-r1.ebuild b/sci-libs/openblas/openblas-0.2.15-r1.ebuild deleted file mode 100644 index e4f0c89ed..000000000 --- a/sci-libs/openblas/openblas-0.2.15-r1.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -NUMERIC_MODULE_NAME="openblas" - -inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild - -DESCRIPTION="Optimized BLAS library based on GotoBLAS2" -HOMEPAGE="http://xianyi.github.com/OpenBLAS/" -SRC_URI=" - https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz - https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="dynamic openmp static-libs threads" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/openblas/openblas_config.h -) - -PATCHES=( - "${DISTDIR}"/${PN}-0.2.11-gentoo.patch -) - -get_openblas_flags() { - local openblas_flags=() - use dynamic && \ - openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) - $(numeric-int64_is_int64_build) && \ - openblas_flags+=( INTERFACE64=1 ) - # choose posix threads over openmp when the two are set - # yet to see the need of having the two profiles simultaneously - if use threads; then - openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) - elif use openmp; then - openblas_flags+=( USE_OPENMP=1 ) - fi - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - local underscoresuffix="${libname#${PN}}" - if [[ "${underscoresuffix}" != "_" ]]; then - local libnamesuffix="${underscoresuffix#_}" - openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) - fi - - [[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 ) - - echo "${openblas_flags[@]}" -} - -get_openblas_abi_cflags() { - local openblas_abi_cflags=() - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 ) - else - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) - fi - $(numeric-int64_is_int64_build) && \ - openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) - use openmp && openblas_abi_cflags+=( -fopenmp ) - echo "${openblas_abi_cflags[@]}" -} - -src_unpack() { - default - find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ - mv "${WORKDIR}"/*OpenBLAS* "${S}" || die -} - -src_prepare() { - default - - # lapack and lapacke are not modified from upstream lapack - sed \ - -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ - -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ - -i Makefile.rule || die - numeric-int64-multibuild_copy_sources -} - -src_configure() { - blas_configure() { - local openblas_abi_cflags="$(get_openblas_abi_cflags)" - local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" - sed \ - -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ - -i Makefile.rule || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure -} - -src_compile() { - # openblas already does multi-jobs - MAKEOPTS+=" -j1" - my_src_compile () { - local openblas_flags=$(get_openblas_flags) - # cflags already defined twice - unset CFLAGS || die - emake clean && emake libs shared ${openblas_flags} - mkdir -p libs && mv libopenblas* libs/ || die - # avoid pic when compiling static libraries, so re-compiling - if use static-libs; then - emake clean - emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= - mv libopenblas* libs/ || die - fi - - mv libs/libopenblas* . || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile -} - -src_test() { - my_src_test () { - local openblas_flags=$(get_openblas_flags) - emake tests ${openblas_flags} - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test -} - -src_install() { - my_src_install() { - local openblas_flags=$(get_openblas_flags) - local profname=$(numeric-int64_get_module_name) - local pcfile - # The file /usr/include/openblas/openblas_config.h is generated during the install. - # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT - # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 - # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in - # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. - sed -e '/#define USE64BITINT/d' \ - -e '/#define ARCH_X86/d' \ - -e '/#define __\(32\|64\)BIT__/d' \ - -i config_last.h \ - || die "Could not ensure there is no definition of USE64BITINT in config_last.h" - emake install \ - DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \ - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \ - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir) - if ! use static-libs; then - rm "${ED}"usr/$(get_libdir)/lib*.a || die - fi - - local openblas_abi_cflags=$(get_openblas_abi_cflags) - local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) - local libname="${profname//-/_}" - - create_pkgconfig \ - --name "${profname}" \ - --libs "-L\${libdir} -l${libname}" \ - --libs-private "-lm" \ - --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ - ${profname} - - if [[ ${CHOST} == *-darwin* ]] ; then - cd "${ED}"/usr/$(get_libdir) || die - local d - for d in *.dylib; do - ebegin "Correcting install_name of ${d}" - install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die - eend $? - done - fi - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then - multilib_prepare_wrappers - multilib_check_headers - fi - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install - - printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die - numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} - numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} - - multilib_install_wrappers - - dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt -} diff --git a/sci-libs/openblas/openblas-0.2.19-r1.ebuild b/sci-libs/openblas/openblas-0.2.19-r1.ebuild deleted file mode 100644 index 38378cecd..000000000 --- a/sci-libs/openblas/openblas-0.2.19-r1.ebuild +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -NUMERIC_MODULE_NAME="openblas" - -inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild - -DESCRIPTION="Optimized BLAS library based on GotoBLAS2" -HOMEPAGE="http://xianyi.github.com/OpenBLAS/" -SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz - https://sagetrac.lipn.univ-paris13.fr/sage/${PN}-0.2.19-clang-3.9.patch" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" -IUSE="dynamic openmp static-libs threads" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/openblas/openblas_config.h -) - -PATCHES=( - "${DISTDIR}"/${PN}-0.2.19-clang-3.9.patch - "${FILESDIR}"/${PN}-0.2.19-MAKE.patch - "${FILESDIR}"/${PN}-0.2.19-utest_ldflags.patch - ) - -get_openblas_flags() { - local openblas_flags=() - use dynamic && \ - openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) - $(numeric-int64_is_int64_build) && \ - openblas_flags+=( INTERFACE64=1 ) - # choose posix threads over openmp when the two are set - # yet to see the need of having the two profiles simultaneously - if use threads; then - openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) - elif use openmp; then - openblas_flags+=( USE_OPENMP=1 ) - fi - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - local underscoresuffix="${libname#${PN}}" - if [[ "${underscoresuffix}" != "_" ]]; then - local libnamesuffix="${underscoresuffix#_}" - openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) - fi - - [[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 ) - - echo "${openblas_flags[@]}" -} - -get_openblas_abi_cflags() { - local openblas_abi_cflags=() - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_cflags=( -DARCH_X86=1 -DOPENBLAS___32BIT__=1 ) - elif [[ "${ABI}" == "amd64" ]]; then - openblas_abi_cflags=( -DARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) - elif [[ "${ABI}" == "ppc64" ]]; then - openblas_abi_cflags=( -DARCH_POWER=1 -DOPENBLAS___64BIT__=1 ) - else - die "unsupported abi: ${ABI}" - fi - $(numeric-int64_is_int64_build) && \ - openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) - use openmp && openblas_abi_cflags+=( -fopenmp ) - echo "${openblas_abi_cflags[@]}" -} - -src_unpack() { - default - find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ - mv "${WORKDIR}"/*OpenBLAS* "${S}" || die -} - -src_prepare() { - default - - # lapack and lapacke are not modified from upstream lapack - sed \ - -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ - -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ - -i Makefile.rule || die - numeric-int64-multibuild_copy_sources -} - -src_configure() { - blas_configure() { - local openblas_abi_cflags="$(get_openblas_abi_cflags)" - local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" - sed \ - -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ - -i Makefile.rule || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure -} - -src_compile() { - # openblas already does multi-jobs - MAKEOPTS+=" -j1" - my_src_compile () { - local openblas_flags=$(get_openblas_flags) - # cflags already defined twice - unset CFLAGS || die - emake clean && emake libs shared ${openblas_flags} - mkdir -p libs && mv libopenblas* libs/ || die - # avoid pic when compiling static libraries, so re-compiling - if use static-libs; then - emake clean - emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= - mv libopenblas* libs/ || die - fi - - mv libs/libopenblas* . || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile -} - -src_test() { - my_src_test () { - local openblas_flags=$(get_openblas_flags) - emake tests ${openblas_flags} - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test -} - -src_install() { - my_src_install() { - local openblas_flags=$(get_openblas_flags) - local profname=$(numeric-int64_get_module_name) - local pcfile - # The file /usr/include/openblas/openblas_config.h is generated during the install. - # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT - # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 - # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in - # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. - sed -e '/#define USE64BITINT/d' \ - -e '/#define ARCH_X86/d' \ - -e '/#define __\(32\|64\)BIT__/d' \ - -i config_last.h \ - || die "Could not ensure there is no definition of USE64BITINT in config_last.h" - emake install \ - DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \ - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \ - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir) - if ! use static-libs; then - rm "${ED}"usr/$(get_libdir)/lib*.a || die - fi - - local openblas_abi_cflags=$(get_openblas_abi_cflags) - local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) - local libname="${profname//-/_}" - - create_pkgconfig \ - --name "${profname}" \ - --libs "-l${libname}" \ - --libs-private "-lm" \ - --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ - ${profname} - - if [[ ${CHOST} == *-darwin* ]] ; then - cd "${ED}"/usr/$(get_libdir) || die - local d - for d in *.dylib; do - ebegin "Correcting install_name of ${d}" - install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die - eend $? - done - fi - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then - multilib_prepare_wrappers - multilib_check_headers - fi - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install - - printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die - numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} - numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} - - multilib_install_wrappers - - dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt -} diff --git a/sci-libs/openblas/openblas-0.2.20.ebuild b/sci-libs/openblas/openblas-0.2.20.ebuild deleted file mode 100644 index 838c334d6..000000000 --- a/sci-libs/openblas/openblas-0.2.20.ebuild +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -NUMERIC_MODULE_NAME="openblas" - -inherit alternatives-2 eutils multilib numeric numeric-int64-multibuild - -DESCRIPTION="Optimized BLAS library based on GotoBLAS2" -HOMEPAGE="http://xianyi.github.com/OpenBLAS/" -SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" -IUSE="dynamic openmp static-libs threads" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/openblas/openblas_config.h -) - -PATCHES=( - "${FILESDIR}"/${PN}-0.2.20-non-glibc.patch - ) - -get_openblas_flags() { - local openblas_flags=() - use dynamic && \ - openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) - $(numeric-int64_is_int64_build) && \ - openblas_flags+=( INTERFACE64=1 ) - # choose posix threads over openmp when the two are set - # yet to see the need of having the two profiles simultaneously - if use threads; then - openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) - elif use openmp; then - openblas_flags+=( USE_OPENMP=1 ) - else - openblas_flags+=( USE_THREAD=0 ) # single-threaded - fi - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - local underscoresuffix="${libname#${PN}}" - if [[ "${underscoresuffix}" != "_" ]]; then - local libnamesuffix="${underscoresuffix#_}" - openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) - fi - - [[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 ) - - echo "${openblas_flags[@]}" -} - -get_openblas_abi_cflags() { - local openblas_abi_cflags=() - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_cflags=( -DARCH_X86=1 -DOPENBLAS___32BIT__=1 ) - elif [[ "${ABI}" == "amd64" ]]; then - openblas_abi_cflags=( -DARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) - elif [[ "${ABI}" == "ppc64" ]]; then - openblas_abi_cflags=( -DARCH_POWER=1 -DOPENBLAS___64BIT__=1 ) - else - die "unsupported abi: ${ABI}" - fi - $(numeric-int64_is_int64_build) && \ - openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) - use openmp && openblas_abi_cflags+=( -fopenmp ) - echo "${openblas_abi_cflags[@]}" -} - -src_unpack() { - default - find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \ - mv "${WORKDIR}"/*OpenBLAS* "${S}" || die -} - -src_prepare() { - default - - # lapack and lapacke are not modified from upstream lapack - sed \ - -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ - -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ - -i Makefile.rule || die - numeric-int64-multibuild_copy_sources -} - -src_configure() { - blas_configure() { - local openblas_abi_cflags="$(get_openblas_abi_cflags)" - local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" - sed \ - -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ - -i Makefile.rule || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure -} - -src_compile() { - # openblas already does multi-jobs - MAKEOPTS+=" -j1" - my_src_compile () { - local openblas_flags=$(get_openblas_flags) - # cflags already defined twice - unset CFLAGS || die - emake clean && emake libs shared ${openblas_flags} - mkdir -p libs && mv libopenblas* libs/ || die - # avoid pic when compiling static libraries, so re-compiling - if use static-libs; then - emake clean - emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= - mv libopenblas* libs/ || die - fi - - mv libs/libopenblas* . || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile -} - -src_test() { - my_src_test () { - local openblas_flags=$(get_openblas_flags) - emake tests ${openblas_flags} - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test -} - -src_install() { - my_src_install() { - local openblas_flags=$(get_openblas_flags) - local profname=$(numeric-int64_get_module_name) - local pcfile - # The file /usr/include/openblas/openblas_config.h is generated during the install. - # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT - # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 - # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in - # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. - sed -e '/#define USE64BITINT/d' \ - -e '/#define ARCH_X86/d' \ - -e '/#define __\(32\|64\)BIT__/d' \ - -i config_last.h \ - || die "Could not ensure there is no definition of USE64BITINT in config_last.h" - emake install \ - DESTDIR="${D}" PREFIX="${EPREFIX}" ${openblas_flags} \ - OPENBLAS_INCLUDE_DIR='$(PREFIX)'/usr/include/${PN} \ - OPENBLAS_LIBRARY_DIR='$(PREFIX)'/usr/$(get_libdir) - if ! use static-libs; then - rm "${ED}"usr/$(get_libdir)/lib*.a || die - fi - - local openblas_abi_cflags=$(get_openblas_abi_cflags) - local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) - local libname="${profname//-/_}" - - create_pkgconfig \ - --name "${profname}" \ - --libs "-l${libname}" \ - --libs-private "-lm" \ - --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ - ${profname} - - if [[ ${CHOST} == *-darwin* ]] ; then - cd "${ED}"/usr/$(get_libdir) || die - local d - for d in *.dylib; do - ebegin "Correcting install_name of ${d}" - install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die - eend $? - done - fi - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then - multilib_prepare_wrappers - multilib_check_headers - fi - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install - - printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh || die - numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} - numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} - - multilib_install_wrappers - - dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt -} diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild deleted file mode 100644 index e4ed2800f..000000000 --- a/sci-libs/openblas/openblas-9999.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -NUMERIC_MODULE_NAME="openblas" - -inherit alternatives-2 eutils git-r3 multilib numeric numeric-int64-multibuild - -DESCRIPTION="Optimized BLAS library based on GotoBLAS2" -HOMEPAGE="http://xianyi.github.com/OpenBLAS/" -SRC_URI="https://dev.gentoo.org/~gienah/distfiles/${PN}-0.2.11-gentoo.patch" -EGIT_REPO_URI="https://github.com/xianyi/OpenBLAS.git" -EGIT_BRANCH="develop" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="" -IUSE="dynamic openmp static-libs threads" - -RDEPEND="" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/openblas/openblas_config.h -) - -PATCHES=( - "${DISTDIR}"/${PN}-0.2.11-gentoo.patch -) - -get_openblas_flags() { - local openblas_flags=() - use dynamic && \ - openblas_flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 ) - $(numeric-int64_is_int64_build) && \ - openblas_flags+=( INTERFACE64=1 ) - # choose posix threads over openmp when the two are set - # yet to see the need of having the two profiles simultaneously - if use threads; then - openblas_flags+=( USE_THREAD=1 USE_OPENMP=0 ) - elif use openmp; then - openblas_flags+=( USE_OPENMP=1 ) - fi - local profname=$(numeric-int64_get_module_name) - local libname="${profname//-/_}" - local underscoresuffix="${libname#${PN}}" - if [[ "${underscoresuffix}" != "_" ]]; then - local libnamesuffix="${underscoresuffix#_}" - openblas_flags+=( LIBNAMESUFFIX=${libnamesuffix} ) - fi - - [[ "${ABI}" == "x86" ]] && openblas_flags+=( BINARY=32 ) - - echo "${openblas_flags[@]}" -} - -get_openblas_abi_cflags() { - local openblas_abi_cflags=() - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1 ) - else - openblas_abi_cflags=( -DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1 ) - fi - $(numeric-int64_is_int64_build) && \ - openblas_abi_cflags+=( -DOPENBLAS_USE64BITINT ) - echo "${openblas_abi_cflags[@]}" -} - -src_prepare() { - default - - # lapack and lapacke are not modified from upstream lapack - sed \ - -e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \ - -e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \ - -i Makefile.rule || die - numeric-int64-multibuild_copy_sources -} - -src_configure() { - blas_configure() { - local openblas_abi_cflags="$(get_openblas_abi_cflags)" - local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" - sed \ - -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ - -i Makefile.rule || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir blas_configure -} - -src_compile() { - # openblas already does multi-jobs - MAKEOPTS+=" -j1" - my_src_compile () { - local openblas_flags=$(get_openblas_flags) - # cflags already defined twice - unset CFLAGS || die - emake clean && emake libs shared ${openblas_flags} - mkdir -p libs && mv libopenblas* libs/ || die - # avoid pic when compiling static libraries, so re-compiling - if use static-libs; then - emake clean - emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC= - mv libopenblas* libs/ || die - fi - - mv libs/libopenblas* . || die - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_compile -} - -src_test() { - my_src_test () { - local openblas_flags=$(get_openblas_flags) - emake tests ${openblas_flags} - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_test -} - -src_install() { - my_src_install() { - local openblas_flags=$(get_openblas_flags) - local profname=$(numeric-int64_get_module_name) - local pcfile - # The file /usr/include/openblas/openblas_config.h is generated during the install. - # The sed on config_last.h removes the #define's OPENBLAS_USE64BITINT - # OPENBLASS__32BIT__ OPENBLASS__64BIT__ OPENBLAS__ARCH_X86 OPENBLAS__ARCH_X86_64 - # from /usr/include/openblas/openblas_config.h. We then specify it in Cflags in - # the /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file. - sed -e '/#define USE64BITINT/d' \ - -e '/#define ARCH_X86/d' \ - -e '/#define __\(32\|64\)BIT__/d' \ - -i config_last.h \ - || die "Could not ensure there is no definition of USE64BITINT in config_last.h" - emake install \ - PREFIX="${ED}"usr ${openblas_flags} \ - OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \ - OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir) - if ! use static-libs; then - rm "${ED}"usr/$(get_libdir)/lib*.a || die - fi - - local openblas_abi_cflags=$(get_openblas_abi_cflags) - local openblas_abi_fflags=$(numeric-int64_get_fortran_int64_abi_fflags) - local libname="${profname//-/_}" - - create_pkgconfig \ - --name "${profname}" \ - --libs "-L\${libdir} -l${libname}" \ - --libs-private "-lm" \ - --cflags "-I\${includedir}/${PN} ${openblas_abi_cflags}" \ - ${profname} - - if [[ ${CHOST} == *-darwin* ]] ; then - cd "${ED}"/usr/$(get_libdir) || die - local d - for d in *.dylib; do - ebegin "Correcting install_name of ${d}" - install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}" || die - eend $? - done - fi - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then - multilib_prepare_wrappers - multilib_check_headers - fi - } - numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir my_src_install - - printf "/usr/include/cblas.h ${PN}/cblas.h" > "${T}"/alternative-cblas-generic.sh - numeric-int64-multibuild_install_alternative blas ${NUMERIC_MODULE_NAME} - numeric-int64-multibuild_install_alternative cblas ${NUMERIC_MODULE_NAME} - - multilib_install_wrappers - - dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt *md Changelog.txt -}
