commit:     277fe39c845244cf99ca4960d26b62473232c6b7
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Fri Oct 23 11:48:32 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 27 23:23:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=277fe39c

sci-libs/openlibm: version bump to 0.7.2

fix CC AR and other toolchain calls

Closes: https://bugs.gentoo.org/723032

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/openlibm/Manifest                         |  1 +
 .../openlibm/files/openlibm-0.7.2-make_inc.patch   | 81 ++++++++++++++++++++++
 sci-libs/openlibm/openlibm-0.7.2.ebuild            | 34 +++++++++
 3 files changed, 116 insertions(+)

diff --git a/sci-libs/openlibm/Manifest b/sci-libs/openlibm/Manifest
index fc8781749c6..6f48d397a00 100644
--- a/sci-libs/openlibm/Manifest
+++ b/sci-libs/openlibm/Manifest
@@ -1,2 +1,3 @@
 DIST openlibm-0.5.4.tar.gz 353072 BLAKE2B 
2427d207f3b45a5b2a80c3405a6a749c8d62409eea0adb31f26eda6a5dc370f242f5874a6783ada79972ac22183bb55448de683290f4c052967e2e598367f011
 SHA512 
ca74936b9eb7a52566cc509ffb98dd9e1672cd4029ba0193162505e53fe671b8903c37ef4036c15d0872ca246079a792d1630f3a93024010ff0c232f78295192
 DIST openlibm-0.7.0.tar.gz 366359 BLAKE2B 
9dc545e3effedaadefda31ae75759ac8e5afb74250e8a7d9016b1406c235a298a375641207d3561365d750ec442e5ecdbfb1ce8b179a17bdaa48a5e2d5e5af25
 SHA512 
e52245ea93513fb1d9eade348f7c4ad4f1b500944024f7d52d71d43af908059e581ea77df6fc879414ff17c860263debec3aaf6ac86eea03ee1fe23d180487ed
+DIST openlibm-0.7.2.tar.gz 366285 BLAKE2B 
0086d026e53c337e20dc895dad38157308b16392f590c8a2c2f7699f2bb8bd5bd0d1931672c2d31a320af0a5ad1cc2e10f2eeb953f30382cfcae5aaac0adc478
 SHA512 
25e5c28ef898d905ff589d24efb87a99f3772d59596ad5660afc7cafbcd709bca167e863aadc84b90b930add036d285db1332faa9adf1b73562abf1185b9ee5c

diff --git a/sci-libs/openlibm/files/openlibm-0.7.2-make_inc.patch 
b/sci-libs/openlibm/files/openlibm-0.7.2-make_inc.patch
new file mode 100644
index 00000000000..dc42a98c68d
--- /dev/null
+++ b/sci-libs/openlibm/files/openlibm-0.7.2-make_inc.patch
@@ -0,0 +1,81 @@
+diff --git a/Make.inc b/Make.inc
+index adeb33d..36520f0 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -10,41 +10,41 @@ VERSION = 0.7.0
+ SOMAJOR = 3
+ SOMINOR = 0
+ DESTDIR =
+-prefix = /usr/local
+-bindir = $(prefix)/bin
+-libdir = $(prefix)/lib
+-includedir = $(prefix)/include
++prefix ?= /usr/local
++bindir ?= $(prefix)/bin
++libdir ?= $(prefix)/lib
++includedir ?= $(prefix)/include
+ 
+ ifeq ($(OS), FreeBSD)
+-pkgconfigdir = $(prefix)/libdata/pkgconfig
++pkgconfigdir ?= $(prefix)/libdata/pkgconfig
+ else
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir ?= $(libdir)/pkgconfig
+ endif
+ 
+-USEGCC = 1
+-USECLANG = 0
++USEGCC ?= 1
++USECLANG ?= 0
+ 
+ ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
+-USEGCC = 0
+-USECLANG = 1
++USEGCC ?= 0
++USECLANG ?= 1
+ endif
+ 
+ AR = $(TOOLPREFIX)ar
+ 
+ ifeq ($(ARCH),wasm32)
+-CC = clang-8
+-USEGCC = 0
++CC ?= clang-8
++USEGCC ?= 0
+ CFLAGS_add += -fno-builtin -fno-strict-aliasing
+ endif
+ 
+ ifeq ($(USECLANG),1)
+-USEGCC = 0
+-CC = clang
++USEGCC ?= 0
++CC ?= clang
+ CFLAGS_add += -fno-builtin -fno-strict-aliasing
+ endif
+ 
+ ifeq ($(USEGCC),1)
+-CC = $(TOOLPREFIX)gcc
++CC ?= $(TOOLPREFIX)gcc
+ CFLAGS_add += -fno-gnu89-inline -fno-builtin
+ endif
+ 
+@@ -84,9 +84,6 @@ override ARCH := mips
+ endif
+ 
+ # If CFLAGS does not contain a -O optimization flag, default to -O3
+-ifeq ($(findstring -O,$(CFLAGS)),)
+-CFLAGS_add += -O3
+-endif
+ 
+ ifneq (,$(findstring MINGW,$(OS)))
+ override OS=WINNT
+@@ -111,9 +111,6 @@ shlibdir = $(libdir)
+ endif
+ 
+ # Add `-march` to our CFLAGS if it's defined
+-ifneq ($(MARCH),)
+-CFLAGS_arch += -march=$(MARCH)
+-endif
+ 
+ ifeq ($(ARCH),i387)
+ CFLAGS_arch  += -m32

diff --git a/sci-libs/openlibm/openlibm-0.7.2.ebuild 
b/sci-libs/openlibm/openlibm-0.7.2.ebuild
new file mode 100644
index 00000000000..e3c9df31946
--- /dev/null
+++ b/sci-libs/openlibm/openlibm-0.7.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="High quality system independent, open source libm"
+HOMEPAGE="https://github.com/JuliaLang/openlibm";
+SRC_URI="https://github.com/JuliaMath/openlibm/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="public-domain MIT ISC BSD-2 LGPL-2.1+"
+SLOT="0/${PV}.0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.7.2-make_inc.patch )
+
+src_prepare() {
+       default
+       sed -e "/^OLM_LIBS :=/s/^/#/" \
+           -e "/install: /s/install-static//" \
+       -i Makefile || die
+}
+
+src_configure() {
+       tc-export CC CXX FC AR LD
+       default
+}
+
+src_install() {
+       emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \
+               libdir="${EPREFIX}/usr/$(get_libdir)" install
+       dodoc README.md
+}

Reply via email to