diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/debugedit |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/debugedit')
-rw-r--r-- | dev-util/debugedit/Manifest | 8 | ||||
-rw-r--r-- | dev-util/debugedit/debugedit-5.3.5-r1.ebuild | 38 | ||||
-rw-r--r-- | dev-util/debugedit/files/Makefile | 11 | ||||
-rw-r--r-- | dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch | 129 | ||||
-rwxr-xr-x | dev-util/debugedit/files/update.sh | 84 | ||||
-rw-r--r-- | dev-util/debugedit/metadata.xml | 8 |
6 files changed, 278 insertions, 0 deletions
diff --git a/dev-util/debugedit/Manifest b/dev-util/debugedit/Manifest new file mode 100644 index 000000000000..074d76bcdcc1 --- /dev/null +++ b/dev-util/debugedit/Manifest @@ -0,0 +1,8 @@ +AUX Makefile 143 SHA256 36e9d1c153b6dea6f2b337f0aa2749e207f38e4cf438d144f38b01e1e500719a SHA512 f8b870bda202f170551e3f9c305f2b6c8c47d0df82e257c8164f79af4a25ce8707c3da50b5bc8414283c8a4ac5ecdb5a802df7c2bdd435eebc59382533bc5875 WHIRLPOOL dee7884edc646a57d1b42d194bbcb244ce9d9095111a622a6a5374e79d9822bcdeaf2fafa44f7180df805f65ec944e2998b2d301fe210a0d66ba4885d1e3a381 +AUX debugedit-5.3.5-DWARF-4.patch 3235 SHA256 ab01e2a5fe5e77ba5254858d2cc800d7129cb932498f43866a02d5842675d6bd SHA512 594bed4c2433e15c840316ca132619fc2b65ea5477cfe416ef851414d44932b3f8e75d006025eefbfc9c6cdcea956ff9ffc28dd4ef4fe5858a486ce5d08f43af WHIRLPOOL c1d9052edffb0d8594dc94e0ceb73f47452c54ccc25cbede484abde75bf9342647250b85724d16ebc984615382a6e00b0dafb8474ffa806fa64e3c8c246ffff7 +AUX update.sh 1690 SHA256 dee47083f18459d62857b22aecfba31400200e5ba17eec5a884b413e50e605a8 SHA512 5b271427d6391f717286289c5ec6eb794e99b7f0bd966100d3db03f84507000bc9256526f4ad6cdf809ff1800d53d5ed64d76bb14733507563d7a6123c9fc422 WHIRLPOOL d509050ef7c00c0a88753cfb2a2ea8d7c6fa995c1d16effba64a7c711bb4f3476c7cc8324967a4420fdf0011640ee83e1455563f0e2c2618e7779b0c99c573b8 +DIST debugedit-5.3.5.tar.bz2 27799 SHA256 150461508dfd7791c9408c33248e5271e837167fdfa11d69d6fb51cc16d90663 SHA512 afac800a8f2e035705fcf997500d8fd2c3dc658850f47754863e8811db97859748721c5a252cc90dc81d07bf08763a9507e2272e983ee3f6bf16d8016fe5b8c9 WHIRLPOOL f3ae87994c7b9f3233502b4212b9036eae169b0ed18632c4565cf7f299012c4ef02558f476ebc4d17f3bb82c64eba8b7ed180138b66062c215546747e64c2025 +EBUILD debugedit-5.3.5-r1.ebuild 839 SHA256 0935ff044a94f9649b06dce22db58ca7d12178dbbbdaff91bfcbe9cba6e99339 SHA512 692e99f06c5ff651970549cdd37d0c6f50cd86271d11d75a3e71e5696aead523f9c0a109f46314fa728aafbb1ffc4ffcf4b8818acb0d5476838483fa2db7aaa6 WHIRLPOOL 6e808a414b1d9595d41ffd7f540aeec6505d70349d00b304bd5474dc98dd7ea1da6d0256229974f3327004b5c91165d36405505440b905bf7292b2632d51d388 +MISC ChangeLog 3561 SHA256 b1ca17102c16a290b1a517ab3d7efa2bfb272fa2f6568a4d5e780ce36672ddcf SHA512 9fe29edf6b02e0ade0cdf13b240c44acc05c9cef1f8c84ca2d69eebb3990dc4e79ba67c0d7a209a0701cd9e8e417e5d5b9ba8937a1177a29d1acfa9b75414de5 WHIRLPOOL 10c73332096ddafb7c881e3f4dd93b49c64143236d178db5769ec92ec623c3e70adbcfbd9bafec391efde80a4c9d9444f395aae44e1fb90e280afef066fa4ed0 +MISC ChangeLog-2015 4951 SHA256 75ce1c8cca7f197c54476edbe8cfb1238616fc34e0eaa279d0b0873f34f6b721 SHA512 9002f8a8f0bcf35dab461025623871e86225dc2bad54e57272d1b3496179bd4b06afdfb9f57703902b71ba7ca03f1fe3953c044fa6feeb04f1f1524d5122229f WHIRLPOOL 9bb6e6b9d50955388f6ac66035ab75553d21b767d54a9251a6ba386766739088dfa2e3889d53fadde8a84e24d50c5b28e8b28d36066d4578f5e026d68689f3ae +MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8 diff --git a/dev-util/debugedit/debugedit-5.3.5-r1.ebuild b/dev-util/debugedit/debugedit-5.3.5-r1.ebuild new file mode 100644 index 000000000000..c4baa6c94f3d --- /dev/null +++ b/dev-util/debugedit/debugedit-5.3.5-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# To recreate this tarball, just grab latest rpm5 release: +# http://rpm5.org/files/rpm/ +# The files are in tools/ +# Or see $FILESDIR/update.sh + +EAPI="5" + +inherit toolchain-funcs eutils + +DESCRIPTION="standalone debugedit taken from rpm" +HOMEPAGE="http://www.rpm5.org/" +SRC_URI="https://dev.gentoo.org/~swegener/distfiles/${P}.tar.bz2 + https://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ~ia64 ppc ppc64 x86 ~amd64-linux ~arm-linux ~x86-linux" +IUSE="" + +DEPEND="dev-libs/popt + dev-libs/elfutils + dev-libs/beecrypt" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-5.3.5-DWARF-4.patch #400663 +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin debugedit +} diff --git a/dev-util/debugedit/files/Makefile b/dev-util/debugedit/files/Makefile new file mode 100644 index 000000000000..946a12865f64 --- /dev/null +++ b/dev-util/debugedit/files/Makefile @@ -0,0 +1,11 @@ +CPPFLAGS += -I. +LDLIBS = -lelf -lpopt -lbeecrypt + +all: debugedit + +debugedit: debugedit.o hashtab.o + +clean: + rm -f *.o debugedit + +.PHONY: clean diff --git a/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch b/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch new file mode 100644 index 000000000000..3e1406196e9b --- /dev/null +++ b/dev-util/debugedit/files/debugedit-5.3.5-DWARF-4.patch @@ -0,0 +1,129 @@ +add DWARF 4 support + +https://bugs.gentoo.org/400663 +https://bugzilla.redhat.com/show_bug.cgi?id=707677 + +--- debugedit-5.3.5/debugedit.c 2011-10-11 05:37:49.000000000 +0200 ++++ debugedit-5.3.5/debugedit.c 2012-01-25 01:27:23.487999039 +0100 +@@ -70,6 +70,10 @@ + #include <rpmtag.h> + + #define DW_TAG_partial_unit 0x3c ++#define DW_FORM_sec_offset 0x17 ++#define DW_FORM_exprloc 0x18 ++#define DW_FORM_flag_present 0x19 ++#define DW_FORM_ref_sig8 0x20 + + char *base_dir = NULL; + char *dest_dir = NULL; +@@ -246,6 +250,7 @@ + #define DEBUG_STR 8 + #define DEBUG_FRAME 9 + #define DEBUG_RANGES 10 ++#define DEBUG_TYPES 11 + { ".debug_info", NULL, NULL, 0, 0, 0 }, + { ".debug_abbrev", NULL, NULL, 0, 0, 0 }, + { ".debug_line", NULL, NULL, 0, 0, 0 }, +@@ -257,6 +262,7 @@ + { ".debug_str", NULL, NULL, 0, 0, 0 }, + { ".debug_frame", NULL, NULL, 0, 0, 0 }, + { ".debug_ranges", NULL, NULL, 0, 0, 0 }, ++ { ".debug_types", NULL, NULL, 0, 0, 0 }, + { NULL, NULL, NULL, 0, 0, 0 } + }; + +@@ -349,7 +355,8 @@ + goto no_memory; + } + form = read_uleb128 (ptr); +- if (form == 2 || form > DW_FORM_indirect) ++ if (form == 2 ++ || (form > DW_FORM_flag_present && form != DW_FORM_ref_sig8)) + { + error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form); + htab_delete (h); +@@ -378,7 +385,6 @@ + canonicalize_path (const char *s, char *d) + { + char *rv = d; +- const char *sroot; + char *droot; + + if (IS_DIR_SEPARATOR (*s)) +@@ -394,7 +400,6 @@ + s++; + } + droot = d; +- sroot = s; + + while (*s) + { +@@ -513,7 +518,7 @@ + } + + value = read_16 (ptr); +- if (value != 2 && value != 3) ++ if (value != 2 && value != 3 && value != 4) + { + error (0, 0, "%s: DWARF version %d unhandled", dso->filename, + value); +@@ -529,8 +534,8 @@ + return 1; + } + +- opcode_base = ptr[4]; +- ptr = dir = ptr + 4 + opcode_base; ++ opcode_base = ptr[4 + (value >= 4)]; ++ ptr = dir = ptr + 4 + (value >= 4) + opcode_base; + + /* dir table: */ + value = 1; +@@ -758,7 +763,8 @@ + { + if (t->attr[i].attr == DW_AT_stmt_list) + { +- if (form == DW_FORM_data4) ++ if (form == DW_FORM_data4 ++ || form == DW_FORM_sec_offset) + { + list_offs = do_read_32_relocated (ptr); + found_list_offs = 1; +@@ -864,6 +870,8 @@ + else + ptr += 4; + break; ++ case DW_FORM_flag_present: ++ break; + case DW_FORM_addr: + ptr += ptr_size; + break; +@@ -878,10 +886,12 @@ + break; + case DW_FORM_ref4: + case DW_FORM_data4: ++ case DW_FORM_sec_offset: + ptr += 4; + break; + case DW_FORM_ref8: + case DW_FORM_data8: ++ case DW_FORM_ref_sig8: + ptr += 8; + break; + case DW_FORM_sdata: +@@ -910,6 +920,7 @@ + form = DW_FORM_block1; + break; + case DW_FORM_block: ++ case DW_FORM_exprloc: + len = read_uleb128 (ptr); + form = DW_FORM_block1; + assert (len < UINT_MAX); +@@ -1213,7 +1224,7 @@ + } + + cu_version = read_16 (ptr); +- if (cu_version != 2 && cu_version != 3) ++ if (cu_version != 2 && cu_version != 3 && cu_version != 4) + { + error (0, 0, "%s: DWARF version %d unhandled", dso->filename, + cu_version); diff --git a/dev-util/debugedit/files/update.sh b/dev-util/debugedit/files/update.sh new file mode 100755 index 000000000000..3fed29ad6dc2 --- /dev/null +++ b/dev-util/debugedit/files/update.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +DISTDIR="$(portageq envvar DISTDIR 2>/dev/null)" +DISTDIR="${DISTDIR:-/usr/portage/distfiles}" +if [[ ! -d "${DISTDIR}" ]] ; then + echo "No DISTDIR found." + exit 1 +fi + +PN=debugedit + +gentoo_functions="/lib/gentoo/functions.sh" +if [[ -f "${gentoo_functions}" ]] ; then + . "${gentoo_functions}" +else + echo "Failed to source ${gentoo_functions} file." + echo "Please install sys-apps/gentoo-functions package." + exit 1 +fi + +set -e + +einfo "Getting updated index" +rm -f index.html +wget -q http://rpm5.org/ + +PV=$(sed -n '/Production:/{n;s:.*RPM ::;s:<.*::;p;q}' index.html) +einfo "Latest upstream version: ${PV}" +rm -f index.html + +P="${PN}-${PV}" +A=${P}.tar.bz2 + +e=${P}.ebuild +if [[ -e ../${e} ]] ; then + einfo "All up to date" + exit 0 +fi + +#tf=${DISTDIR}/${A} +#if [[ ! -e ${tf} ]] ; then +# einfo "Cannot find ${tf}" +# exit 0 +#fi + +einfo "Fetching latest rpm tarball" +r=rpm-${PV} +wget -nv http://rpm5.org/files/rpm/rpm-${PV%.*}/${r}.tar.gz -P ${DISTDIR} -c + +einfo "Unpacking ${r}" +rm -rf ${r} +tar xf ${DISTDIR}/${r}.tar.gz + +einfo "Creating ${P}" +rm -rf ${P} +mkdir ${P} +cp Makefile ${r}/tools/{hashtab.?,debugedit.c} ${P}/ +pushd ${P} >/dev/null +more=true +while ${more} ; do + more=false + for h in $(grep '#include' *.[ch] | awk '{print $NF}' | sed 's:[<>"]::g') ; do + [[ ${h} == */* ]] && continue + rh=$(find ../${r} -name ${h##*/}) + if [[ -n ${rh} ]] && [[ ! -e ${rh##*/} ]] ; then + # don't copy glibc includes + if ! grep -qs 'This file is part of the GNU C Library' ${rh} ; then + cp ${rh} ./ + more=true + fi + fi + done +done +popd >/dev/null +tar jcf ${A} ${P} + +einfo "Testing build" +pushd ${P} >/dev/null +make -s +popd >/dev/null + +einfo "Cleaning up" +rm -rf ${P} ${r} +du -b ${A} diff --git a/dev-util/debugedit/metadata.xml b/dev-util/debugedit/metadata.xml new file mode 100644 index 000000000000..56c124413057 --- /dev/null +++ b/dev-util/debugedit/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +</pkgmetadata> |