From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 29EA3158094 for ; Fri, 30 Sep 2022 15:52:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 629D6E0BB8; Fri, 30 Sep 2022 15:52:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 473B9E0BB8 for ; Fri, 30 Sep 2022 15:52:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C650340F7E for ; Fri, 30 Sep 2022 15:52:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A18A3D4 for ; Fri, 30 Sep 2022 15:52:54 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1664553170.70bf3a8996b9a14b0e28d7e367275a20f6d0cffc.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/llvm/llvm-16.0.0.9999.ebuild sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild X-VCS-Directories: sys-devel/llvm/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 70bf3a8996b9a14b0e28d7e367275a20f6d0cffc X-VCS-Branch: master Date: Fri, 30 Sep 2022 15:52:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e1b33649-ec4e-40b5-8d2e-3ace19b679ff X-Archives-Hash: ac6e9e72b410a31594ce89806896dda0 commit: 70bf3a8996b9a14b0e28d7e367275a20f6d0cffc Author: Michał Górny gentoo org> AuthorDate: Fri Sep 30 13:49:51 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Sep 30 15:52:50 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70bf3a89 sys-devel/llvm: Add zstd support in 16.x Bug: https://bugs.gentoo.org/873526 Signed-off-by: Michał Górny gentoo.org> sys-devel/llvm/llvm-16.0.0.9999.ebuild | 22 +++++++++++++++++++--- sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild | 22 +++++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild b/sys-devel/llvm/llvm-16.0.0.9999.ebuild index 9171387473ba..d0153e31a64d 100644 --- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild @@ -4,8 +4,8 @@ EAPI=8 PYTHON_COMPAT=( python3_{8..11} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs +inherit cmake llvm.org multilib multilib-minimal pax-utils \ + python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" @@ -19,7 +19,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" SLOT="$(ver_cut 1)" KEYWORDS="" -IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" RESTRICT="!test? ( test )" RDEPEND=" @@ -32,6 +35,7 @@ RDEPEND=" xar? ( app-arch/xar ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) " DEPEND=" ${RDEPEND} @@ -337,6 +341,13 @@ multilib_src_configure() { ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) fi + if use zstd; then + cat > "${BUILD_DIR}"/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 libdir=$(get_libdir) local mycmakeargs=( @@ -366,6 +377,7 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZSTD=$(usex zstd) -DLLVM_HOST_TRIPLE="${CHOST}" @@ -374,6 +386,10 @@ multilib_src_configure() { # used only for llvm-objdump tool -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + # workaround llvm requiring cmake files from zstd + -Dzstd_DIR="${BUILD_DIR}" + -DLLVM_PREFER_STATIC_ZSTD=FALSE + -DPython3_EXECUTABLE="${PYTHON}" # disable OCaml bindings (now in dev-ml/llvm-ocaml) diff --git a/sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild b/sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild index 9171387473ba..d0153e31a64d 100644 --- a/sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild +++ b/sys-devel/llvm/llvm-16.0.0_pre20220930.ebuild @@ -4,8 +4,8 @@ EAPI=8 PYTHON_COMPAT=( python3_{8..11} ) -inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \ - toolchain-funcs +inherit cmake llvm.org multilib multilib-minimal pax-utils \ + python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" @@ -19,7 +19,10 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" SLOT="$(ver_cut 1)" KEYWORDS="" -IUSE="+binutils-plugin debug doc exegesis libedit +libffi ncurses test xar xml z3" +IUSE=" + +binutils-plugin debug doc exegesis libedit +libffi ncurses test xar + xml z3 zstd +" RESTRICT="!test? ( test )" RDEPEND=" @@ -32,6 +35,7 @@ RDEPEND=" xar? ( app-arch/xar ) xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) " DEPEND=" ${RDEPEND} @@ -337,6 +341,13 @@ multilib_src_configure() { ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi) ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi) fi + if use zstd; then + cat > "${BUILD_DIR}"/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 libdir=$(get_libdir) local mycmakeargs=( @@ -366,6 +377,7 @@ multilib_src_configure() { -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_Z3_SOLVER=$(usex z3) + -DLLVM_ENABLE_ZSTD=$(usex zstd) -DLLVM_HOST_TRIPLE="${CHOST}" @@ -374,6 +386,10 @@ multilib_src_configure() { # used only for llvm-objdump tool -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0) + # workaround llvm requiring cmake files from zstd + -Dzstd_DIR="${BUILD_DIR}" + -DLLVM_PREFER_STATIC_ZSTD=FALSE + -DPython3_EXECUTABLE="${PYTHON}" # disable OCaml bindings (now in dev-ml/llvm-ocaml)