Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/gf2x/files/, dev-libs/gf2x/
Date: Sun, 26 Apr 2020 18:18:56
Message-Id: 1587925089.2e663bd0db9b0cc1bdc6136bc392230f759a4d48.mjo@gentoo
1 commit: 2e663bd0db9b0cc1bdc6136bc392230f759a4d48
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 26 18:08:58 2020 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 26 18:18:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e663bd0
7
8 dev-libs/gf2x: new version 1.3.0.
9
10 Standard version bump along with some ebuild improvements:
11
12 * EAPI=7.
13 * Dropped the unused eutils and replaced the ltprune eclasses.
14 * Added the new Gitlab instance to HOMEPAGE.
15 * Added a GCC-10.x compatibility patch already merged upstream.
16 * Updated the subslot to match the major soname component.
17
18 Closes: https://bugs.gentoo.org/719612
19 Package-Manager: Portage-2.3.89, Repoman-2.3.20
20 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
21
22 dev-libs/gf2x/Manifest | 1 +
23 dev-libs/gf2x/files/fno-common.patch | 37 +++++++++++++++++++++++
24 dev-libs/gf2x/gf2x-1.3.0.ebuild | 57 ++++++++++++++++++++++++++++++++++++
25 3 files changed, 95 insertions(+)
26
27 diff --git a/dev-libs/gf2x/Manifest b/dev-libs/gf2x/Manifest
28 index 28e154527b0..a221ee912f7 100644
29 --- a/dev-libs/gf2x/Manifest
30 +++ b/dev-libs/gf2x/Manifest
31 @@ -1 +1,2 @@
32 DIST gf2x-1.2.tar.gz 706519 BLAKE2B 4aa45d10646b51e540be51d0fe3691083c48c666d34e67d50d8f53753c49af2bd9664483618eee5a1883106d1f58ddb28cd4eb02031f13eebe8278630de736f6 SHA512 efddad2b99fa103fa77caed4a62f4a763dbff67bc7cf4527bbbf33ca826829e4a4f94e97454ef1a6498bdc2cee8934ff43f9dabf41a4a4f256721527a1dffa30
33 +DIST gf2x-1.3.0.tar.gz 727717 BLAKE2B 65f6596a09087708e4ae940b067cb375476c1e7b25a28bf12e9318c752cb326516edeb9363d0f98a9b4173f5bcefd204aa62e1cb87b3f27ad9c30b661edc7451 SHA512 4991568032483e0ecb4552a698e5b7d09f80875e54584a0060a9473be1f87e4e8f714e657f08fec0b9fcf493d969408e5a9000f900623b3694aba1ecf6dc239e
34
35 diff --git a/dev-libs/gf2x/files/fno-common.patch b/dev-libs/gf2x/files/fno-common.patch
36 new file mode 100644
37 index 00000000000..bcb4c255707
38 --- /dev/null
39 +++ b/dev-libs/gf2x/files/fno-common.patch
40 @@ -0,0 +1,37 @@
41 +From 5c8737c5c3170358024a4a969e1386cea15932f3 Mon Sep 17 00:00:00 2001
42 +From: Michael Orlitzky <michael@××××××××.com>
43 +Date: Sun, 26 Apr 2020 09:56:34 -0400
44 +Subject: [PATCH 1/1] src/tunetoom.c: delete duplicate definition of rp.
45 +
46 +The "make tune-toom" command has started failing with gcc-10.x because
47 +of its new default -fno-common behavior,
48 +
49 + * https://gcc.gnu.org/gcc-10/porting_to.html
50 + * https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
51 +
52 +This leads to an error involving the FILE pointer "rp" that is declared
53 +in global scope in both src/tunetoom.c and src/tuning-common.c. In this
54 +case, the declaration in src/tunetoom.c is simply redundant: that file
55 +includes src/tuning-common.h which already declares "rp" as extern.
56 +
57 +Deleting the redeclaration in src/tunetoom.c makes the build succeed.
58 +---
59 + src/tunetoom.c | 2 --
60 + 1 file changed, 2 deletions(-)
61 +
62 +diff --git a/src/tunetoom.c b/src/tunetoom.c
63 +index 7553e0c..1140606 100644
64 +--- a/src/tunetoom.c
65 ++++ b/src/tunetoom.c
66 +@@ -111,8 +111,6 @@ const char * gf2x_utoom_select_string[] = {
67 + [GF2X_SELECT_UNB_TC3U] = "TC3U",
68 + };
69 +
70 +-FILE *rp;
71 +-
72 + void tunetoom(long tablesz)
73 + {
74 + long high, n;
75 +--
76 +2.24.1
77 +
78
79 diff --git a/dev-libs/gf2x/gf2x-1.3.0.ebuild b/dev-libs/gf2x/gf2x-1.3.0.ebuild
80 new file mode 100644
81 index 00000000000..4763099d4a3
82 --- /dev/null
83 +++ b/dev-libs/gf2x/gf2x-1.3.0.ebuild
84 @@ -0,0 +1,57 @@
85 +# Copyright 1999-2020 Gentoo Authors
86 +# Distributed under the terms of the GNU General Public License v2
87 +
88 +EAPI=7
89 +
90 +inherit autotools
91 +
92 +DESCRIPTION="C/C++ routines for fast arithmetic in GF(2)[x]"
93 +HOMEPAGE="https://gitlab.inria.fr/thome/gf2x/ http://gforge.inria.fr/projects/gf2x/"
94 +# The Gitlab release is missing the autotools files.
95 +SRC_URI="https://gforge.inria.fr/frs/download.php/38243/${P}.tar.gz"
96 +
97 +LICENSE="GPL-2"
98 +SLOT="0/3" # soname major version, defined in configure.ac
99 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
100 +IUSE="fft static-libs custom-tune"
101 +IUSE_CPU_FLAGS=" pclmul sse2 sse3 sse4_1 ssse3"
102 +IUSE+=" ${IUSE_CPU_FLAGS// / cpu_flags_x86_}"
103 +
104 +PATCHES=( "${FILESDIR}/fno-common.patch" )
105 +
106 +src_prepare() {
107 + default
108 + # fix for cross-compiling, avoid ABI detection
109 + sed -e 's/VERIFY_WORDSIZE(\[$ABI\].*/echo "skipping ABI check"/' \
110 + -e 's/AC_MSG_ERROR(\[already_t.*/echo "skipping ABI check"/' \
111 + -i configure.ac || die
112 + eautoreconf
113 +}
114 +
115 +src_configure() {
116 + econf \
117 + $(use_enable cpu_flags_x86_sse2 sse2) \
118 + $(use_enable cpu_flags_x86_sse3 sse3) \
119 + $(use_enable cpu_flags_x86_ssse3 ssse3) \
120 + $(use_enable cpu_flags_x86_sse4_1 sse41) \
121 + $(use_enable cpu_flags_x86_pclmul pclmul) \
122 + $(use_enable fft fft-interface) \
123 + $(use_enable static-libs static)
124 +}
125 +
126 +src_compile() {
127 + emake
128 + if use custom-tune; then
129 + einfo "Starting tuning"
130 + emake tune-lowlevel
131 + emake tune-toom
132 + use fft && emake tune-fft
133 + fi
134 +}
135 +
136 +src_install() {
137 + default
138 + if ! use static-libs; then
139 + find "${ED}" -name '*.la' -delete || die
140 + fi
141 +}