diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
commit | feb0daf81d888e9160f9f94502de09b66f2a63fd (patch) | |
tree | b6e5c40ce2abef3da27ed50a023153f475e0ddef /sys-devel/llvm | |
parent | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff) |
gentoo resync : 21.06.2020
Diffstat (limited to 'sys-devel/llvm')
6 files changed, 193 insertions, 72 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 72f0ce5078c3..50ed11457d47 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -1,3 +1,5 @@ +AUX 10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch 1480 BLAKE2B 09057d1e7ad466ba316335b66d9acf7b55fabdb209bddf7d28e641ea7a922d8af51ad6a8f0ab41b28da7ff0e76148d5ea388ad447bcd828f11ad3e7d89d0f78d SHA512 366041f1c4a4d7c3af2b611f65b238cb0bd00806ad0afa1181f05900b512a84c8997b2f2843564a573478af2e7b225d6ccc7ffe7823d88acd2ede706bee49ffa +AUX 10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch 983 BLAKE2B af7f06cf16ed45d446c7f879ccdc2d6ef50cd5e04f5eec40a2097f429063daeef610945e5201cb937349c041fc7d124df11319b253b4ea89f6b7baf701924ec9 SHA512 b39c0fc939d56cd6bb96b107d93cda23b01b76f51639000cf7b5516792c7bfcafbee56c0845b87cc30d172fa90f9fb2bdf137a5b27da272d405acec32bcc5b8d AUX 9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch 1188 BLAKE2B 72311a8da991b9f3b98523baefe6f5b31aa7f9101c388f35484dd5f384a08e838ea42a17447ca17a0dfe6b7d3c20abbdf0e8afee72e8ad5d46ec38b8d55307c8 SHA512 0ada997db2a0eb875105fb212dc3fc3077b9c4f7804d78c33c4b1f512bf1267295f325153ae14c00404c86e576ae1c78a6aeb0a57d1d4525aabd1169c21806ef AUX 9999/musl-fixes.patch 1258 BLAKE2B fe275412bc908884239ea71de9a9ddf1d2f64debaa1a9ada18170195a7775c41571600ed3666343bf967aff5f9117900f73155f60de5077bc4584cfc2f782f53 SHA512 314dcbe846a66312c9f1634f4ff3f4670b3db1d3210bb550f1d3877a423333ba042da2e90c8736918a36be4d4faf58dab8d3236d4f26df5af7f7f019b0e0ec8f DIST llvm-10.0.0-manpages.tar.bz2 177084 BLAKE2B 16b38e60fce4d67ac602b317ea7089c095d46b9426ba9940041e65d7ab493f85dba2e94a4aeba7b7c52042f23825efcfcd32a57d306aaf05b4307061a5a8a368 SHA512 eac57ad218ff4c2b5a74e453a29192ee6e911152b668d8a9420b59529d5cae8aa241f2485b4a7ea304acbecc7ecb27391a77552080726432c2b7b59b95fc0bd7 @@ -8,9 +10,9 @@ DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff21988870 DIST llvmorg-10.0.1-rc1.tar.gz 120834583 BLAKE2B 64244ebcb6f2c171c9f606e5eb0adff2794f06c9312a0ca627fb79c107c0c898ac242cf4e92523c3265fa717322601d7e3f4d178515fac95d03ee92312082b06 SHA512 f877f66046969a4055b166ad50ef876a9c8ecaf03e2cdd7c8e1a3348eb5f5180f222fa457b1f090a6660282a0d9f7a1d39cf09a04abe0dde0a6e1e10ccf15597 DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 EBUILD llvm-10.0.0.ebuild 10579 BLAKE2B 04be48351a56d46e4b13357415364c9d20a5e3e6438ca587a40f1233ffabaeeb14013a03e1794409a80cf9578bed03e93c82baae5ebe82fab7b4a9d141abaab4 SHA512 b4f6e58592423642bc570e57112b80a2c3b5abee66118333fff8bb06e5c7bb447b6636d73c304ab424d2caf842ef709db846aa8758eb7b72d0253e7e4b979b6d -EBUILD llvm-10.0.1.9999.ebuild 12263 BLAKE2B 448f555d5cdb973560e10c84d0175189a442a56d81e1f33a7eba74bde2c0d8ffa071caa000d496a86deeb78d7dcdcb783759d50a1d61fb9c8ce262639baff3e2 SHA512 9286d7a5e1ce0d62161246b5dd5623f072cf4528e92d6413c25bd62fc8334eb477e5ece33bb31979a0a88220ffc89b77ebcc0be934872aec5ff2845f78748b8f -EBUILD llvm-10.0.1_rc1.ebuild 11270 BLAKE2B 261bbe7885e29d83a0b60e71534e65dae287875d803f409675e17408d0a29f79417d03f59d1b69db6ead61b8cfaea374a8f40b2fb60fb7a390b5f40d3fca4503 SHA512 72d28860a4ab3c7ed79661165566b390b588a6ccdf8e4f43755430d90d1de23f0b109dea4998538561e7ab209ea037fc91b4b68eab9a94cdaa344570d8443149 -EBUILD llvm-11.0.0.9999.ebuild 12291 BLAKE2B 79a8f491fc1cc74303079b6c4365d20891a74c334623cde31c57909efad6f7c4d077a30f203bde50543823af0ab6c4d1b4169c9696799a53b1f26e27bf54585a SHA512 9691860b36db22a11b7956e1b077fd3debf2a4432d951dbac28e48c185d8618748b7f6597d814a3791193f302a3f9df7bd55c40a6a5c79b68a880aee35fcd82f +EBUILD llvm-10.0.1.9999.ebuild 12650 BLAKE2B 211f0b2414736b96abc8f8233b9887b07c3ffeff550b8730d827cba5553c72a3c1e03c60bbae3b67ea291d99ecfa26fe6a9c4d5df9f487f2720c7203e1ffeaf2 SHA512 9bdf03333f1a0db73981f5ad85ac999e4d6e9d752bbfe89cc14ab3f442492d12e923aa008364190959acffac0f3f761d48eb8db56939735b7bffbb293b3bc21d +EBUILD llvm-10.0.1_rc1.ebuild 11657 BLAKE2B 9efafea418d81c69252ae1384c987da275a73364881de966df418a1005bbbea39459ccbfb9d5e9fd2d7120c1d8f55e929e4d23111878c65814c0ac959243fb9d SHA512 47d7bdb20aba5337db602d652076919171d2fc12bdd6d952e9aacab829b358f3de21931ea2fe4411f2054e9bb1efe0809b114f680956fbc3cde50fcee0500d02 +EBUILD llvm-11.0.0.9999.ebuild 12451 BLAKE2B 12dc5b6901c4cee6a407c17531a9557d359baaa8a1fc2432a0e42c8ae5854ff50746ebfa6440c2948fc04fc4f6f427fdd09e21a4f75c60a90ec586d143c99ca1 SHA512 67d364038e5e7cbce658fd2d0624e20423a9ebe0890dfb43419cb4f382c20651cda4b6fccb804e11cfdb23162f95907124c950a12fc4991c1bde764b6404ccd6 EBUILD llvm-8.0.1.ebuild 8423 BLAKE2B 229579ed2cd28987476612666617c61af49760ace9b4664a4419f2518990666d88a2c234d55f7f9c89d04e4a107b34cad50ce7866e4fa944829b0eb3f7473a2b SHA512 307e04c4dac29e8b3fef2a422d231883883384b23fc9d54c8f5f9e69b9f40fb3ea7950651cc15938e0ea92a12413db67996b87b59ec88cf3ba4661b6099602e7 EBUILD llvm-9.0.1.ebuild 8454 BLAKE2B 33b4c7bdf4bc136d29f3f6f505799b11de31d33e393b51c9bafb121b0b8b347e86a5954ba6ba039cd6b39cb7c1a501d4747f51652351559c42ba0b84c4bae54b SHA512 f43a600265c1559e924a6f2ec97dffdacfae35df2cc3e3e874704c5ae179ba48d90fdd666411cdab500d171fa63b557538282545c7c4078867857e077c941a4c MISC metadata.xml 2563 BLAKE2B ca85030788fb213fc891d895238fd75562cdd25cc5fe4271d709cb1c00ef56b0e8b367dc70cc18f7d185d6fbdb57333e219a984220b60141d28fb4784b2cb94a SHA512 8de68ee7f964e6eb2613bd2ff584f834e0f5a3ae8b303b5f2f10fda718a87af9b8ddfc19399950fe4eb8be515930124ced8018190af0f69da7ec5fe8180a68a2 diff --git a/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch b/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch new file mode 100644 index 000000000000..445cb6de2c32 --- /dev/null +++ b/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch @@ -0,0 +1,48 @@ +From bc3be897be6994da7f52ba1b5735aa81150084a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 16 Jun 2020 12:16:52 +0200 +Subject: [PATCH 1/4] [llvm] Avoid linking llvm-cfi-verify to duplicate libs + +Fix the CMake rules for LLVMCFIVerify library not to pull duplicate +LLVM .a libraries when linking to the dylib. This prevents problems +due to duplicate symbols and apparently fixes mingw32. + +This is an alternative approach to D44650 that just forces .a libraries +instead. However, there doesn't seem to be any reason to do that. +--- + llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 +++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt +index 82ca42e624a..41d55ed9321 100644 +--- a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt ++++ b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt +@@ -7,13 +7,17 @@ add_library(LLVMCFIVerify + ) + + llvm_update_compile_flags(LLVMCFIVerify) +-llvm_map_components_to_libnames(libs +- DebugInfoDWARF +- MC +- MCParser +- Object +- Support +- Symbolize +- ) ++if (LLVM_LINK_LLVM_DYLIB) ++ set(libs LLVM) ++else() ++ llvm_map_components_to_libnames(libs ++ DebugInfoDWARF ++ MC ++ MCParser ++ Object ++ Support ++ Symbolize ++ ) ++endif() + target_link_libraries(LLVMCFIVerify ${libs}) + set_target_properties(LLVMCFIVerify PROPERTIES FOLDER "Libraries") +-- +2.27.0 + diff --git a/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch b/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch new file mode 100644 index 000000000000..24786905c4d9 --- /dev/null +++ b/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch @@ -0,0 +1,29 @@ +From 07b6fdcde1ed64043244965b97788a2b12af4d6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Tue, 16 Jun 2020 12:31:36 +0200 +Subject: [PATCH 2/4] [llvm] Disable linking llvm-exegesis to dylib + +Force linking llvm-exegesis to static LLVM libraries instead of dylib +to prevent duplicate symbols due to linking both. Ideally, we'd want +to link to the dylib only here but the target sub-libraries use hidden +symbols from LLVM target libraries and therefore linking the dylib +fails. +--- + llvm/tools/llvm-exegesis/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/tools/llvm-exegesis/CMakeLists.txt b/llvm/tools/llvm-exegesis/CMakeLists.txt +index a59e1b74024..0575f2a06bb 100644 +--- a/llvm/tools/llvm-exegesis/CMakeLists.txt ++++ b/llvm/tools/llvm-exegesis/CMakeLists.txt +@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS + ) + + add_llvm_tool(llvm-exegesis ++ DISABLE_LLVM_LINK_LLVM_DYLIB + llvm-exegesis.cpp + ) + +-- +2.27.0 + diff --git a/sys-devel/llvm/llvm-10.0.1.9999.ebuild b/sys-devel/llvm/llvm-10.0.1.9999.ebuild index f308f41ee444..27af603d49b5 100644 --- a/sys-devel/llvm/llvm-10.0.1.9999.ebuild +++ b/sys-devel/llvm/llvm-10.0.1.9999.ebuild @@ -3,9 +3,9 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -inherit cmake-utils llvm.org multilib-minimal multiprocessing \ - pax-utils python-any-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{6..9} ) +inherit cmake llvm.org multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" @@ -58,12 +58,11 @@ BDEPEND=" <sys-libs/libcxx-$(ver_cut 1-3).9999 >=sys-devel/binutils-apple-5.1 ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] ) + ')" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. RDEPEND="${RDEPEND} @@ -74,10 +73,17 @@ PDEPEND="sys-devel/llvm-common # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -python_check_deps() { - use doc || return 0 +PATCHES=( + # Fix linking to dylib and .a libs simultaneously + "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch + "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch +) - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && +python_check_deps() { + if use doc; then + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" || + return 1 + fi has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } @@ -138,6 +144,10 @@ check_distribution_components() { distribution|llvm-libraries) continue ;; + # used only w/ USE=doc + docs-llvm-html) + continue + ;; esac all_targets+=( "${l}" ) @@ -180,11 +190,18 @@ src_prepare() { # Update config.guess to support more systems cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die - # User patches + QA - cmake-utils_src_prepare + # manpages don't use markdown + if ! use doc; then + sed -i -e '/source_parsers/d' docs/conf.py || die + fi # Verify that the live ebuild is up-to-date check_live_ebuild + + # cmake eclasses suck by forcing ${S} here + CMAKE_USE_DIR=${S} \ + S=${WORKDIR} \ + cmake_src_prepare } # Is LLVM being linked against libc++? @@ -299,12 +316,13 @@ get_distribution_components() { # python modules opt-viewer - ) - use doc && out+=( + # manpages docs-dsymutil-man docs-llvm-dwarfdump-man docs-llvm-man + ) + use doc && out+=( docs-llvm-html ) @@ -386,13 +404,11 @@ multilib_src_configure() { if multilib_is_native_abi; then mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_BUILD_DOCS=ON -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_SPHINX=ON -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 @@ -424,13 +440,13 @@ multilib_src_configure() { # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake-utils_src_configure + cmake_src_configure multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake-utils_src_compile + cmake_src_compile pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -446,7 +462,7 @@ multilib_src_compile() { multilib_src_test() { # respect TMPDIR! local -x LIT_PRESERVES_TMP=1 - cmake-utils_src_make check + cmake_build check } src_install() { @@ -466,7 +482,7 @@ src_install() { } multilib_src_install() { - DESTDIR=${D} cmake-utils_src_make install-distribution + DESTDIR=${D} cmake_build install-distribution # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die diff --git a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild index 59ccce098614..36ee1f6d95dc 100644 --- a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild +++ b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild @@ -3,9 +3,9 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -inherit cmake-utils llvm.org multilib-minimal multiprocessing \ - pax-utils python-any-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{6..9} ) +inherit cmake llvm.org multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" @@ -58,12 +58,11 @@ BDEPEND=" <sys-libs/libcxx-$(ver_cut 1-3).9999 >=sys-devel/binutils-apple-5.1 ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] ) + ')" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. RDEPEND="${RDEPEND} @@ -74,10 +73,17 @@ PDEPEND="sys-devel/llvm-common # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -python_check_deps() { - use doc || return 0 +PATCHES=( + # Fix linking to dylib and .a libs simultaneously + "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch + "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch +) - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && +python_check_deps() { + if use doc; then + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" || + return 1 + fi has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } @@ -106,6 +112,10 @@ check_distribution_components() { distribution|llvm-libraries) continue ;; + # used only w/ USE=doc + docs-llvm-html) + continue + ;; esac all_targets+=( "${l}" ) @@ -148,8 +158,15 @@ src_prepare() { # Update config.guess to support more systems cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die - # User patches + QA - cmake-utils_src_prepare + # manpages don't use markdown + if ! use doc; then + sed -i -e '/source_parsers/d' docs/conf.py || die + fi + + # cmake eclasses suck by forcing ${S} here + CMAKE_USE_DIR=${S} \ + S=${WORKDIR} \ + cmake_src_prepare } # Is LLVM being linked against libc++? @@ -264,12 +281,13 @@ get_distribution_components() { # python modules opt-viewer - ) - use doc && out+=( + # manpages docs-dsymutil-man docs-llvm-dwarfdump-man docs-llvm-man + ) + use doc && out+=( docs-llvm-html ) @@ -351,13 +369,11 @@ multilib_src_configure() { if multilib_is_native_abi; then mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_BUILD_DOCS=ON -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_SPHINX=ON -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 @@ -389,13 +405,13 @@ multilib_src_configure() { # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake-utils_src_configure + cmake_src_configure multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake-utils_src_compile + cmake_src_compile pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -411,7 +427,7 @@ multilib_src_compile() { multilib_src_test() { # respect TMPDIR! local -x LIT_PRESERVES_TMP=1 - cmake-utils_src_make check + cmake_build check } src_install() { @@ -431,7 +447,7 @@ src_install() { } multilib_src_install() { - DESTDIR=${D} cmake-utils_src_make install-distribution + DESTDIR=${D} cmake_build install-distribution # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild b/sys-devel/llvm/llvm-11.0.0.9999.ebuild index f6ed4b7a9be5..5af65c0f4a0d 100644 --- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild +++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild @@ -3,9 +3,9 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) -inherit cmake-utils llvm.org multilib-minimal multiprocessing \ - pax-utils python-any-r1 toolchain-funcs +PYTHON_COMPAT=( python3_{6..9} ) +inherit cmake llvm.org multilib-minimal multiprocessing pax-utils \ + python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/" @@ -58,12 +58,11 @@ BDEPEND=" <sys-libs/libcxx-$(ver_cut 1-3).9999 >=sys-devel/binutils-apple-5.1 ) - doc? ( $(python_gen_any_dep ' - dev-python/recommonmark[${PYTHON_USEDEP}] - dev-python/sphinx[${PYTHON_USEDEP}] - ') ) libffi? ( virtual/pkgconfig ) - ${PYTHON_DEPS}" + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] ) + ')" # There are no file collisions between these versions but having :0 # installed means llvm-config there will take precedence. RDEPEND="${RDEPEND} @@ -75,9 +74,10 @@ PDEPEND="sys-devel/llvm-common CMAKE_BUILD_TYPE=RelWithDebInfo python_check_deps() { - use doc || return 0 - - has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" && + if use doc; then + has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" || + return 1 + fi has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } @@ -138,6 +138,10 @@ check_distribution_components() { distribution|llvm-libraries) continue ;; + # used only w/ USE=doc + docs-llvm-html) + continue + ;; esac all_targets+=( "${l}" ) @@ -180,11 +184,18 @@ src_prepare() { # Update config.guess to support more systems cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die - # User patches + QA - cmake-utils_src_prepare + # manpages don't use markdown + if ! use doc; then + sed -i -e '/source_parsers/d' docs/conf.py || die + fi # Verify that the live ebuild is up-to-date check_live_ebuild + + # cmake eclasses suck by forcing ${S} here + CMAKE_USE_DIR=${S} \ + S=${WORKDIR} \ + cmake_src_prepare } # Is LLVM being linked against libc++? @@ -301,12 +312,13 @@ get_distribution_components() { # python modules opt-viewer - ) - use doc && out+=( + # manpages docs-dsymutil-man docs-llvm-dwarfdump-man docs-llvm-man + ) + use doc && out+=( docs-llvm-html ) @@ -388,13 +400,11 @@ multilib_src_configure() { if multilib_is_native_abi; then mycmakeargs+=( - -DLLVM_BUILD_DOCS=$(usex doc) + -DLLVM_BUILD_DOCS=ON -DLLVM_ENABLE_OCAMLDOC=OFF - -DLLVM_ENABLE_SPHINX=$(usex doc) + -DLLVM_ENABLE_SPHINX=ON -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 @@ -426,13 +436,13 @@ multilib_src_configure() { # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" - cmake-utils_src_configure + cmake_src_configure multilib_is_native_abi && check_distribution_components } multilib_src_compile() { - cmake-utils_src_compile + cmake_src_compile pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld pax-mark m "${BUILD_DIR}"/bin/lli @@ -448,7 +458,7 @@ multilib_src_compile() { multilib_src_test() { # respect TMPDIR! local -x LIT_PRESERVES_TMP=1 - cmake-utils_src_make check + cmake_build check } src_install() { @@ -468,7 +478,7 @@ src_install() { } multilib_src_install() { - DESTDIR=${D} cmake-utils_src_make install-distribution + DESTDIR=${D} cmake_build install-distribution # move headers to /usr/include for wrapping rm -rf "${ED}"/usr/include || die |