summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dev-libs/libr/libr-14.1.0.ebuild40
-rw-r--r--dev-libs/libr/libr-14.1.1.ebuild40
-rw-r--r--dev-libs/libr/libr-9999.ebuild41
-rw-r--r--dev-libs/libr/metadata.xml4
4 files changed, 104 insertions, 21 deletions
diff --git a/dev-libs/libr/libr-14.1.0.ebuild b/dev-libs/libr/libr-14.1.0.ebuild
index 2c217323..b5d8a36a 100644
--- a/dev-libs/libr/libr-14.1.0.ebuild
+++ b/dev-libs/libr/libr-14.1.0.ebuild
@@ -1,5 +1,5 @@
-# Copyright 1999-2023 Gentoo Authors
-# Copyright 2020-2023 The Trinity Desktop Project
+# Copyright 1999-2024 Gentoo Authors
+# Copyright 2020-2024 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -16,17 +16,43 @@ SLOT="0"
if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
+IUSE="+bfd elf man"
+REQUIRED_USE="?? ( bfd elf )"
-DEPEND="sys-libs/binutils-libs:="
+RDEPEND="
+ sys-libs/zlib:=
+ bfd? ( sys-libs/binutils-libs:= )
+ elf? ( virtual/libelf:= )
+"
DEPEND="${RDEPEND}
- app-text/doxygen
+ x11-libs/gtk+:2
"
+# NOTE: gtk uses weak linkage, so it's not necessary during runtime
+BDEPEND="man? ( app-text/doxygen )"
+
+pkg_setup() {
+ if ! use bfd && ! use elf; then
+ ewarn "You haven't selected nor \"bfd\" nor \"elf\" as a backend"
+ ewarn "a fallback read-only implementation will be used to"
+ ewarn "access elf resources, but modification of elf files will"
+ ewarn "be unavailable."
+ fi
+}
+
+src_prepare() {
+ trinity-base-2_src_prepare
+
+ if ! use man; then
+ rm -rf man || die
+ fi
+}
src_configure() {
local mycmakeargs=(
- -DWITH_BACKEND_LIBBFD=ON
- -DWITH_BACKEND_LIBELF=OFF
- -DWITH_BACKEND_READONLY=OFF
+ -DWITH_BACKEND_LIBBFD=$(usex bfd)
+ -DWITH_BACKEND_LIBELF=$(usex elf)
+ -DWITH_BACKEND_READONLY=$( (! use bfd && ! use elf) && echo yes || echo no )
)
+
cmake_src_configure
}
diff --git a/dev-libs/libr/libr-14.1.1.ebuild b/dev-libs/libr/libr-14.1.1.ebuild
index 2c217323..b5d8a36a 100644
--- a/dev-libs/libr/libr-14.1.1.ebuild
+++ b/dev-libs/libr/libr-14.1.1.ebuild
@@ -1,5 +1,5 @@
-# Copyright 1999-2023 Gentoo Authors
-# Copyright 2020-2023 The Trinity Desktop Project
+# Copyright 1999-2024 Gentoo Authors
+# Copyright 2020-2024 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -16,17 +16,43 @@ SLOT="0"
if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
+IUSE="+bfd elf man"
+REQUIRED_USE="?? ( bfd elf )"
-DEPEND="sys-libs/binutils-libs:="
+RDEPEND="
+ sys-libs/zlib:=
+ bfd? ( sys-libs/binutils-libs:= )
+ elf? ( virtual/libelf:= )
+"
DEPEND="${RDEPEND}
- app-text/doxygen
+ x11-libs/gtk+:2
"
+# NOTE: gtk uses weak linkage, so it's not necessary during runtime
+BDEPEND="man? ( app-text/doxygen )"
+
+pkg_setup() {
+ if ! use bfd && ! use elf; then
+ ewarn "You haven't selected nor \"bfd\" nor \"elf\" as a backend"
+ ewarn "a fallback read-only implementation will be used to"
+ ewarn "access elf resources, but modification of elf files will"
+ ewarn "be unavailable."
+ fi
+}
+
+src_prepare() {
+ trinity-base-2_src_prepare
+
+ if ! use man; then
+ rm -rf man || die
+ fi
+}
src_configure() {
local mycmakeargs=(
- -DWITH_BACKEND_LIBBFD=ON
- -DWITH_BACKEND_LIBELF=OFF
- -DWITH_BACKEND_READONLY=OFF
+ -DWITH_BACKEND_LIBBFD=$(usex bfd)
+ -DWITH_BACKEND_LIBELF=$(usex elf)
+ -DWITH_BACKEND_READONLY=$( (! use bfd && ! use elf) && echo yes || echo no )
)
+
cmake_src_configure
}
diff --git a/dev-libs/libr/libr-9999.ebuild b/dev-libs/libr/libr-9999.ebuild
index c9d18c32..6eac0053 100644
--- a/dev-libs/libr/libr-9999.ebuild
+++ b/dev-libs/libr/libr-9999.ebuild
@@ -1,5 +1,5 @@
-# Copyright 1999-2020 Gentoo Authors
-# Copyright 2020 The Trinity Desktop Project
+# Copyright 1999-2024 Gentoo Authors
+# Copyright 2020-2024 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -16,17 +16,44 @@ SLOT="0"
if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
+IUSE="+bfd elf gtk man"
+REQUIRED_USE="?? ( bfd elf )"
-DEPEND="sys-libs/binutils-libs:="
+RDEPEND="
+ sys-libs/zlib:=
+ bfd? ( sys-libs/binutils-libs:= )
+ elf? ( virtual/libelf:= )
+"
DEPEND="${RDEPEND}
- app-text/doxygen
+ gtk? ( x11-libs/gtk+:2 )
"
+# NOTE: gtk uses weak linkage, so it's not necessary during runtime
+BDEPEND="man? ( app-text/doxygen )"
+
+pkg_setup() {
+ if ! use bfd && ! use elf; then
+ ewarn "You haven't selected nor \"bfd\" nor \"elf\" as a backend"
+ ewarn "a fallback read-only implementation will be used to"
+ ewarn "access elf resources, but modification of elf files will"
+ ewarn "be unavailable."
+ fi
+}
+
+src_prepare() {
+ trinity-base-2_src_prepare
+
+ if ! use man; then
+ rm -rf man || die
+ fi
+}
src_configure() {
local mycmakeargs=(
- -DWITH_BACKEND_LIBBFD=ON
- -DWITH_BACKEND_LIBELF=OFF
- -DWITH_BACKEND_READONLY=OFF
+ -DWITH_BACKEND_LIBBFD=$(usex bfd)
+ -DWITH_BACKEND_LIBELF=$(usex elf)
+ -DWITH_BACKEND_READONLY=$( (! use bfd && ! use elf) && echo yes || echo no )
+ -DWITH_GTK=$(usex gtk)
)
+
cmake_src_configure
}
diff --git a/dev-libs/libr/metadata.xml b/dev-libs/libr/metadata.xml
index 689e1534..7e654264 100644
--- a/dev-libs/libr/metadata.xml
+++ b/dev-libs/libr/metadata.xml
@@ -5,4 +5,8 @@
<email>[email protected]</email>
<name>Trinity Gentoo ebuilds project</name>
</maintainer>
+ <use>
+ <flag name="bfd">Use libbfd from <pkg>sys-libs/binutils-libs</pkg> as a backend</flag>
+ <flag name="elf">Use libelf as a backend</flag>
+ </use>
</pkgmetadata>