app-arch/zstd: IUSE=threads
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>
Tue, 17 Mar 2020 18:44:22 +0000 (19:44 +0100)
committerMatt Turner <mattst88@gentoo.org>
Fri, 20 Mar 2020 18:31:44 +0000 (11:31 -0700)
Closes: https://bugs.gentoo.org/699020
Closes: https://github.com/gentoo/gentoo/pull/14992
Signed-off-by: Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
app-arch/zstd/zstd-1.4.4-r3.ebuild

index 23c642f568441affb9bc69c005ba57b614233d19..d5c67e17ca2cf922da610ef2fc80f87b19fdc298 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 LICENSE="|| ( BSD GPL-2 )"
 SLOT="0/1"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="lz4 static-libs"
+IUSE="lz4 static-libs +threads"
 
 RDEPEND="app-arch/xz-utils
        lz4? ( app-arch/lz4 )"
@@ -39,7 +39,11 @@ mymake() {
 }
 
 multilib_src_compile() {
-       mymake -C lib libzstd libzstd.a libzstd.pc
+       if use threads; then
+               mymake -C lib libzstd-mt libzstd.a-mt libzstd.pc
+       else
+               mymake -C lib libzstd libzstd.a libzstd.pc
+       fi
 
        if multilib_is_native_abi ; then
                mymake HAVE_LZ4="$(usex lz4 1 0)" zstd