* [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/
@ 2020-10-27 23:23 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2020-10-27 23:23 UTC (permalink / raw
To: gentoo-commits
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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/
@ 2025-01-05 12:15 WANG Xuerui
0 siblings, 0 replies; 2+ messages in thread
From: WANG Xuerui @ 2025-01-05 12:15 UTC (permalink / raw
To: gentoo-commits
commit: fce668b700ebc88e5b4d26c002a1888adcf1e86f
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 5 12:03:08 2025 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Sun Jan 5 12:09:58 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce668b7
sci-libs/openlibm: add support for loong, fix riscv build
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
.../openlibm-0.8.3-fix-loong-riscv-fenv.patch | 27 ++++++++++++++++++++++
sci-libs/openlibm/openlibm-0.8.3.ebuild | 10 +++++---
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch b/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch
new file mode 100644
index 000000000000..3e66dfaa46a9
--- /dev/null
+++ b/sci-libs/openlibm/files/openlibm-0.8.3-fix-loong-riscv-fenv.patch
@@ -0,0 +1,27 @@
+https://github.com/JuliaMath/openlibm/commit/c4667caea25ae3487adf6760b4a1dcf32477a4b8
+https://github.com/JuliaMath/openlibm/pull/308
+shipped in openlibm 0.8.4
+From: Li Bohai <lbhlbhlbh2002@icloud.com>
+Date: Sat, 9 Nov 2024 21:40:26 +0800
+Subject: [PATCH] Fix fenv_t initializer (#308)
+
+--- a/loongarch64/fenv.c
++++ b/loongarch64/fenv.c
+@@ -1,5 +1,5 @@
+ #define __fenv_static
+-#include <fenv.h>
++#include <openlibm_fenv.h>
+
+ #ifdef __GNUC_GNU_INLINE__
+ #error "This file must be compiled with C99 'inline' semantics"
+--- a/riscv64/fenv.c
++++ b/riscv64/fenv.c
+@@ -27,7 +27,7 @@
+ */
+
+ #define __fenv_static
+-#include "fenv.h"
++#include <openlibm_fenv.h>
+
+ #ifdef __GNUC_GNU_INLINE__
+ #error "This file must be compiled with C99 'inline' semantics"
diff --git a/sci-libs/openlibm/openlibm-0.8.3.ebuild b/sci-libs/openlibm/openlibm-0.8.3.ebuild
index 1b03b5cf145c..4a83d97ac718 100644
--- a/sci-libs/openlibm/openlibm-0.8.3.ebuild
+++ b/sci-libs/openlibm/openlibm-0.8.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -17,6 +17,7 @@ KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux"
PATCHES=(
"${FILESDIR}"/${P}-stack-protection.patch
+ "${FILESDIR}"/${P}-fix-loong-riscv-fenv.patch
)
src_prepare() {
@@ -28,8 +29,11 @@ src_prepare() {
}
src_compile() {
- # Build system uses the riscv64 arch variable
- use riscv && export ARCH=riscv64
+ # Build system uses different ARCH for the following arches
+ case "${ARCH}" in
+ loong) export ARCH=loongarch64 ;;
+ riscv) export ARCH=riscv64 ;;
+ esac
emake \
CC="$(tc-getCC)" \
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-05 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-05 12:15 [gentoo-commits] repo/gentoo:master commit in: sci-libs/openlibm/, sci-libs/openlibm/files/ WANG Xuerui
-- strict thread matches above, loose matches on Subject: below --
2020-10-27 23:23 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox