summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-debug/drgn/Manifest1
-rw-r--r--dev-debug/drgn/drgn-0.0.31.ebuild66
-rw-r--r--dev-debug/drgn/metadata.xml3
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-debug/drgn/Manifest b/dev-debug/drgn/Manifest
index 1d33818fa1b2..601938d5b0fa 100644
--- a/dev-debug/drgn/Manifest
+++ b/dev-debug/drgn/Manifest
@@ -1 +1,2 @@
DIST drgn-0.0.30.tar.gz 1268753 BLAKE2B 28fc686771f0eebca4c8be6a4552e0d8ca060ea1d39d656768d807f8115323ca00f1a9311d3aa5208d2a609fa296cda691f350e545b1e23b5ef0b200a9d6f77b SHA512 6c17052baf5c2295167e41e5b7fd9899c1ca90af6f83704034371827953f690c034415780c4f45d20e1235085c198cf69e8ee9bdbf8081e22e3f860d21e839e9
+DIST drgn-0.0.31.tar.gz 1493026 BLAKE2B fe4714a5492e6d7059d699183e36b3cb51f0c52a648e73dfa7e81443ab124b6d06a2b0b2a562c3fe98771e8939f362fc1f1f957a5dbd59664595a26187cf75a9 SHA512 9a851e0968ad660c39ff3b26ff1f478a7622db8ddae0c35b60b2db8bc96f3b53e519e0782c1d57171cf45e02db60701d5958190df18b1a41c283a31feb7fc1d2
diff --git a/dev-debug/drgn/drgn-0.0.31.ebuild b/dev-debug/drgn/drgn-0.0.31.ebuild
new file mode 100644
index 000000000000..7a098af1e83d
--- /dev/null
+++ b/dev-debug/drgn/drgn-0.0.31.ebuild
@@ -0,0 +1,66 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit distutils-r1 multiprocessing pypi toolchain-funcs
+
+DESCRIPTION="Programmable debugger"
+HOMEPAGE="
+ https://github.com/osandov/drgn
+ https://pypi.org/project/drgn/
+ https://drgn.readthedocs.io/en/latest/
+"
+
+LICENSE="LGPL-2.1+"
+# Note that as of 0.0.31 at least, the API+ABI of libdrgn is unstable.
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="debuginfod openmp"
+
+DEPEND="
+ >=dev-libs/elfutils-0.165
+ dev-libs/libkdumpfile:=
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ test? ( dev-libs/check )
+"
+
+distutils_enable_tests unittest
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ tc-export AR CC OBJCOPY OBJDUMP PKG_CONFIG RANLIB STRIP
+
+ cat >> setup.cfg <<-EOF || die
+ [build_ext]
+ parallel = $(makeopts_jobs)
+ EOF
+
+ # setuptools calls autotools (!)
+ export CONFIGURE_FLAGS
+ CONFIGURE_FLAGS="--disable-dependency-tracking --disable-silent-rules"
+ CONFIGURE_FLAGS+=" --with-libkdumpfile"
+ CONFIGURE_FLAGS+=" --enable-libdrgn"
+ CONFIGURE_FLAGS+=" --enable-python-extension"
+ CONFIGURE_FLAGS+=" --disable-dlopen-debuginfod"
+ CONFIGURE_FLAGS+=" $(use_with debuginfod)"
+ CONFIGURE_FLAGS+=" $(use_enable openmp)"
+ CONFIGURE_FLAGS+=" --build=${CBUILD}"
+ CONFIGURE_FLAGS+=" --host=${CHOST}"
+ CONFIGURE_FLAGS+=" --target=${CTARGET}"
+ distutils-r1_src_configure
+}
diff --git a/dev-debug/drgn/metadata.xml b/dev-debug/drgn/metadata.xml
index 277a11e65a36..abc3cbd0bd21 100644
--- a/dev-debug/drgn/metadata.xml
+++ b/dev-debug/drgn/metadata.xml
@@ -9,4 +9,7 @@
<remote-id type="pypi">drgn</remote-id>
<remote-id type="github">osandov/drgn</remote-id>
</upstream>
+ <use>
+ <flag name="debuginfod">Enable debuginfod support</flag>
+ </use>
</pkgmetadata>