Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/blis/, sci-libs/blis/files/
Date: Wed, 03 Jul 2019 13:01:39
Message-Id: 1562158888.d0944e08f322eed61cfcd1293792732a8eb72bfd.heroxbd@gentoo
1 commit: d0944e08f322eed61cfcd1293792732a8eb72bfd
2 Author: Mo Zhou <cdluminate <AT> gmail <DOT> com>
3 AuthorDate: Sun Jun 30 06:48:01 2019 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 3 13:01:28 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0944e08
7
8 sci-libs/blis: bump to 0.6.0, getting rid of a patch.
9
10 Closes: https://github.com/gentoo/gentoo/pull/12358
11 Signed-off-by: Mo Zhou <cdluminate <AT> gmail.com>
12 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
13
14 sci-libs/blis/Manifest | 1 +
15 sci-libs/blis/blis-0.6.0.ebuild | 106 +++++++++++++++++++++
16 sci-libs/blis/files/blis-0.6.0-blas-provider.patch | 13 +++
17 sci-libs/blis/files/blis-0.6.0-rpath.patch | 13 +++
18 4 files changed, 133 insertions(+)
19
20 diff --git a/sci-libs/blis/Manifest b/sci-libs/blis/Manifest
21 index 7d42eadf47b..a251246c916 100644
22 --- a/sci-libs/blis/Manifest
23 +++ b/sci-libs/blis/Manifest
24 @@ -1 +1,2 @@
25 DIST blis-0.5.2.tar.gz 3502383 BLAKE2B b09fda20711086c8bde0d4efc3f3c9b0f6072e1ddb8bd2846465877f0353cced27548abe1239b6a042fe655e85e4b7b3c960322e39b2c733866b8e17777718bd SHA512 4f91a7834ef0ed39544dd21856814467416a222240050cca323917b0fc61b9201ae4dbd109aa687cdecb27ddee5d6bf4510ef023e1c1dc73599faef0482d3d04
26 +DIST blis-0.6.0.tar.gz 5107257 BLAKE2B cd589ad1216486e8bb0cf574cc096c1e1f2bb9587b182c2bcff44db322468d9f027323c0bf2d22ea0fabb1902dc047d2bf62253ef1c2797fc3de9ba53d7fc34a SHA512 74e9da5146f7986cbd11651d7cd0837562a1603c667b9e6d3f79b5057443de657b60d7463cb2d64daf3eff7d33fc05a64e6d8eb807f4cabe0c3121517924a206
27
28 diff --git a/sci-libs/blis/blis-0.6.0.ebuild b/sci-libs/blis/blis-0.6.0.ebuild
29 new file mode 100644
30 index 00000000000..fd8ccbe5c4c
31 --- /dev/null
32 +++ b/sci-libs/blis/blis-0.6.0.ebuild
33 @@ -0,0 +1,106 @@
34 +# Copyright 2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +inherit eutils
39 +
40 +DESCRIPTION="BLAS-like Library Instantiation Software Framework"
41 +HOMEPAGE="https://github.com/flame/blis"
42 +SRC_URI="https://github.com/flame/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="BSD"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~ppc64 ~x86"
47 +IUSE="openmp pthread serial static-libs eselect-ldso doc 64bit-index"
48 +REQUIRED_USE="?? ( openmp pthread serial ) ?? ( eselect-ldso 64bit-index )"
49 +
50 +RDEPEND="eselect-ldso? ( !app-eselect/eselect-cblas
51 + >=app-eselect/eselect-blas-0.2 )"
52 +
53 +DEPEND="${RDEPEND}
54 + dev-lang/python
55 +"
56 +
57 +PATCHES=(
58 + "${FILESDIR}/${P}-rpath.patch"
59 + "${FILESDIR}/${P}-blas-provider.patch"
60 +)
61 +
62 +src_configure () {
63 + local BLIS_FLAGS=()
64 + local confname
65 + # determine flags
66 + if use openmp; then
67 + BLIS_FLAGS+=( -t openmp )
68 + elif use pthread; then
69 + BLIS_FLAGS+=( -t pthreads )
70 + else
71 + BLIS_FLAGS+=( -t no )
72 + fi
73 + use 64bit-index && BLIS_FLAGS+=( -b 64 -i 64 )
74 + # determine config name
75 + case "${ARCH}" in
76 + "x86" | "amd64")
77 + confname=auto ;;
78 + "ppc64")
79 + confname=generic ;;
80 + *)
81 + confname=generic ;;
82 + esac
83 + # This is not an autotools configure file. We don't use econf here.
84 + ./configure \
85 + --enable-verbose-make \
86 + --prefix="${BROOT}"/usr \
87 + --libdir="${BROOT}"/usr/$(get_libdir) \
88 + $(use_enable static-libs static) \
89 + --enable-blas \
90 + --enable-cblas \
91 + ${BLIS_FLAGS[@]} \
92 + --enable-shared \
93 + $confname || die
94 +}
95 +
96 +src_compile() {
97 + DEB_LIBBLAS=libblas.so.3 DEB_LIBCBLAS=libcblas.so.3 \
98 + LDS_BLAS="${FILESDIR}"/blas.lds LDS_CBLAS="${FILESDIR}"/cblas.lds \
99 + default
100 +}
101 +
102 +src_test () {
103 + emake check
104 +}
105 +
106 +src_install () {
107 + default
108 + use doc && dodoc README.md docs/*.md
109 +
110 + if use eselect-ldso; then
111 + dodir /usr/$(get_libdir)/blas/blis
112 + insinto /usr/$(get_libdir)/blas/blis
113 + doins lib/*/lib{c,}blas.so.3
114 + dosym libblas.so.3 usr/$(get_libdir)/blas/blis/libblas.so
115 + dosym libcblas.so.3 usr/$(get_libdir)/blas/blis/libcblas.so
116 + fi
117 +}
118 +
119 +pkg_postinst() {
120 + use eselect-ldso || return
121 +
122 + local libdir=$(get_libdir) me="blis"
123 +
124 + # check blas
125 + eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
126 + local current_blas=$(eselect blas show ${libdir})
127 + if [[ ${current_blas} == blis || -z ${current_blas} ]]; then
128 + eselect blas set ${libdir} ${me}
129 + elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
130 + else
131 + elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
132 + elog "To use blas [${me}] implementation, you have to issue (as root):"
133 + elog "\t eselect blas set ${libdir} ${me}"
134 + fi
135 +}
136 +
137 +pkg_postrm() {
138 + use eselect-ldso && eselect blas validate
139 +}
140
141 diff --git a/sci-libs/blis/files/blis-0.6.0-blas-provider.patch b/sci-libs/blis/files/blis-0.6.0-blas-provider.patch
142 new file mode 100644
143 index 00000000000..5999f847929
144 --- /dev/null
145 +++ b/sci-libs/blis/files/blis-0.6.0-blas-provider.patch
146 @@ -0,0 +1,13 @@
147 +diff --git a/Makefile b/Makefile
148 +index 2d31fee..7008682 100644
149 +--- a/Makefile
150 ++++ b/Makefile
151 +@@ -659,6 +659,8 @@ else
152 + @$(LINKER) $(SOFLAGS) -o $(LIBBLIS_SO_OUTPUT_NAME) $? $(LDFLAGS)
153 + endif
154 + endif
155 ++ $(LINKER) $(SOFLAGS) -o $(BASE_LIB_PATH)/$(DEB_LIBBLAS) $? $(LDFLAGS) -Wl,--soname,$(DEB_LIBBLAS) -Wl,--version-script=$(LDS_BLAS)
156 ++ $(LINKER) $(SOFLAGS) -o $(BASE_LIB_PATH)/$(DEB_LIBCBLAS) $? $(LDFLAGS) -Wl,--soname,$(DEB_LIBCBLAS) -Wl,--version-script=$(LDS_CBLAS)
157 +
158 + # Local symlink for shared library.
159 + # NOTE: We use a '.loc' suffix to avoid filename collisions in case this
160
161 diff --git a/sci-libs/blis/files/blis-0.6.0-rpath.patch b/sci-libs/blis/files/blis-0.6.0-rpath.patch
162 new file mode 100644
163 index 00000000000..a8b5a46870d
164 --- /dev/null
165 +++ b/sci-libs/blis/files/blis-0.6.0-rpath.patch
166 @@ -0,0 +1,13 @@
167 +diff --git a/common.mk b/common.mk
168 +index ef0acfb..e1ce31d 100644
169 +--- a/common.mk
170 ++++ b/common.mk
171 +@@ -527,7 +527,7 @@ LIBBLIS_L := $(LIBBLIS_SO)
172 + LIBBLIS_LINK := $(LIBBLIS_SO_PATH)
173 + ifeq ($(IS_WIN),no)
174 + # For Linux and OS X: set rpath property of shared object.
175 +-LDFLAGS += -Wl,-rpath,$(BASE_LIB_PATH)
176 ++#LDFLAGS += -Wl,-rpath,$(BASE_LIB_PATH)
177 + endif
178 + endif
179 + endif