Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/blis/files/, sci-libs/blis/
Date: Fri, 30 Sep 2022 12:10:10
Message-Id: 1664539796.834c70df02cc32759474c76ebb1f069b7ad550fb.andrewammerlaan@gentoo
1 commit: 834c70df02cc32759474c76ebb1f069b7ad550fb
2 Author: Zhang Zongyu <zongyu <AT> novazy <DOT> net>
3 AuthorDate: Thu Sep 29 12:45:36 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 12:09:56 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=834c70df
7
8 sci-libs/blis: bump version to 0.9.0
9
10 Closes: https://bugs.gentoo.org/693470
11 Closes: https://bugs.gentoo.org/841440
12 Package-Manager: Portage-3.0.30, Repoman-3.0.3
13 Signed-off-by: Zhang Zongyu <zongyu <AT> novazy.net>
14 Closes: https://github.com/gentoo/gentoo/pull/27534
15 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
16
17 sci-libs/blis/Manifest | 1 +
18 sci-libs/blis/blis-0.9.0.ebuild | 113 +++++++++++++++++++++++++++++
19 sci-libs/blis/files/blis-0.9.0-rpath.patch | 15 ++++
20 3 files changed, 129 insertions(+)
21
22 diff --git a/sci-libs/blis/Manifest b/sci-libs/blis/Manifest
23 index ec8f4283416a..5e90ff7400e3 100644
24 --- a/sci-libs/blis/Manifest
25 +++ b/sci-libs/blis/Manifest
26 @@ -1,2 +1,3 @@
27 DIST blis-0.6.0.tar.gz 5107257 BLAKE2B cd589ad1216486e8bb0cf574cc096c1e1f2bb9587b182c2bcff44db322468d9f027323c0bf2d22ea0fabb1902dc047d2bf62253ef1c2797fc3de9ba53d7fc34a SHA512 74e9da5146f7986cbd11651d7cd0837562a1603c667b9e6d3f79b5057443de657b60d7463cb2d64daf3eff7d33fc05a64e6d8eb807f4cabe0c3121517924a206
28 DIST blis-0.8.1.tar.gz 13442609 BLAKE2B cc4167aaa6461b73876f428de2ab02107803fd6d63df101bf30de4c6ca57241e29f09dfb82fe1cfec8c661b2d9efe65ab854ad7719bf36e27f8a33bf3dd4bb92 SHA512 f920e6ae699af899caca27274b55bb944c886c882dfc06bc2f66d069c08e6d4999c130626cd96297308c1b7e85e77e6552bf981cce37dbbaa5acdf0cb5078e02
29 +DIST blis-0.9.0.tar.gz 15078619 BLAKE2B f7c9632024e0adbba370a4077a7a47f05c54779ad6195b2ccda0950df8e784b8988b4338758ec2fabd424a69009010f8f02cbaef0eda1d74f6794127b43b4f70 SHA512 01e1990eefa4387839ac404089e4ffa32922ceaa30a1747c08a931c67706bcf29fed9d25e30c0faa36bba4f460821290e7973ed6b657d2cd95e126caaf853f81
30
31 diff --git a/sci-libs/blis/blis-0.9.0.ebuild b/sci-libs/blis/blis-0.9.0.ebuild
32 new file mode 100644
33 index 000000000000..9e2aa275f970
34 --- /dev/null
35 +++ b/sci-libs/blis/blis-0.9.0.ebuild
36 @@ -0,0 +1,113 @@
37 +# Copyright 2019-2022 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=8
41 +
42 +PYTHON_COMPAT=( python3_{8..11} )
43 +inherit python-any-r1
44 +
45 +DESCRIPTION="BLAS-like Library Instantiation Software Framework"
46 +HOMEPAGE="https://github.com/flame/blis"
47 +SRC_URI="https://github.com/flame/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
48 +
49 +LICENSE="BSD"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~ppc64 ~x86"
52 +IUSE="doc eselect-ldso openmp pthread serial static-libs 64bit-index"
53 +REQUIRED_USE="
54 + ?? ( openmp pthread serial )
55 + ?? ( eselect-ldso 64bit-index )"
56 +
57 +DEPEND="
58 + eselect-ldso? (
59 + !app-eselect/eselect-cblas
60 + >=app-eselect/eselect-blas-0.2
61 + )"
62 +
63 +RDEPEND="${DEPEND}"
64 +BDEPEND="${PYTHON_DEPS}"
65 +
66 +PATCHES=(
67 + "${FILESDIR}"/${PN}-0.6.0-blas-provider.patch
68 + # to prevent QA Notice: pkg-config files with wrong LDFLAGS detected
69 + "${FILESDIR}"/${PN}-0.8.1-pkg-config.patch
70 + "${FILESDIR}"/${PN}-0.9.0-rpath.patch
71 +)
72 +
73 +src_configure() {
74 + local BLIS_FLAGS=()
75 + local confname
76 + # determine flags
77 + if use openmp; then
78 + BLIS_FLAGS+=( -t openmp )
79 + elif use pthread; then
80 + BLIS_FLAGS+=( -t pthreads )
81 + else
82 + BLIS_FLAGS+=( -t no )
83 + fi
84 + use 64bit-index && BLIS_FLAGS+=( -b 64 -i 64 )
85 + # determine config name
86 + case "${ARCH}" in
87 + "x86" | "amd64")
88 + confname=auto ;;
89 + "ppc64")
90 + confname=generic ;;
91 + *)
92 + confname=generic ;;
93 + esac
94 + # This is not an autotools configure file. We don't use econf here.
95 + ./configure \
96 + --enable-verbose-make \
97 + --prefix="${BROOT}"/usr \
98 + --libdir="${BROOT}"/usr/$(get_libdir) \
99 + $(use_enable static-libs static) \
100 + --enable-blas \
101 + --enable-cblas \
102 + "${BLIS_FLAGS[@]}" \
103 + --enable-shared \
104 + $confname || die
105 +}
106 +
107 +src_compile() {
108 + DEB_LIBBLAS=libblas.so.3 DEB_LIBCBLAS=libcblas.so.3 \
109 + LDS_BLAS="${FILESDIR}"/blas.lds LDS_CBLAS="${FILESDIR}"/cblas.lds \
110 + default
111 +}
112 +
113 +src_test() {
114 + LD_LIBRARY_PATH="${S}/lib/haswell" emake check
115 +}
116 +
117 +src_install() {
118 + default
119 + use doc && dodoc README.md docs/*.md
120 +
121 + if use eselect-ldso; then
122 + insinto /usr/$(get_libdir)/blas/blis
123 + doins lib/*/lib{c,}blas.so.3
124 + dosym libblas.so.3 usr/$(get_libdir)/blas/blis/libblas.so
125 + dosym libcblas.so.3 usr/$(get_libdir)/blas/blis/libcblas.so
126 + fi
127 +}
128 +
129 +pkg_postinst() {
130 + use eselect-ldso || return
131 +
132 + local libdir=$(get_libdir) me="blis"
133 +
134 + # check blas
135 + eselect blas add ${libdir} "${EROOT}"/usr/${libdir}/blas/${me} ${me}
136 + local current_blas=$(eselect blas show ${libdir} | cut -d' ' -f2)
137 + if [[ ${current_blas} == "${me}" || -z ${current_blas} ]]; then
138 + eselect blas set ${libdir} ${me}
139 + elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
140 + else
141 + elog "Current eselect: BLAS/CBLAS ($libdir) -> [${current_blas}]."
142 + elog "To use blas [${me}] implementation, you have to issue (as root):"
143 + elog "\t eselect blas set ${libdir} ${me}"
144 + fi
145 +}
146 +
147 +pkg_postrm() {
148 + use eselect-ldso && eselect blas validate
149 +}
150
151 diff --git a/sci-libs/blis/files/blis-0.9.0-rpath.patch b/sci-libs/blis/files/blis-0.9.0-rpath.patch
152 new file mode 100644
153 index 000000000000..9687a6c9428b
154 --- /dev/null
155 +++ b/sci-libs/blis/files/blis-0.9.0-rpath.patch
156 @@ -0,0 +1,15 @@
157 +diff -Nur a/common.mk b/common.mk
158 +--- a/common.mk 2022-09-29 16:54:14.414899248 +0800
159 ++++ b/common.mk 2022-09-29 16:54:32.915666662 +0800
160 +@@ -591,9 +591,9 @@
161 + LDFLAGS += -Wl,-rpath,@executable_path/../../../$(BASE_LIB_PATH)
162 + else
163 + # rpath for test_libblis.x
164 +-LDFLAGS += -Wl,-rpath,'$$ORIGIN/$(BASE_LIB_PATH)'
165 ++#LDFLAGS += -Wl,-rpath,'$$ORIGIN/$(BASE_LIB_PATH)'
166 + # rpath for BLAS tests
167 +-LDFLAGS += -Wl,-rpath,'$$ORIGIN/../../../$(BASE_LIB_PATH)'
168 ++#LDFLAGS += -Wl,-rpath,'$$ORIGIN/../../../$(BASE_LIB_PATH)'
169 + endif
170 + endif
171 + endif