summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-09-30 17:49:24 +0200
committerMichał Górny <mgorny@gentoo.org>2022-09-30 17:52:51 +0200
commit861536e5487b9c63f9cf878b4f2ecc3e8a220daf (patch)
tree313060cce77340fb4038c1af8d7b6ea5339c5a1a /sys-devel/lld
parentsys-devel/llvm: Add zstd support in 16.x (diff)
downloadgentoo-861536e5487b9c63f9cf878b4f2ecc3e8a220daf.tar.gz
gentoo-861536e5487b9c63f9cf878b4f2ecc3e8a220daf.tar.bz2
gentoo-861536e5487b9c63f9cf878b4f2ecc3e8a220daf.zip
sys-devel/lld: Add zstd support to 16.x
Bug: https://bugs.gentoo.org/873526 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/lld')
-rw-r--r--sys-devel/lld/lld-16.0.0.9999.ebuild16
-rw-r--r--sys-devel/lld/lld-16.0.0_pre20220930.ebuild16
2 files changed, 26 insertions, 6 deletions
diff --git a/sys-devel/lld/lld-16.0.0.9999.ebuild b/sys-devel/lld/lld-16.0.0.9999.ebuild
index f8773e9ca849..c683b72095e6 100644
--- a/sys-devel/lld/lld-16.0.0.9999.ebuild
+++ b/sys-devel/lld/lld-16.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+inherit cmake flag-o-matic llvm llvm.org multilib python-any-r1
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
@@ -12,11 +12,12 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0"
KEYWORDS=""
-IUSE="debug test"
+IUSE="debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[zstd=]
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
@@ -61,10 +62,19 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+ if use zstd; then
+ cat > "${T}"/zstdConfig.cmake <<-EOF || die
+ add_library(zstd::libzstd_shared SHARED IMPORTED)
+ set_target_properties(zstd::libzstd_shared PROPERTIES
+ IMPORTED_LOCATION "${EPREFIX}/usr/$(get_libdir)/libzstd$(get_libname)")
+ EOF
+ fi
+
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -Dzstd_DIR="${T}"
)
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON
diff --git a/sys-devel/lld/lld-16.0.0_pre20220930.ebuild b/sys-devel/lld/lld-16.0.0_pre20220930.ebuild
index f8773e9ca849..c683b72095e6 100644
--- a/sys-devel/lld/lld-16.0.0_pre20220930.ebuild
+++ b/sys-devel/lld/lld-16.0.0_pre20220930.ebuild
@@ -4,7 +4,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit cmake flag-o-matic llvm llvm.org python-any-r1
+inherit cmake flag-o-matic llvm llvm.org multilib python-any-r1
DESCRIPTION="The LLVM linker (link editor)"
HOMEPAGE="https://llvm.org/"
@@ -12,11 +12,12 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
SLOT="0"
KEYWORDS=""
-IUSE="debug test"
+IUSE="debug test zstd"
RESTRICT="!test? ( test )"
DEPEND="
- ~sys-devel/llvm-${PV}
+ ~sys-devel/llvm-${PV}[zstd=]
+ zstd? ( app-arch/zstd:= )
"
RDEPEND="
${DEPEND}
@@ -61,10 +62,19 @@ src_configure() {
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+ if use zstd; then
+ cat > "${T}"/zstdConfig.cmake <<-EOF || die
+ add_library(zstd::libzstd_shared SHARED IMPORTED)
+ set_target_properties(zstd::libzstd_shared PROPERTIES
+ IMPORTED_LOCATION "${EPREFIX}/usr/$(get_libdir)/libzstd$(get_libname)")
+ EOF
+ fi
+
local mycmakeargs=(
-DBUILD_SHARED_LIBS=ON
-DLLVM_INCLUDE_TESTS=$(usex test)
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -Dzstd_DIR="${T}"
)
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON