summaryrefslogtreecommitdiffstats
path: root/dev-libs/libr
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libr')
-rw-r--r--dev-libs/libr/Manifest1
-rw-r--r--dev-libs/libr/libr-14.1.2.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/dev-libs/libr/Manifest b/dev-libs/libr/Manifest
index 140ef93e..bb799bf5 100644
--- a/dev-libs/libr/Manifest
+++ b/dev-libs/libr/Manifest
@@ -1 +1,2 @@
DIST libr-trinity-14.1.1.tar.xz 83108 BLAKE2B 8931995598c56834aefc100578ccb251467d51047e43e9a70109176209adf3847cbf0b6e10f35e7b032c2cf4205aa788e09cb09c39168d7aabbc8f97996ce034 SHA512 81e1c1a712b3600402955a5a9d0444b408da7a14c7482b04c1d7c6c8877b66b0bd7022e30ee921d6a1e641929688a0678d10131780eed3adef78549da2fed97e
+DIST libr-trinity-14.1.2.tar.xz 82712 BLAKE2B e2ee5a1251ba6b8b2d3195f1523d6374551a135d20a52e8b269dc6926afd5f9bb20c82aff7f9e810865e8b6289e576df2f08a7ec632cebc7179afb52432d8b21 SHA512 1fe51a47ee0757de1e7ee30e4afd8eadb313daf800b6de67888f021386050b4556f9ddba1501a3846bade8ed4ea3d2b779557148bf52650b56cf27538fec7bcc
diff --git a/dev-libs/libr/libr-14.1.2.ebuild b/dev-libs/libr/libr-14.1.2.ebuild
new file mode 100644
index 00000000..6eac0053
--- /dev/null
+++ b/dev-libs/libr/libr-14.1.2.ebuild
@@ -0,0 +1,59 @@
+# 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"
+
+TRINITY_MODULE_TYPE="dependencies"
+TRINITY_MODULE_NAME="libr"
+inherit trinity-base-2
+
+DESCRIPTION="ELF resource access and editing library"
+HOMEPAGE="https://trinitydesktop.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+if [[ ${PV} != *9999* ]] ; then
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+IUSE="+bfd elf gtk man"
+REQUIRED_USE="?? ( bfd elf )"
+
+RDEPEND="
+ sys-libs/zlib:=
+ bfd? ( sys-libs/binutils-libs:= )
+ elf? ( virtual/libelf:= )
+"
+DEPEND="${RDEPEND}
+ 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=$(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
+}