Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/libb2/
Date: Mon, 27 Nov 2017 13:55:09
Message-Id: 1511790898.fbe3b8ebb4bd549548943edd4d1b83f2d759228d.grobian@gentoo
1 commit: fbe3b8ebb4bd549548943edd4d1b83f2d759228d
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 27 13:54:44 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 27 13:54:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbe3b8eb
7
8 app-crypt/libb2: addUSE=native-cflags to control feature guessing
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 app-crypt/libb2/libb2-0.98.ebuild | 10 ++++++----
13 app-crypt/libb2/metadata.xml | 8 ++++++++
14 2 files changed, 14 insertions(+), 4 deletions(-)
15
16 diff --git a/app-crypt/libb2/libb2-0.98.ebuild b/app-crypt/libb2/libb2-0.98.ebuild
17 index 08bf237662f..b42921bc69d 100644
18 --- a/app-crypt/libb2/libb2-0.98.ebuild
19 +++ b/app-crypt/libb2/libb2-0.98.ebuild
20 @@ -13,7 +13,7 @@ SRC_URI="https://github.com/BLAKE2/libb2/archive/${GITHASH}.tar.gz -> ${P}.tar.g
21 LICENSE="CC0-1.0"
22 SLOT="0"
23 KEYWORDS="~amd64 ~ppc64"
24 -IUSE="static"
25 +IUSE="static native-cflags"
26
27 DEPEND=""
28 RDEPEND="${DEPEND}"
29 @@ -28,12 +28,14 @@ src_prepare() {
30 }
31
32 src_configure() {
33 - econf $(use_enable static)
34 + econf \
35 + $(use_enable static) \
36 + $(use_enable native-cflags native)
37 }
38
39 src_compile() {
40 - # respect our CFLAGS
41 - emake CFLAGS="${CFLAGS}"
42 + # respect our CFLAGS when native-cflags is not in effect
43 + emake $(use native-cflags && echo no)CFLAGS="${CFLAGS}"
44 }
45
46 src_install() {
47
48 diff --git a/app-crypt/libb2/metadata.xml b/app-crypt/libb2/metadata.xml
49 index 5ef83e989e9..76fd7590acb 100644
50 --- a/app-crypt/libb2/metadata.xml
51 +++ b/app-crypt/libb2/metadata.xml
52 @@ -10,4 +10,12 @@
53
54 Official implementations from BLAKE2 project.
55 </longdescription>
56 + <use>
57 + <flag name="native-cflags">
58 + Use CFLAGS as determined by configure script. These flags will
59 + enable all CPU specific features it find available, to further
60 + optimise the implementation. This discards any existing CFLAGS
61 + set in make.conf or similar.
62 + </flag>
63 + </use>
64 </pkgmetadata>