aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2020-10-18 13:40:05 +0000
committerAisha Tammy <gentoo@aisha.cc>2020-10-18 13:40:43 +0000
commit021b32169342a024ef3c46a66f507418c296a516 (patch)
tree4627faf630674b8031fd3f0f77a6b611098ff8ff /sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild
parentsci-biology/RSeQC: version bump (diff)
downloadsci-021b32169342a024ef3c46a66f507418c296a516.tar.gz
sci-021b32169342a024ef3c46a66f507418c296a516.tar.bz2
sci-021b32169342a024ef3c46a66f507418c296a516.zip
sci-libs/aocl-libm: update to 3.6.0-4
move sci-libs/amdlibm to better package name Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild')
-rw-r--r--sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild b/sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild
new file mode 100644
index 000000000..44b708101
--- /dev/null
+++ b/sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+MY_PV=${PV/_p/-}
+
+DESCRIPTION="Optimized libm replacement from AMD for x86_64 architectures"
+HOMEPAGE="https://developer.amd.com/amd-aocl/amd-math-library-libm/"
+SRC_URI="
+ aocc? ( aocl-libm-linux-aocc-${MY_PV}.tar.gz )
+ !aocc? ( aocl-libm-linux-gcc-${MY_PV}.tar.gz )
+"
+S="${WORKDIR}"/amd-libm
+
+LICENSE="AMD"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~amd64-linux"
+IUSE="aocc examples static-libs test"
+RESTRICT="fetch strip !test? ( test )"
+
+QA_PREBUILT="*"
+QA_TEXTRELS="*"
+
+pkg_nofetch() {
+ einfo "The package's license prohibits redistribution."
+ einfo "Please download the package from"
+ einfo "\t ${HOMEPAGE}"
+ einfo "and place it into ${DISTDIR}."
+}
+
+src_prepare() {
+ default
+
+ sed -e "s/^CC =.*$/CC = $(tc-getCC)/" -i examples/Makefile || die
+
+ cat <<- EOF > "${T}"/amdlibm.pc
+ prefix=${EROOT}/usr
+ exec_prefix=\${prefix}
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${MY_PV}
+ Libs: -L\${libdir} -lamdlibm
+ Cflags: -I\${includedir}
+ EOF
+}
+
+src_test() {
+ cd examples || die
+ AOCL_ROOT=".." emake test_libm
+ LD_LIBRARY_PATH=../lib ./test_libm || die
+}
+
+src_install() {
+ dodoc ReleaseNotes.txt
+
+ doheader include/*
+
+ dolib.so lib/libamdlibm.so
+ use static-libs && \
+ dolib.a lib/libamdlibm.a
+
+ if use examples; then
+ dodoc -r examples
+ fi
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${T}"/amdlibm.pc
+}