dev-util/lldb: Bump to 7.0.0rc2
authorMichał Górny <mgorny@gentoo.org>
Tue, 28 Aug 2018 15:40:41 +0000 (17:40 +0200)
committerMichał Górny <mgorny@gentoo.org>
Tue, 28 Aug 2018 16:00:33 +0000 (18:00 +0200)
dev-util/lldb/Manifest
dev-util/lldb/lldb-7.0.0_rc2.ebuild [new file with mode: 0644]

index f600bae972215682ea7f4b85fe1c83cde8c58d84..188fcda7f2a57637d215e8b4ce27fab5ea2bc400 100644 (file)
@@ -1,4 +1,6 @@
 DIST lldb-5.0.2.src.tar.xz 19220632 BLAKE2B 7ab97a4e96a2faf6593f5584a5455bc793a50a51370bd32d1595958e5fba9d121832675e6f31cb18a3b77b472eefa8040443b77af3e29c5aa455e2a0dcdb7cdc SHA512 66eaaead60cc908ac061bedb4fac9cb96cecb7f4e5a79a51b6fa080e8f61f718b14e5f3581ead832b495bf10f055d4253d199236a0947dd22395ec80bf2afcf4
 DIST lldb-6.0.1.src.tar.xz 19292420 BLAKE2B 9ec3304aa370781dcbc7c30e47f7becbd99b50f32d9eea36fefbf0e3608bdfe10796ecc14807ee17795de430409315a5dfad02db0fd3ec1a0ad51e9e240e4b40 SHA512 93ee2efea07276f8838bc2b3ff039cab8c7a1a6965647aaa4dee99f55c6465d5584ed3be87b144e2e32b5acc7db9cec56d89404de764a2f53643ed154d213721
+DIST lldb-7.0.0rc2.src.tar.xz 19403564 BLAKE2B 6feb27e48ca8f8aa1423fcfb890b589207c8d15e1cb586f1c173d48bd5f93640ffe86c3f0e6cfc2d7871032027ebec57506838a26a932b4c7cd10aa984697cb0 SHA512 d848eacf1b628feba0b54a51b2db9cf85bff0e363d989d437acf31bf6b4671f3b9a8e6a40fa21355d526db8d9b15515003af4a4d09dd4c106f31910d3d9aec0d
 DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
 DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9
+DIST llvm-7.0.0rc2.src.tar.xz 28320756 BLAKE2B 92707da30fe73a6dec2614acceada06560332d3b54edeae5047543f23808cf13b24aecc9c853ccbc3341951e1fbceff85509465aa6207275fc54c75f94baff55 SHA512 4211fdbd2278ed325d3f6a1f1fa706351e768e2cd1445abf6664bed39b7b5d0c5e04514711d627f9ae1e271300f410635bb54ba004a5bece0d68450d3a1b52e4
diff --git a/dev-util/lldb/lldb-7.0.0_rc2.ebuild b/dev-util/lldb/lldb-7.0.0_rc2.ebuild
new file mode 100644 (file)
index 0000000..4511b59
--- /dev/null
@@ -0,0 +1,118 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils llvm multiprocessing python-single-r1 \
+       toolchain-funcs
+
+MY_P=${P/_/}.src
+LLVM_P=llvm-${PV/_/}.src
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+       test? ( https://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="libedit ncurses python test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       libedit? ( dev-libs/libedit:0= )
+       ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+       python? ( dev-python/six[${PYTHON_USEDEP}]
+               ${PYTHON_DEPS} )
+       ~sys-devel/clang-${PV}[xml]
+       ~sys-devel/llvm-${PV}
+       !<sys-devel/llvm-4.0"
+DEPEND="${RDEPEND}
+       python? ( >=dev-lang/swig-3.0.11 )
+       test? ( ~dev-python/lit-${PV}[${PYTHON_USEDEP}] )
+       ${PYTHON_DEPS}"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+S=${WORKDIR}/${MY_P}
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_setup() {
+       LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+       python-single-r1_pkg_setup
+}
+
+src_unpack() {
+       einfo "Unpacking ${MY_P}.tar.xz ..."
+       tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+
+       if use test; then
+               einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
+               tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
+                       "${LLVM_P}"/{lib/Testing/Support,utils/unittest} || die
+               mv "${LLVM_P}" llvm || die
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DLLDB_DISABLE_CURSES=$(usex !ncurses)
+               -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
+               -DLLDB_DISABLE_PYTHON=$(usex !python)
+               -DLLDB_USE_SYSTEM_SIX=1
+               -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+               -DLLDB_INCLUDE_TESTS=$(usex test)
+
+               # TODO: fix upstream to detect this properly
+               -DHAVE_LIBDL=ON
+               -DHAVE_LIBPTHREAD=ON
+
+               # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+               # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+               # ncurses with complete library set (including autodetection
+               # of -ltinfo)
+               -DCURSES_NEED_NCURSES=ON
+       )
+       use test && mycmakeargs+=(
+               -DLLVM_BUILD_TESTS=$(usex test)
+               # compilers for lit tests
+               -DLLDB_TEST_C_COMPILER="$(type -P clang)"
+               -DLLDB_TEST_CXX_COMPILER="$(type -P clang++)"
+
+               -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+               -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+       )
+
+       cmake-utils_src_configure
+}
+
+src_test() {
+       cmake-utils_src_make check-lldb-lit
+       use python && cmake-utils_src_make check-lldb
+}
+
+src_install() {
+       cmake-utils_src_install
+
+       # oh my...
+       if use python; then
+               # remove custom readline.so for now
+               # TODO: figure out how to deal with it
+               # upstream is basically building a custom readline.so with -ledit
+               # to avoid symbol collisions between readline and libedit...
+               rm "${D}$(python_get_sitedir)/readline.so" || die
+
+               # byte-compile the modules
+               python_optimize
+       fi
+}