summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-10-07 11:02:09 +0200
committerJakov Smolić <jsmolic@gentoo.org>2021-10-07 11:02:09 +0200
commit62e3ddc88fe4221b322dde8c0e11347889970ce4 (patch)
tree736ff37be839df797f40aff05a6aed02d36fea8c /sci-mathematics
parentsci-libs/djbfft: Fix tc-directly (diff)
downloadgentoo-62e3ddc88fe4221b322dde8c0e11347889970ce4.tar.gz
gentoo-62e3ddc88fe4221b322dde8c0e11347889970ce4.tar.bz2
gentoo-62e3ddc88fe4221b322dde8c0e11347889970ce4.zip
sci-mathematics/dsfmt: Fix tc-directly
Closes: https://bugs.gentoo.org/780936 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild9
-rw-r--r--sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch12
2 files changed, 20 insertions, 1 deletions
diff --git a/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild b/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
index 5de399e78f8a..fb35881b936e 100644
--- a/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
+++ b/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
@@ -11,15 +11,22 @@ MYP=${MYPN}-${PV}
DESCRIPTION="Double precision SIMD-oriented Fast Mersenne Twister library"
HOMEPAGE="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT"
SRC_URI="https://github.com/MersenneTwister-Lab/dSFMT/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MYP}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-S="${WORKDIR}/${MYP}"
+PATCHES=(
+ "${FILESDIR}"/${P}-cc.patch
+)
soname="lib${MYPN}.so"
+src_configure() {
+ tc-export CC
+}
+
src_compile() {
emake CCFLAGS="${CFLAGS}"
$(tc-getCC) -fPIC -shared -DDSFMT_SHLIB -DDSFMT_DO_NOT_USE_OLD_NAMES ${LDFLAGS} ${CFLAGS} -Wl,-soname=${soname} -o ${soname} ${MYPN}.c || die
diff --git a/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch b/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch
new file mode 100644
index 000000000000..fda30002ad7d
--- /dev/null
+++ b/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch
@@ -0,0 +1,12 @@
+# https://bugs.gentoo.org/780936
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,7 @@ OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
+ #STD = -std=c89 -pedantic
+ #STD = -std=c99 -pedantic
+ STD = -std=c99
+-CC = gcc
++CC ?= gcc
+ CCFLAGS = $(OPTI) $(WARN) $(STD)
+ ALTIFLAGS = -mabi=altivec -maltivec -DHAVE_ALTIVEC
+ OSXALTIFLAGS = -faltivec -maltivec -DHAVE_ALTIVEC