Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/
Date: Tue, 27 Oct 2020 23:23:58
Message-Id: 1603841025.277fe39c845244cf99ca4960d26b62473232c6b7.sam@gentoo
1 commit: 277fe39c845244cf99ca4960d26b62473232c6b7
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Fri Oct 23 11:48:32 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 27 23:23:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=277fe39c
7
8 sci-libs/openlibm: version bump to 0.7.2
9
10 fix CC AR and other toolchain calls
11
12 Closes: https://bugs.gentoo.org/723032
13
14 Package-Manager: Portage-3.0.8, Repoman-3.0.1
15 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 sci-libs/openlibm/Manifest | 1 +
19 .../openlibm/files/openlibm-0.7.2-make_inc.patch | 81 ++++++++++++++++++++++
20 sci-libs/openlibm/openlibm-0.7.2.ebuild | 34 +++++++++
21 3 files changed, 116 insertions(+)
22
23 diff --git a/sci-libs/openlibm/Manifest b/sci-libs/openlibm/Manifest
24 index fc8781749c6..6f48d397a00 100644
25 --- a/sci-libs/openlibm/Manifest
26 +++ b/sci-libs/openlibm/Manifest
27 @@ -1,2 +1,3 @@
28 DIST openlibm-0.5.4.tar.gz 353072 BLAKE2B 2427d207f3b45a5b2a80c3405a6a749c8d62409eea0adb31f26eda6a5dc370f242f5874a6783ada79972ac22183bb55448de683290f4c052967e2e598367f011 SHA512 ca74936b9eb7a52566cc509ffb98dd9e1672cd4029ba0193162505e53fe671b8903c37ef4036c15d0872ca246079a792d1630f3a93024010ff0c232f78295192
29 DIST openlibm-0.7.0.tar.gz 366359 BLAKE2B 9dc545e3effedaadefda31ae75759ac8e5afb74250e8a7d9016b1406c235a298a375641207d3561365d750ec442e5ecdbfb1ce8b179a17bdaa48a5e2d5e5af25 SHA512 e52245ea93513fb1d9eade348f7c4ad4f1b500944024f7d52d71d43af908059e581ea77df6fc879414ff17c860263debec3aaf6ac86eea03ee1fe23d180487ed
30 +DIST openlibm-0.7.2.tar.gz 366285 BLAKE2B 0086d026e53c337e20dc895dad38157308b16392f590c8a2c2f7699f2bb8bd5bd0d1931672c2d31a320af0a5ad1cc2e10f2eeb953f30382cfcae5aaac0adc478 SHA512 25e5c28ef898d905ff589d24efb87a99f3772d59596ad5660afc7cafbcd709bca167e863aadc84b90b930add036d285db1332faa9adf1b73562abf1185b9ee5c
31
32 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
33 new file mode 100644
34 index 00000000000..dc42a98c68d
35 --- /dev/null
36 +++ b/sci-libs/openlibm/files/openlibm-0.7.2-make_inc.patch
37 @@ -0,0 +1,81 @@
38 +diff --git a/Make.inc b/Make.inc
39 +index adeb33d..36520f0 100644
40 +--- a/Make.inc
41 ++++ b/Make.inc
42 +@@ -10,41 +10,41 @@ VERSION = 0.7.0
43 + SOMAJOR = 3
44 + SOMINOR = 0
45 + DESTDIR =
46 +-prefix = /usr/local
47 +-bindir = $(prefix)/bin
48 +-libdir = $(prefix)/lib
49 +-includedir = $(prefix)/include
50 ++prefix ?= /usr/local
51 ++bindir ?= $(prefix)/bin
52 ++libdir ?= $(prefix)/lib
53 ++includedir ?= $(prefix)/include
54 +
55 + ifeq ($(OS), FreeBSD)
56 +-pkgconfigdir = $(prefix)/libdata/pkgconfig
57 ++pkgconfigdir ?= $(prefix)/libdata/pkgconfig
58 + else
59 +-pkgconfigdir = $(libdir)/pkgconfig
60 ++pkgconfigdir ?= $(libdir)/pkgconfig
61 + endif
62 +
63 +-USEGCC = 1
64 +-USECLANG = 0
65 ++USEGCC ?= 1
66 ++USECLANG ?= 0
67 +
68 + ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
69 +-USEGCC = 0
70 +-USECLANG = 1
71 ++USEGCC ?= 0
72 ++USECLANG ?= 1
73 + endif
74 +
75 + AR = $(TOOLPREFIX)ar
76 +
77 + ifeq ($(ARCH),wasm32)
78 +-CC = clang-8
79 +-USEGCC = 0
80 ++CC ?= clang-8
81 ++USEGCC ?= 0
82 + CFLAGS_add += -fno-builtin -fno-strict-aliasing
83 + endif
84 +
85 + ifeq ($(USECLANG),1)
86 +-USEGCC = 0
87 +-CC = clang
88 ++USEGCC ?= 0
89 ++CC ?= clang
90 + CFLAGS_add += -fno-builtin -fno-strict-aliasing
91 + endif
92 +
93 + ifeq ($(USEGCC),1)
94 +-CC = $(TOOLPREFIX)gcc
95 ++CC ?= $(TOOLPREFIX)gcc
96 + CFLAGS_add += -fno-gnu89-inline -fno-builtin
97 + endif
98 +
99 +@@ -84,9 +84,6 @@ override ARCH := mips
100 + endif
101 +
102 + # If CFLAGS does not contain a -O optimization flag, default to -O3
103 +-ifeq ($(findstring -O,$(CFLAGS)),)
104 +-CFLAGS_add += -O3
105 +-endif
106 +
107 + ifneq (,$(findstring MINGW,$(OS)))
108 + override OS=WINNT
109 +@@ -111,9 +111,6 @@ shlibdir = $(libdir)
110 + endif
111 +
112 + # Add `-march` to our CFLAGS if it's defined
113 +-ifneq ($(MARCH),)
114 +-CFLAGS_arch += -march=$(MARCH)
115 +-endif
116 +
117 + ifeq ($(ARCH),i387)
118 + CFLAGS_arch += -m32
119
120 diff --git a/sci-libs/openlibm/openlibm-0.7.2.ebuild b/sci-libs/openlibm/openlibm-0.7.2.ebuild
121 new file mode 100644
122 index 00000000000..e3c9df31946
123 --- /dev/null
124 +++ b/sci-libs/openlibm/openlibm-0.7.2.ebuild
125 @@ -0,0 +1,34 @@
126 +# Copyright 1999-2020 Gentoo Authors
127 +# Distributed under the terms of the GNU General Public License v2
128 +
129 +EAPI=7
130 +
131 +inherit toolchain-funcs
132 +
133 +DESCRIPTION="High quality system independent, open source libm"
134 +HOMEPAGE="https://github.com/JuliaLang/openlibm"
135 +SRC_URI="https://github.com/JuliaMath/openlibm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
136 +
137 +LICENSE="public-domain MIT ISC BSD-2 LGPL-2.1+"
138 +SLOT="0/${PV}.0"
139 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
140 +
141 +PATCHES=( "${FILESDIR}"/${PN}-0.7.2-make_inc.patch )
142 +
143 +src_prepare() {
144 + default
145 + sed -e "/^OLM_LIBS :=/s/^/#/" \
146 + -e "/install: /s/install-static//" \
147 + -i Makefile || die
148 +}
149 +
150 +src_configure() {
151 + tc-export CC CXX FC AR LD
152 + default
153 +}
154 +
155 +src_install() {
156 + emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \
157 + libdir="${EPREFIX}/usr/$(get_libdir)" install
158 + dodoc README.md
159 +}