commit:     a911355cc79347604f2e533624aea5f332edcf7c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 20 17:24:57 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 20 17:26:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a911355c

dev-util/debugedit: make dwz an optfeature

mgorny and I discussed this ages ago but I never implemented it. dwz
is only used for `find-debuginfo` which basically nobody is going to use
in Gentoo (at least right now, see bug #938763 and bug #947387).

Avoid pulling in dwz on the system of everybody who wants installsources. This
is especially important as I'm contemplating proposing having debugedit in
@system.

Bug: https://bugs.gentoo.org/938763
Bug: https://bugs.gentoo.org/947387
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/debugedit/debugedit-5.2-r1.ebuild | 75 ++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/dev-util/debugedit/debugedit-5.2-r1.ebuild 
b/dev-util/debugedit/debugedit-5.2-r1.ebuild
new file mode 100644
index 000000000000..b8814e2410ff
--- /dev/null
+++ b/dev-util/debugedit/debugedit-5.2-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multiprocessing optfeature verify-sig toolchain-funcs
+
+DESCRIPTION="Create debuginfo and source file distributions"
+HOMEPAGE="https://sourceware.org/debugedit/";
+SRC_URI="
+       https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz
+       verify-sig? ( 
https://sourceware.org/ftp/debugedit/${PV}/${P}.tar.xz.sig )
+"
+
+LICENSE="GPL-3+ GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       >=dev-libs/elfutils-0.176-r1:=
+       >=dev-libs/xxhash-0.8:=
+       elibc_musl? ( >=sys-libs/error-standalone-2.0 )
+"
+RDEPEND="
+       ${DEPEND}
+"
+BDEPEND="
+       sys-apps/help2man
+       virtual/pkgconfig
+       test? (
+               app-alternatives/cpio
+               sys-devel/dwz
+       )
+       verify-sig? (
+               sec-keys/openpgp-keys-debugedit
+       )
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/debugedit.gpg
+
+PATCHES=(
+       "${FILESDIR}"/${P}-bashism.patch
+       "${FILESDIR}"/${P}-buildid.patch
+)
+
+src_configure() {
+       tc-export PKG_CONFIG
+
+       if use elibc_musl; then
+               export CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags 
error-standalone)"
+               export LIBS="${LIBS} $(${PKG_CONFIG} --libs error-standalone)"
+       fi
+
+       local myconf=(
+               # avoid BDEP on dwz
+               DWZ=dwz
+               ac_cv_dwz_j=yes
+
+               # We don't want to effectively bundle xxhash. It fails to
+               # build with -Og and such too (bug #956627).
+               --disable-inlined-xxhash
+       )
+       econf "${myconf[@]}"
+}
+
+src_test() {
+       local -x CCACHE_DISABLE=1
+       emake -Onone check TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
+}
+
+pkg_postinst() {
+        optfeature "dwz support in find-debuginfo" sys-devel/dwz
+}

Reply via email to