app-crypt/argon2: Use optimized code on x86 only
authorMichał Górny <mgorny@gentoo.org>
Wed, 23 Oct 2019 15:53:28 +0000 (17:53 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 23 Oct 2019 15:53:57 +0000 (17:53 +0200)
Closes: https://bugs.gentoo.org/698396
Signed-off-by: Michał Górny <mgorny@gentoo.org>
app-crypt/argon2/argon2-20190702.ebuild

index 4f7b30a2b8398d82de0be64b46b6f122a8fc5a8b..b3827b0063511faebf6694265ca3901baa3144ce 100644 (file)
@@ -30,18 +30,24 @@ src_prepare() {
                Makefile || die
 
        tc-export CC
+
+       if use amd64 || use x86; then
+               OPTTEST=0
+       else
+               OPTTEST=1
+       fi
 }
 
 src_compile() {
-       emake OPTTEST=0 LIBRARY_REL="$(get_libdir)"
+       emake OPTTEST="${OPTTEST}" LIBRARY_REL="$(get_libdir)"
 }
 
 src_test() {
-       emake OPTTEST=0 test
+       emake OPTTEST="${OPTTEST}" test
 }
 
 src_install() {
-       emake OPTTEST=0 DESTDIR="${ED}" LIBRARY_REL="$(get_libdir)" install
+       emake OPTTEST="${OPTTEST}" DESTDIR="${ED}" LIBRARY_REL="$(get_libdir)" install
        einstalldocs
        doman man/argon2.1
 }