From ad6182343997a405079870a2fe91c4e0c6b94595 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Sep 2019 19:33:39 +0100 Subject: gentoo resync : 25.09.2019 --- sys-devel/llvm/Manifest | 9 +- sys-devel/llvm/llvm-10.0.0.9999.ebuild | 10 +- sys-devel/llvm/llvm-8.0.1.ebuild | 2 +- sys-devel/llvm/llvm-9.0.0.9999.ebuild | 10 +- sys-devel/llvm/llvm-9.0.0.ebuild | 294 +++++++++++++++++++++++++++++++++ 5 files changed, 311 insertions(+), 14 deletions(-) create mode 100644 sys-devel/llvm/llvm-9.0.0.ebuild (limited to 'sys-devel/llvm') diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index e002666def40..2cbcdf5c340a 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -13,11 +13,14 @@ DIST llvm-8.0.0-manpages.tar.bz2 140542 BLAKE2B e6c58865ace0b8848ffe825e931a639d DIST llvm-8.0.0.src.tar.xz 30503732 BLAKE2B d89bdeb0ec7d885e49cfe5ae025da84f00502d409710c0807a3cdd58dbd47c50cf6a635593569483150f7f2ecb0de0310bd6785cb7625219bf9f6224a0d68e1c SHA512 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f DIST llvm-8.0.1-manpages.tar.bz2 140915 BLAKE2B 13ac9e172728d643dac1d12ac06909b6db3dd9a1a380a92a07867e3cb835f94b265da5d75c4712b5409405a65795d2cb6b32da4098e38cbb95d7023b56bcbbc1 SHA512 23994a2374659fbbf8d9b5160f4d77e9be7c4c9fc14963e8186bbede78b0ee9257f6b6a9c484bc75d72443d65bb24e598841e64af500336283de0f454d6a2073 DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 -EBUILD llvm-10.0.0.9999.ebuild 8573 BLAKE2B 92e759d050250e02abe1a46139ce077997bf3c61f5199e8ac9c6e10a95247abe0fd7359633570745358af060fb7d0152685fb960d0c85a760250fc05b7401d53 SHA512 da9dbbabfeb41553834a1e01e232cc84e433bb6a3d07dbe967f6fed3b0ae6fcba807093b4cdb58551ffcd53cfb73beb2b73a268ca869795f13037014186b0d84 +DIST llvm-9.0.0-manpages.tar.bz2 158546 BLAKE2B eed6235698a0b5993affe305f7fd22cd4cf444adf931275a1685f2049a5f17cf2933907577d9ce142348a3c579769b0436aa2b5a9a953958504125a8c3e83b7d SHA512 64c8d18061eb2870b379a1df485be0b61eac07cb10b3f97347b54b2ee326faa63437ca04466776be282e120dd3f6147e14fffdd38ca370db85748fe5eb54d764 +DIST llvm-9.0.0.src.tar.xz 32994768 BLAKE2B 7f09bff9bcada95ab9c920c78aef92b57e665d9188bab39c734084ceb03a801c942fed48ea77fabeeb6110c648cb69363c659a6ce93ebf67dbba5c187219b13b SHA512 1bb3341e1d231559b948f1505b33c2e2e03989f9b8bbfef0e0cdaff5ac43f85574c9ec5ac53399b914f497d6899425d861411024e8d7e1d1a338c1c6951ac658 +EBUILD llvm-10.0.0.9999.ebuild 8589 BLAKE2B 7dfa447685c16a5bdc6483a9361f125b0f0a485250bd14d480ef6870cdb7cd235370c8e7864ff3f985b45a979c62c294dabef8a40c381f0559155c07c1185ecb SHA512 7e9d69f66d84b09f6d05fe845ed97be71f35fa7b2af6306daf6862c7d2836c0350f95cb5fe5fe8bd2042b9eaa46b9a78d0be1c1716e04f6691bab1915bcf340a EBUILD llvm-6.0.1-r2.ebuild 8223 BLAKE2B c19ea8293cb393516560805dca29834a5ad57a9b9892c4f2d18d13b7031960624e411d32c64715cff1b0ea42c667d362d06c21f453258c8d7924abba61c566f6 SHA512 46f510c491a6ac5791f5d368d9d3ac0694d12a8c061158050ae3202d275cb1002f6b28fe38a0ef3d0d3f96e2d86b4f1bbe0412beb5bd9494376c9cb425bb0b7e EBUILD llvm-6.0.1.ebuild 7878 BLAKE2B 2dccaac410eb5ca447df7ba22891b05ba4767037239a321ac8314cce46ca18306885b5b90b3ba52092972dfad9f11cbac4285c8cddf9645a7c3bb0d1b77509d6 SHA512 77117eecea99a8ee65b5fd4c7f0003186b777624af4d0eb4fab1b1f2c5c02708a30e5f9952371452b0da933247b75e18cf2154a8cd40ea2fbd65a0d7dea4c987 EBUILD llvm-7.1.0.ebuild 7833 BLAKE2B 7e96495d3e0d4dfa095a1ed9bb1dc065c7ba6606550f205cde21c54b6513322d0d5de7430a84d52fac960bc86ace5b61a6818de72fea7dbd16f9478d487dd1f0 SHA512 384d5eb9b43a1b519c73d3992a97e9364ab86f00025cbbaecdd96439e77865d6b5f2327ca0fd6e524b4df9fd50f7709024093f0455c5048a1701495936ca5080 EBUILD llvm-8.0.0.ebuild 8796 BLAKE2B a7761e6533e36d575ec859125fa4e1ea8d56a0b6b69d826100dac66f5fc7540ece7690f82a51b973bb34fdcb8585466fd040d20b7db3a843761b40a6e8dc0c49 SHA512 ed6ad22908ae370b98896e3e1a8e99fe78c22348fb1dbebbc7b49ee51b68cb0d80d8c87f83d285a48dc89a0486137178560cb1c495bb4e5f09d3e89241f5843e -EBUILD llvm-8.0.1.ebuild 8643 BLAKE2B 577e9898d8da77d6d4ac83c2f6f39650a7f407b10baf85c0bfde0b7a0d7a201f9dbaf72df88d679cf2cf0d7dcfd874b0bca4c674b7e3d8ae9942fb3673750e19 SHA512 d2046d249585649652398842579b9de1c361e5717a09d79583f27cb332c6ea6c0cd0cb7e3f84edc2c1c5b20126f509bb8ac8c283552efca9cb9c1c1a728e0de9 -EBUILD llvm-9.0.0.9999.ebuild 8273 BLAKE2B b7c046852551a9e54a62c868d3dc12a1370bc169c72f1471aca489b38916be95d0b5c2ba56e12efdee0140e21db6576d0bd890b91608824820a01f25b57c837b SHA512 66f2f5833d65028ba0d4934ba40acaa1ba3efda8d77d91a9e60f7c2b4be38a198f1cd5dd68bbf7f6a8cdb99ea0d78c2f78a5ebd7788c2bce3077656f6ca6ec42 +EBUILD llvm-8.0.1.ebuild 8642 BLAKE2B c319238b85346e3bffaa8c4a2a6e373e59c28241682f6a27ad6207389472a918d396d016381ef3f4ecb45d6ec4695ff922560c5cb936d0ff6fa9776b33cb663f SHA512 aad2b70c31fb1af9a093488596a3601f139034a15fa3bed3040ab16a75772a94261589e0e465bbe73a7214d63a9eb467ab0c1cb2c42f8cd49fff1571368ed00c +EBUILD llvm-9.0.0.9999.ebuild 8289 BLAKE2B 4e63e11f29bd3b88382963ffa8c125308e101d946cd28d7493a2a2e4e7d6180514154310b007f808922d9ab821e9bec70c1cc4f7a3b78fe5354ddf17e21f6ec6 SHA512 49aacf1f630431bcefdaba3bdf34ceef5cf97f363b81937028608d6ee62ea6367309f7f4a3fe9663b5fba35bbc20945a6d8f822e22ec9bf7d518816eff67b8e6 +EBUILD llvm-9.0.0.ebuild 8603 BLAKE2B 585e551c372c7e380588c3d6d3353adbbca1cb16df45290a76830c257bce70bb7ecd21c371d48dc9d474f54ca64f18399c72683384fab1b1506a7d32379333b0 SHA512 63e555a79a8fe0416f49c7b8b03130fc662494b53e84213a0d16f4e7533750614d5cda76415ff8a2becc3f1abb6dd1767dac7d8169e2583b26143363df5d519a MISC metadata.xml 2563 BLAKE2B ca85030788fb213fc891d895238fd75562cdd25cc5fe4271d709cb1c00ef56b0e8b367dc70cc18f7d185d6fbdb57333e219a984220b60141d28fb4784b2cb94a SHA512 8de68ee7f964e6eb2613bd2ff584f834e0f5a3ae8b303b5f2f10fda718a87af9b8ddfc19399950fe4eb8be515930124ced8018190af0f69da7ec5fe8180a68a2 diff --git a/sys-devel/llvm/llvm-10.0.0.9999.ebuild b/sys-devel/llvm/llvm-10.0.0.9999.ebuild index 0fbb96cebb24..e632d6c930c6 100644 --- a/sys-devel/llvm/llvm-10.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-10.0.0.9999.ebuild @@ -36,6 +36,7 @@ SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" RESTRICT="!test? ( test )" RDEPEND=" @@ -55,6 +56,8 @@ RDEPEND=" z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" # configparser-3.2 breaks the build (3.3 or none at all are fine) DEPEND="${RDEPEND} + gold? ( sys-libs/binutils-libs )" +BDEPEND=" dev-lang/perl || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) @@ -67,7 +70,6 @@ DEPEND="${RDEPEND} dev-python/recommonmark[${PYTHON_USEDEP}] dev-python/sphinx[${PYTHON_USEDEP}] ') ) - gold? ( sys-libs/binutils-libs ) libffi? ( virtual/pkgconfig ) !!=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" - # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo python_check_deps() { use doc || return 0 - has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" && - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } src_prepare() { diff --git a/sys-devel/llvm/llvm-8.0.1.ebuild b/sys-devel/llvm/llvm-8.0.1.ebuild index 0746ccc13810..cc7266ad8ffc 100644 --- a/sys-devel/llvm/llvm-8.0.1.ebuild +++ b/sys-devel/llvm/llvm-8.0.1.ebuild @@ -33,7 +33,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LICENSE="UoI-NCSA rc BSD public-domain llvm_targets_ARM? ( LLVM-Grant )" SLOT="$(ver_cut 1)" -KEYWORDS="amd64 arm ~arm64 ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml kernel_Darwin ${ALL_LLVM_TARGETS[*]}" RESTRICT="!test? ( test )" diff --git a/sys-devel/llvm/llvm-9.0.0.9999.ebuild b/sys-devel/llvm/llvm-9.0.0.9999.ebuild index abd71ac5d2c3..5ff9e20d7e12 100644 --- a/sys-devel/llvm/llvm-9.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-9.0.0.9999.ebuild @@ -34,6 +34,7 @@ SLOT="$(ver_cut 1)" KEYWORDS="" IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" RESTRICT="!test? ( test )" RDEPEND=" @@ -53,6 +54,8 @@ RDEPEND=" z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" # configparser-3.2 breaks the build (3.3 or none at all are fine) DEPEND="${RDEPEND} + gold? ( sys-libs/binutils-libs )" +BDEPEND=" dev-lang/perl || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) @@ -65,7 +68,6 @@ DEPEND="${RDEPEND} dev-python/recommonmark[${PYTHON_USEDEP}] dev-python/sphinx[${PYTHON_USEDEP}] ') ) - gold? ( sys-libs/binutils-libs ) libffi? ( virtual/pkgconfig ) !!=sys-devel/llvmgold-${SLOT} )" -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" - # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo python_check_deps() { use doc || return 0 - has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" && - has_version "dev-python/sphinx[${PYTHON_USEDEP}]" + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } src_prepare() { diff --git a/sys-devel/llvm/llvm-9.0.0.ebuild b/sys-devel/llvm/llvm-9.0.0.ebuild new file mode 100644 index 000000000000..8cd42b405ccd --- /dev/null +++ b/sys-devel/llvm/llvm-9.0.0.ebuild @@ -0,0 +1,294 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + +inherit cmake-utils multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs + +MY_P=${P}.src +DESCRIPTION="Low Level Virtual Machine" +HOMEPAGE="https://llvm.org/" +SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz + !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )" +S=${WORKDIR}/${MY_P} + +# Keep in sync with CMakeLists.txt +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) + +# Additional licenses: +# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD. +# 2. xxhash: BSD. +# 3. MD5 code: public-domain. +# 4. ConvertUTF.h: TODO. + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3 + kernel_Darwin ${ALL_LLVM_TARGETS[*]}" +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:0=[${MULTILIB_USEDEP}] + exegesis? ( dev-libs/libpfm:= ) + gold? ( + || ( + >=sys-devel/binutils-2.31.1-r4:*[plugins] + =virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) + ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] ) + xar? ( app-arch/xar ) + xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] ) + z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )" +# configparser-3.2 breaks the build (3.3 or none at all are fine) +DEPEND="${RDEPEND} + gold? ( sys-libs/binutils-libs )" +BDEPEND=" + dev-lang/perl + || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5 + ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) + ) + kernel_Darwin? ( + =sys-devel/binutils-apple-5.1 + ) + doc? ( $(python_gen_any_dep ' + dev-python/recommonmark[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + ') ) + libffi? ( virtual/pkgconfig ) + !! SOVERSION when linking + # against libc++. This way we won't end up mixing LLVM libc++ + # libraries with libstdc++ clang, and the other way around. + mycmakeargs+=( + -DLLVM_VERSION_SUFFIX="libcxx" + ) + fi + +# Note: go bindings have no CMake rules at the moment +# but let's kill the check in case they are introduced +# if ! multilib_is_native_abi || ! use go; then + mycmakeargs+=( + -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND + ) +# fi + + use test && mycmakeargs+=( + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + ) + + if multilib_is_native_abi; then + mycmakeargs+=( + -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + ) + use doc && mycmakeargs+=( + -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html" + -DSPHINX_WARNINGS_AS_ERRORS=OFF + ) + use gold && mycmakeargs+=( + -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include + ) + fi + + if tc-is-cross-compiler; then + local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen" + [[ -x "${tblgen}" ]] \ + || die "${tblgen} not found or usable" + mycmakeargs+=( + -DCMAKE_CROSSCOMPILING=ON + -DLLVM_TABLEGEN="${tblgen}" + ) + fi + + # workaround BMI bug in gcc-7 (fixed in 7.4) + # https://bugs.gentoo.org/649880 + # apply only to x86, https://bugs.gentoo.org/650506 + if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] && + [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]] + then + local CFLAGS="${CFLAGS} -mno-bmi" + local CXXFLAGS="${CXXFLAGS} -mno-bmi" + fi + + # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + cmake-utils_src_configure +} + +multilib_src_compile() { + cmake-utils_src_compile + + pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld + pax-mark m "${BUILD_DIR}"/bin/lli + pax-mark m "${BUILD_DIR}"/bin/lli-child-target + + if use test; then + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests + pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests + pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests + fi +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + cmake-utils_src_make check +} + +src_install() { + local MULTILIB_CHOST_TOOLS=( + /usr/lib/llvm/${SLOT}/bin/llvm-config + ) + + local MULTILIB_WRAPPED_HEADERS=( + /usr/include/llvm/Config/llvm-config.h + ) + + local LLVM_LDPATHS=() + multilib-minimal_src_install + + # move wrapped headers back + mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die +} + +multilib_src_install() { + cmake-utils_src_install + + # move headers to /usr/include for wrapping + rm -rf "${ED}"/usr/include || die + mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die + + LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" ) +} + +multilib_src_install_all() { + local revord=$(( 9999 - ${SLOT} )) + newenvd - "10llvm-${revord}" <<-_EOF_ + PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + # we need to duplicate it in ROOTPATH for Portage to respect... + ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin" + MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man" + LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )" + _EOF_ + + # install pre-generated manpages + if ! use doc; then + # (doman does not support custom paths) + insinto "/usr/lib/llvm/${SLOT}/share/man/man1" + doins "${WORKDIR}/${P}-manpages/llvm"/*.1 + fi + + docompress "/usr/lib/llvm/${SLOT}/share/man" +} + +pkg_postinst() { + elog "You can find additional opt-viewer utility scripts in:" + elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer" + elog "To use these scripts, you will need Python along with the following" + elog "packages:" + elog " dev-python/pygments (for opt-viewer)" + elog " dev-python/pyyaml (for all of them)" +} -- cgit v1.2.3