commit:     67022c7de7d70dc3a9328e561ea5db3d1f8bfc73
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sat Dec 14 05:37:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 10:42:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67022c7d

sys-devel/dwz: use error-standalone-2.0

Bug: https://bugs.gentoo.org/946390
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/dwz/dwz-0.15-r4.ebuild | 72 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/sys-devel/dwz/dwz-0.15-r4.ebuild b/sys-devel/dwz/dwz-0.15-r4.ebuild
new file mode 100644
index 000000000000..4a04a9c3a97b
--- /dev/null
+++ b/sys-devel/dwz/dwz-0.15-r4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="DWARF optimization and duplicate removal tool"
+HOMEPAGE="https://sourceware.org/dwz";
+if [[ ${PV} == 9999 ]] ; then
+       EGIT_REPO_URI="https://sourceware.org/git/dwz.git";
+       inherit git-r3
+else
+       SRC_URI="https://sourceware.org/ftp/dwz/releases/${P}.tar.xz";
+       S="${WORKDIR}/${PN}"
+
+       #KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+       KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+fi
+
+LICENSE="GPL-2+ GPL-3+"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-libs/elfutils
+       dev-libs/xxhash
+       elibc_musl? (
+               >=sys-libs/error-standalone-2.0
+               sys-libs/obstack-standalone
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       test? (
+               dev-debug/gdb
+               dev-libs/elfutils[utils]
+               dev-util/dejagnu
+       )
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gdb-15.patch
+       "${FILESDIR}"/${P}-readelf.patch
+)
+
+src_prepare() {
+       default
+       tc-export CC
+}
+
+src_compile() {
+       tc-export PKG_CONFIG
+
+       export LIBS="-lelf"
+       if use elibc_musl; then
+               export CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags 
obstack-standalone error-standalone)"
+               export LIBS="${LIBS} $(${PKG_CONFIG} --libs obstack-standalone 
error-standalone)"
+       fi
+
+       emake CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}"
+}
+
+src_test() {
+       emake CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}" check
+}
+
+src_install() {
+       emake DESTDIR="${D}" CFLAGS="${CFLAGS}" LIBS="${LIBS}" srcdir="${S}" 
install
+}

Reply via email to