diff options
author | Jakov Smolic <jakov.smolic@sartura.hr> | 2021-03-26 12:42:11 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-03-26 12:42:11 +0100 |
commit | 0ccb7db097e2ef5b28e2042733638b0a4b2eadbe (patch) | |
tree | 5705859751b99afbd3a1c8fdd9794b291d0c247f /sys-devel/elftoolchain | |
parent | sys-devel/bmake: Patch the default lib.mk rule (diff) | |
download | gentoo-0ccb7db097e2ef5b28e2042733638b0a4b2eadbe.tar.gz gentoo-0ccb7db097e2ef5b28e2042733638b0a4b2eadbe.tar.bz2 gentoo-0ccb7db097e2ef5b28e2042733638b0a4b2eadbe.zip |
sys-devel/elftoolchain: tools for building/analyzing ELF program images
* Elftoolchain contains a drop in replacement for libelf, released under
the BSD licence. It also provides replacements for other tools, such
as binutils, but in the scope of this contribution only libelf is added,
with posibillity of extending the tools at some point.
Closes: https://github.com/gentoo/gentoo/pull/18944
Closes: https://bugs.gentoo.org/762364
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-devel/elftoolchain')
-rw-r--r-- | sys-devel/elftoolchain/Manifest | 1 | ||||
-rw-r--r-- | sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild | 55 | ||||
-rw-r--r-- | sys-devel/elftoolchain/metadata.xml | 12 |
3 files changed, 68 insertions, 0 deletions
diff --git a/sys-devel/elftoolchain/Manifest b/sys-devel/elftoolchain/Manifest new file mode 100644 index 000000000000..40e9f23e39d8 --- /dev/null +++ b/sys-devel/elftoolchain/Manifest @@ -0,0 +1 @@ +DIST elftoolchain-0.7.1.tar.bz2 5361427 BLAKE2B f86204b3c89433948eaf2cd2edc57abf9b77bfab777dc2a840b7aa5fbddfd31665bd27f31d7af2dea09fab0118e201b12802b4da85f8210af29094661f6f1fe5 SHA512 8226c468b393f0d567167a9dd6b16d2a226227e4d05dab8f44550038da44dcbfb92749f8e1a4b130b893675337a6771e24a81f350f3f864b1b8b17402ed23b26 diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild new file mode 100644 index 000000000000..8b4360d62099 --- /dev/null +++ b/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Libraries/utilities to handle ELF objects (BSD drop in replacement for libelf)" +HOMEPAGE="https://wiki.freebsd.org/LibElf" +SRC_URI="https://netcologne.dl.sourceforge.net/project/elftoolchain/Sources/${P}/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + !dev-libs/elfutils + !dev-libs/libelf" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-vcs/subversion + sys-apps/lsb-release + >=sys-devel/bmake-20210206 + virtual/yacc" + +src_prepare() { + default + sed -i -e "s@cc@$(tc-getCC)@" common/native-elf-format || die + sed -i -e "s@readelf@$(tc-getREADELF)@" common/native-elf-format || die +} + +_bmake() { + bmake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LD="$(tc-getLD)" \ + RANLIB="$(tc-getRANLIB)" \ + "$@" || die +} + +src_compile() { + export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake + _bmake -C common + _bmake -C libelf +} + +src_install() { + doheader common/elfdefinitions.h + doheader libelf/{gelf,libelf}.h + + dolib.so libelf/libelf.so.1 + dosym libelf.so.1 /usr/$(get_libdir)/libelf.so + + dodoc README +} diff --git a/sys-devel/elftoolchain/metadata.xml b/sys-devel/elftoolchain/metadata.xml new file mode 100644 index 000000000000..9654d1c22bc0 --- /dev/null +++ b/sys-devel/elftoolchain/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jakov.smolic@sartura.hr</email> + <name>Jakov Smolic</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> |