* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libsodium/, dev-libs/libsodium/files/
@ 2016-06-17 12:36 Michael Weber
0 siblings, 0 replies; only message in thread
From: Michael Weber @ 2016-06-17 12:36 UTC (permalink / raw
To: gentoo-commits
commit: faf6a5dea44a39636633495e64450175b369e419
Author: Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 12:36:26 2016 +0000
Commit: Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 12:36:51 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faf6a5de
dev-libs/libsodium: Add IUSE="cpu_flags_x86_sse4_1 cpu_flags_x86_aes"
Package-Manager: portage-2.2.28
.../files/libsodium-1.0.10-cpuflags.patch | 40 ++++++++++++++++++++++
dev-libs/libsodium/libsodium-1.0.10.ebuild | 15 ++++++--
2 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch b/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch
new file mode 100644
index 0000000..09e5c01
--- /dev/null
+++ b/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch
@@ -0,0 +1,40 @@
+--- libsodium-1.0.10/configure.ac
++++ libsodium-1.0.10/configure.ac
+@@ -344,6 +344,10 @@
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
+
++AC_ARG_ENABLE(sse4_1, [AS_HELP_STRING(--disable-sse4_1,Do not use sse4.1 code)],
++ AS_IF([test "x$enableval" = "xyes"], check_sse4_1="yes", check_sse4_1="no"),
++ check_sse4_1="yes")
++AS_IF([test "$check_sse4_1" = "yes"],[
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS="$CFLAGS -msse4.1"])
+ AC_MSG_CHECKING(for SSE4.1 instructions set)
+@@ -356,6 +360,7 @@
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS_SSE41="-msse4.1"])],
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
++ ])
+
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS="$CFLAGS -mavx"])
+@@ -393,6 +398,10 @@
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
+
++AC_ARG_ENABLE(aesni, [AS_HELP_STRING(--disable-aesni,Do not use aesni code)],
++ AS_IF([test "x$enableval" = "xyes"], check_aeni="yes", check_aesni="no"),
++ check_aesni="yes")
++AS_IF([test "$check_aesni" = "yes"],[
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS="$CFLAGS -maes"])
+ AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS="$CFLAGS -mpclmul"])
+@@ -410,6 +419,7 @@
+ ],
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
++ ])
+
+ ])
+
diff --git a/dev-libs/libsodium/libsodium-1.0.10.ebuild b/dev-libs/libsodium/libsodium-1.0.10.ebuild
index 0c74877..1485443 100644
--- a/dev-libs/libsodium/libsodium-1.0.10.ebuild
+++ b/dev-libs/libsodium/libsodium-1.0.10.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-inherit eutils
+inherit eutils autotools
DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library"
HOMEPAGE="https://github.com/jedisct1/libsodium"
@@ -13,7 +13,14 @@ SRC_URI="http://download.libsodium.org/${PN}/releases/${P}.tar.gz"
LICENSE="ISC"
SLOT="0/18"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="+asm minimal static-libs +urandom"
+IUSE="+asm minimal static-libs +urandom cpu_flags_x86_sse4_1 cpu_flags_x86_aes"
+
+PATCHES=( "${FILESDIR}"/${P}-cpuflags.patch )
+
+src_prepare() {
+ default
+ eautoreconf
+}
src_configure() {
local myconf
@@ -26,6 +33,8 @@ src_configure() {
$(use_enable minimal) \
$(use_enable !urandom blocking-random) \
$(use_enable static-libs static) \
+ $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
+ $(use_enable cpu_flags_x86_aes aesni) \
${myconf}
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-17 12:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 12:36 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libsodium/, dev-libs/libsodium/files/ Michael Weber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox