public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/amdlibm/, sci-libs/aocl-libm/
@ 2020-10-18 13:40 Aisha Tammy
  0 siblings, 0 replies; only message in thread
From: Aisha Tammy @ 2020-10-18 13:40 UTC (permalink / raw
  To: gentoo-commits

commit:     021b32169342a024ef3c46a66f507418c296a516
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Sun Oct 18 13:40:05 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Sun Oct 18 13:40:43 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=021b3216

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 <AT> aisha.cc>

 sci-libs/amdlibm/amdlibm-3.1.ebuild          | 72 ---------------------------
 sci-libs/amdlibm/metadata.xml                | 13 -----
 sci-libs/aocl-libm/aocl-libm-3.6.0_p4.ebuild | 74 ++++++++++++++++++++++++++++
 sci-libs/aocl-libm/metadata.xml              | 16 ++++++
 4 files changed, 90 insertions(+), 85 deletions(-)

diff --git a/sci-libs/amdlibm/amdlibm-3.1.ebuild b/sci-libs/amdlibm/amdlibm-3.1.ebuild
deleted file mode 100644
index 1253d1006..000000000
--- a/sci-libs/amdlibm/amdlibm-3.1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit multilib
-
-MYP=${PN}-${PV}-lin64
-
-DESCRIPTION="Optimized libm replacement from AMD for x86_64 architectures"
-HOMEPAGE="http://developer.amd.com/tools/cpu-development/libm/"
-SRC_URI="${MYP}.tar.gz"
-LICENSE="AMD"
-SLOT="0"
-KEYWORDS="-* ~amd64 ~amd64-linux"
-IUSE="examples static-libs"
-RESTRICT="fetch strip"
-
-S="${WORKDIR}/${MYP}"
-
-QA_PREBUILT="opt/${PN}/$(get_libdir)/lib${PN}.so"
-QA_TEXTRELS="${QA_PREBUILT}"
-
-pkg_nofetch() {
-	einfo "The package's license prohibits redistribution."
-	einfo "Please download ${A} from"
-	einfo "   ${HOMEPAGE}"
-	einfo "and place it into ${DISTDIR}."
-}
-
-src_prepare() {
-	cat <<- EOF > "${T}"/99${PN}
-		LDPATH="${EROOT%/}/opt/${PN}/$(get_libdir)"
-	EOF
-
-	cat <<- EOF > "${T}"/${PN}.pc
-		prefix=${EROOT%/}/opt/${PN}
-		exec_prefix=\${prefix}
-		libdir=\${prefix}/$(get_libdir)
-		includedir=\${prefix}/include
-		Name: ${PN}
-		Description: ${DESCRIPTION}
-		Version: ${PV}
-		Libs: -L\${libdir} -l${PN}
-		Cflags: -I\${includedir}
-	EOF
-}
-
-src_test() {
-	cd examples || die
-	sh build_and_run.sh || die
-}
-
-src_install() {
-	dodoc ReleaseNotes.txt
-
-	into /opt/${PN}
-	dolib.so lib/dynamic/lib${PN}.so
-	use static-libs && dolib.a lib/static/lib${PN}.a
-
-	insinto /opt/${PN}
-	doins -r include
-
-	if use examples; then
-		insinto /usr/share/doc/${PF}
-		doins -r examples
-	fi
-
-	insinto /usr/$(get_libdir)/pkgconfig
-	doins "${T}"/${PN}.pc
-	doenvd "${T}"/99${PN}
-}

diff --git a/sci-libs/amdlibm/metadata.xml b/sci-libs/amdlibm/metadata.xml
deleted file mode 100644
index 51af055a9..000000000
--- a/sci-libs/amdlibm/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="project">
-		<email>sci@gentoo.org</email>
-		<name>Gentoo Science Project</name>
-	</maintainer>
-	<longdescription lang="en">
-AMD LibM is a software library containing a collection of basic math
-functions optimized for x86-64 processor based machines. It provides
-many routines from the list of standard C99 math functions.
-</longdescription>
-</pkgmetadata>

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
+}

diff --git a/sci-libs/aocl-libm/metadata.xml b/sci-libs/aocl-libm/metadata.xml
new file mode 100644
index 000000000..8c9afa236
--- /dev/null
+++ b/sci-libs/aocl-libm/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>sci@gentoo.org</email>
+		<name>Gentoo Science Project</name>
+	</maintainer>
+	<longdescription lang="en">
+		AMD LibM is a software library containing a collection of basic math
+		functions optimized for x86-64 processor based machines. It provides
+		many routines from the list of standard C99 math functions.
+	</longdescription>
+	<use>
+		<flag name="aocc">install the library built using AOCC, else use the GCC version</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-18 13:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-18 13:40 [gentoo-commits] proj/sci:master commit in: sci-libs/amdlibm/, sci-libs/aocl-libm/ Aisha Tammy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox