From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1365022-garchives=archives.gentoo.org@lists.gentoo.org>
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 E0F58158087
	for <garchives@archives.gentoo.org>; Sun,  6 Feb 2022 15:35:14 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D57282BC056;
	Sun,  6 Feb 2022 15:35:10 +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))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id B8C8C2BC051
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Feb 2022 15:35:10 +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))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 19841342C3C
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Feb 2022 15:35:09 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8D2182E0
	for <gentoo-commits@lists.gentoo.org>; Sun,  6 Feb 2022 15:35:04 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
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" <mgorny@gentoo.org>
Message-ID: <1644161664.1357da07d352006702bb9808ae68ac4f964dc7a1.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/lldb/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/lldb/lldb-15.0.0.9999.ebuild
X-VCS-Directories: dev-util/lldb/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 1357da07d352006702bb9808ae68ac4f964dc7a1
X-VCS-Branch: master
Date: Sun,  6 Feb 2022 15:35:04 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 17eabbe9-994a-46c9-b8b6-6dad8ca17ddf
X-Archives-Hash: 028717c24b0efdc711f0613d671efe36

commit:     1357da07d352006702bb9808ae68ac4f964dc7a1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  6 15:16:45 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb  6 15:34:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1357da07

dev-util/lldb: Add 15.x live ebuild

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-util/lldb/lldb-15.0.0.9999.ebuild | 106 ++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/dev-util/lldb/lldb-15.0.0.9999.ebuild b/dev-util/lldb/lldb-15.0.0.9999.ebuild
new file mode 100644
index 000000000000..8e5622759466
--- /dev/null
+++ b/dev-util/lldb/lldb-15.0.0.9999.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug +libedit lzma ncurses +python test +xml"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+RESTRICT="test"
+
+RDEPEND="
+	libedit? ( dev-libs/libedit:0= )
+	lzma? ( app-arch/xz-utils:= )
+	ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+	python? (
+		$(python_gen_cond_dep '
+			dev-python/six[${PYTHON_USEDEP}]
+		')
+		${PYTHON_DEPS}
+	)
+	xml? ( dev-libs/libxml2:= )
+	~sys-devel/clang-${PV}
+	~sys-devel/llvm-${PV}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	>=dev-util/cmake-3.16
+	python? ( >=dev-lang/swig-3.0.11 )
+	test? (
+		$(python_gen_cond_dep "
+			~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+			dev-python/psutil[\${PYTHON_USEDEP}]
+		")
+		sys-devel/lld
+	)
+	${PYTHON_DEPS}"
+
+LLVM_COMPONENTS=( lldb )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+llvm.org_set_globals
+
+pkg_setup() {
+	LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_configure() {
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	local mycmakeargs=(
+		-DLLDB_ENABLE_CURSES=$(usex ncurses)
+		-DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+		-DLLDB_ENABLE_PYTHON=$(usex python)
+		-DLLDB_ENABLE_LZMA=$(usex lzma)
+		-DLLDB_ENABLE_LIBXML2=$(usex xml)
+		-DLLDB_USE_SYSTEM_SIX=1
+		-DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+		-DLLDB_INCLUDE_TESTS=$(usex test)
+
+		-DCLANG_LINK_CLANG_DYLIB=ON
+		# 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
+
+		-DLLDB_EXTERNAL_CLANG_RESOURCE_DIR="${BROOT}/usr/lib/clang/${PV%_*}"
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+	use test && mycmakeargs+=(
+		-DLLVM_BUILD_TESTS=$(usex test)
+		-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+		-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	local -x LIT_PRESERVES_TMP=1
+	cmake_build check-lldb-{shell,unit}
+	# failures + hangs
+	#use python && cmake_build check-lldb-api
+}
+
+src_install() {
+	cmake_src_install
+	find "${D}" -name '*.a' -delete || die
+
+	use python && python_optimize
+}