dev-util/lldb: Port to llvm.org eclass
authorMichał Górny <mgorny@gentoo.org>
Fri, 1 Nov 2019 17:44:57 +0000 (18:44 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 3 Nov 2019 11:46:17 +0000 (12:46 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-util/lldb/lldb-10.0.0.9999.ebuild
dev-util/lldb/lldb-9.0.0.ebuild
dev-util/lldb/lldb-9.0.1.9999.ebuild

index 4534586ab24993557a803feff54c83f0eed085aa..384878929777b19f6751125d85034cf4a7046b60 100644 (file)
@@ -4,14 +4,14 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-utils git-r3 llvm multiprocessing python-single-r1 \
+inherit cmake-utils llvm llvm.org multiprocessing python-single-r1 \
        toolchain-funcs
 
 DESCRIPTION="The LLVM debugger"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/lldb
+LLVM_COMPONENTS=( lldb )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -45,13 +45,6 @@ pkg_setup() {
        python-single-r1_pkg_setup
 }
 
-src_unpack() {
-       local dirs=( lldb )
-       use test && dirs+=( llvm/lib/Testing/Support llvm/utils/unittest )
-       git-r3_fetch
-       git-r3_checkout '' '' '' "${dirs[@]}"
-}
-
 src_configure() {
        local mycmakeargs=(
                -DLLDB_DISABLE_CURSES=$(usex !ncurses)
@@ -80,7 +73,7 @@ src_configure() {
                -DLLDB_TEST_C_COMPILER="$(type -P clang)"
                -DLLDB_TEST_CXX_COMPILER="$(type -P clang++)"
 
-               -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm"
+               -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)")}"
        )
index 3c2667d0a0384e9fb1302653300790d0ddf18c7b..bc79687eb3101b43bd40f63d14dbed7ca9b68bc4 100644 (file)
@@ -4,17 +4,14 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6}} )
-inherit cmake-utils llvm multiprocessing python-single-r1 \
+inherit cmake-utils llvm llvm.org 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://releases.llvm.org/${PV}/${MY_P}.tar.xz
-       test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz )"
-S=${WORKDIR}/${MY_P}
+LLVM_COMPONENTS=( lldb )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -47,18 +44,6 @@ 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)
index 7279dd54c01457e20a894e35e942c84f902ea29d..2e9e420b07e7017a8cd61fa3db93a0ab031f348a 100644 (file)
@@ -4,15 +4,14 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-utils git-r3 llvm multiprocessing python-single-r1 \
+inherit cmake-utils llvm llvm.org multiprocessing python-single-r1 \
        toolchain-funcs
 
 DESCRIPTION="The LLVM debugger"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/lldb
+LLVM_COMPONENTS=( lldb )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -45,13 +44,6 @@ pkg_setup() {
        python-single-r1_pkg_setup
 }
 
-src_unpack() {
-       local dirs=( lldb )
-       use test && dirs+=( llvm/lib/Testing/Support llvm/utils/unittest )
-       git-r3_fetch
-       git-r3_checkout '' '' '' "${dirs[@]}"
-}
-
 src_configure() {
        local mycmakeargs=(
                -DLLDB_DISABLE_CURSES=$(usex !ncurses)
@@ -78,7 +70,7 @@ src_configure() {
                -DLLDB_TEST_C_COMPILER="$(type -P clang)"
                -DLLDB_TEST_CXX_COMPILER="$(type -P clang++)"
 
-               -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm"
+               -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)")}"
        )