Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/dsfmt/, sci-mathematics/dsfmt/files/
Date: Thu, 07 Oct 2021 09:17:16
Message-Id: 1633597329.62e3ddc88fe4221b322dde8c0e11347889970ce4.jsmolic@gentoo
1 commit: 62e3ddc88fe4221b322dde8c0e11347889970ce4
2 Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 7 09:02:09 2021 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 7 09:02:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62e3ddc8
7
8 sci-mathematics/dsfmt: Fix tc-directly
9
10 Closes: https://bugs.gentoo.org/780936
11 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
12
13 sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild | 9 ++++++++-
14 sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch | 12 ++++++++++++
15 2 files changed, 20 insertions(+), 1 deletion(-)
16
17 diff --git a/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild b/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
18 index 5de399e78f8..fb35881b936 100644
19 --- a/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
20 +++ b/sci-mathematics/dsfmt/dsfmt-2.2.4.ebuild
21 @@ -11,15 +11,22 @@ MYP=${MYPN}-${PV}
22 DESCRIPTION="Double precision SIMD-oriented Fast Mersenne Twister library"
23 HOMEPAGE="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT"
24 SRC_URI="https://github.com/MersenneTwister-Lab/dSFMT/archive/v${PV}.tar.gz -> ${P}.tar.gz"
25 +S="${WORKDIR}/${MYP}"
26
27 LICENSE="BSD"
28 SLOT="0"
29 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
30
31 -S="${WORKDIR}/${MYP}"
32 +PATCHES=(
33 + "${FILESDIR}"/${P}-cc.patch
34 +)
35
36 soname="lib${MYPN}.so"
37
38 +src_configure() {
39 + tc-export CC
40 +}
41 +
42 src_compile() {
43 emake CCFLAGS="${CFLAGS}"
44 $(tc-getCC) -fPIC -shared -DDSFMT_SHLIB -DDSFMT_DO_NOT_USE_OLD_NAMES ${LDFLAGS} ${CFLAGS} -Wl,-soname=${soname} -o ${soname} ${MYPN}.c || die
45
46 diff --git a/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch b/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch
47 new file mode 100644
48 index 00000000000..fda30002ad7
49 --- /dev/null
50 +++ b/sci-mathematics/dsfmt/files/dsfmt-2.2.4-cc.patch
51 @@ -0,0 +1,12 @@
52 +# https://bugs.gentoo.org/780936
53 +--- a/Makefile
54 ++++ b/Makefile
55 +@@ -28,7 +28,7 @@ OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
56 + #STD = -std=c89 -pedantic
57 + #STD = -std=c99 -pedantic
58 + STD = -std=c99
59 +-CC = gcc
60 ++CC ?= gcc
61 + CCFLAGS = $(OPTI) $(WARN) $(STD)
62 + ALTIFLAGS = -mabi=altivec -maltivec -DHAVE_ALTIVEC
63 + OSXALTIFLAGS = -faltivec -maltivec -DHAVE_ALTIVEC