diff options
| author | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-09-19 09:32:38 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-09-19 09:32:38 +0000 |
| commit | ce5478745a2dd82d291fd3bdd4d35dccaa8e577c (patch) | |
| tree | fbc7f620d2e2ff03e91538795d2768a1bbba5fe8 /dev-util/dtrace-utils | |
| parent | bcf39a3d50e05f33826ed7875426779e453068f1 (diff) | |
| download | srcux-ce5478745a2dd82d291fd3bdd4d35dccaa8e577c.tar.gz srcux-ce5478745a2dd82d291fd3bdd4d35dccaa8e577c.tar.xz srcux-ce5478745a2dd82d291fd3bdd4d35dccaa8e577c.zip | |
Updating liguros repo
Diffstat (limited to 'dev-util/dtrace-utils')
| -rw-r--r-- | dev-util/dtrace-utils/Manifest | 5 | ||||
| -rw-r--r-- | dev-util/dtrace-utils/dtrace-utils-1.2.1.ebuild | 38 | ||||
| -rw-r--r-- | dev-util/dtrace-utils/dtrace-utils-2.0.0.ebuild | 115 | ||||
| -rw-r--r-- | dev-util/dtrace-utils/files/fix-double-declaration-of-yylineno.patch | 30 |
4 files changed, 188 insertions, 0 deletions
diff --git a/dev-util/dtrace-utils/Manifest b/dev-util/dtrace-utils/Manifest new file mode 100644 index 000000000000..e79216bc49a0 --- /dev/null +++ b/dev-util/dtrace-utils/Manifest @@ -0,0 +1,5 @@ +AUX fix-double-declaration-of-yylineno.patch 943 BLAKE2B 2df1e4e89654b8b9670e8ac45e4db89c382787d25a2dcf5476e72624f76ae1a4d43b049872e356c28d78d9120abde118fbb3d344a5a94b4b11edc58547b51690 SHA512 c2ea8c8b5c10e4a013b2072d915379dd18bfa2825018f25b2b87a7e0ddd6fa9f8f32a7172d1e9ef2371cf232c4e95b7f93d0fc0fb951aac0042e9c0aff7cd05b +DIST 1.2.1-1.tar.gz 765847 BLAKE2B 26eec3ecdec4acbdaa8875c68c70ed179f913c2730be31ea18a68514e9c892b4988f790f4f49a7509cd584cb104a86334e1043af861b140db17f649f2b7d101f SHA512 86721beb91253de11683a6bb3605f3d00ccc59443013719bf319ace191e19f3a1d0a844d0746db6472ab425229074cb9a0dda06911afe9645cd709529613a770 +DIST 2.0.0-1.2.tar.gz 995469 BLAKE2B 9ded2e28a9759884decadad0bc9f9288e49030aacfc548f1155de7781cafb5c8f231e34b15f0825cf8f109bfa65859643c583a2458a2deadb9e67c0c82d17e3c SHA512 9ee75ddc28ea1d678463a2f4533bc6437a25e07e3b6da1b4f9d11ce44f3882aac746266774282156a05a7ccf0a59492fbc8c5482859e81f44d64c45f9780db9d +EBUILD dtrace-utils-1.2.1.ebuild 807 BLAKE2B f795a22124506324538cf2ebc38898998f75fbf4bf607f1c7f5b37a2897e20f06d1265c9e771f985f264119211ce998b74174abfd405f359d7646ed2f89f674a SHA512 6853642fbc36e94a7ed31dffcad3a4fc5c51e89604e7c8815fc6b5e41a985d414665a7861ea0496a843163a05a73a9460280211172499cd786cf5163fdf9371f +EBUILD dtrace-utils-2.0.0.ebuild 2888 BLAKE2B b2b970652196044f73adac7aa8c68ad9a0b87ff5502e41c141a3c86b35fbafbcab253bddb6865fac17e2ee8dbf16f8b55ea794fd5c1d9a21800650d1a4d36a1c SHA512 82f281fbcf331be04d74330ab173decbedfd257fb7606bb40e7b44c8fc4cd939cc25a0059dcd9c050206cc63de7f2ff046897cb4b39e1fa54a599ff1eff759b0 diff --git a/dev-util/dtrace-utils/dtrace-utils-1.2.1.ebuild b/dev-util/dtrace-utils/dtrace-utils-1.2.1.ebuild new file mode 100644 index 000000000000..793534a84ed4 --- /dev/null +++ b/dev-util/dtrace-utils/dtrace-utils-1.2.1.ebuild @@ -0,0 +1,38 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +HOMEPAGE="https://github.com/oracle/dtrace-utils" +DESCRIPTION="DTrace userspace utilities" + +LICENSE="GPL-2" +KEYWORDS="x86 amd64" + +SLOT="0" + +IUSE="test" + +RDEPEND=" + dev-libs/elfutils + dev-libs/libdtrace-ctf + sys-libs/zlib +" + +DEPEND=" + sys-devel/bison + sys-kernel/debian-sources[dtrace] + sys-devel/flex + virtual/os-headers +" + +DTRACE_UTILS_VER="1.2.1" +DTRACE_UTILS_REV="1" +DTRACE_UTILS_ARCHIVE="${DTRACE_UTILS_VER}-${DTRACE_UTILS_REV}.tar.gz" + +SRC_URI="https://github.com/oracle/dtrace-utils/archive/${DTRACE_UTILS_ARCHIVE}" + + +src_unpack() { + + unpack ${DTRACE_UTILS_ARCHIVE} && mv ${WORKDIR}/${PN}-${DTRACE_UTILS_VER}-${DTRACE_UTILS_REV} ${WORKDIR}/${PN}-${DTRACE_UTILS_VER} || die "failed to unpack archive" +}
\ No newline at end of file diff --git a/dev-util/dtrace-utils/dtrace-utils-2.0.0.ebuild b/dev-util/dtrace-utils/dtrace-utils-2.0.0.ebuild new file mode 100644 index 000000000000..421620d83cc3 --- /dev/null +++ b/dev-util/dtrace-utils/dtrace-utils-2.0.0.ebuild @@ -0,0 +1,115 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +HOMEPAGE="https://github.com/oracle/dtrace-utils" +DESCRIPTION="DTrace userspace utilities" + +LICENSE="GPL-2" +KEYWORDS="x86 amd64" + +SLOT="0" + +IUSE="test" + +RDEPEND=" + dev-libs/elfutils + dev-libs/libdtrace-ctf + sys-libs/zlib +" + +DEPEND=" + sys-devel/bison + sys-devel/binutils[multitarget] + sys-devel/clang + sys-devel/flex + dev-libs/libbpf + net-libs/libpcap + virtual/os-headers +" + +DTRACE_UTILS_VER="2.0.0" +DTRACE_UTILS_REV="1.2" +DTRACE_UTILS_ARCHIVE="${DTRACE_UTILS_VER}-${DTRACE_UTILS_REV}.tar.gz" + +SRC_URI="https://github.com/oracle/dtrace-utils/archive/${DTRACE_UTILS_ARCHIVE}" + +BPF_HEADERS=( + bpf.h + bpf_core_read.h + bpf_endian.h + bpf_helper_defs.h + bpf_helpers.h + bpf_tracing.h + btf.h + libbpf.h + libbpf_common.h + libbpf_util.h + xsk.h +) + +pkg_setup() { + + for files_to_symlink in ${BPF_HEADERS[*]} ; do + if [[ ! -h "${EROOT}"/usr/include/"${files_to_symlink}" ]]; then + ln -s ${EROOT}/usr/include/bpf/"${files_to_symlink}" ${EROOT}/usr/include/"${files_to_symlink}" + fi + done +} + +src_unpack() { + + # unpack sources + unpack ${DTRACE_UTILS_ARCHIVE} && mv ${WORKDIR}/${PN}-${DTRACE_UTILS_VER}-${DTRACE_UTILS_REV} ${WORKDIR}/${PN}-${DTRACE_UTILS_VER} || die "failed to unpack archive" +} + +src_prepare() { + + # punt unless USE=test + if ! use test; then + rm -rf test + fi + + eapply ${FILESDIR}/fix-double-declaration-of-yylineno.patch || die "patch failed" + + # upstream depends on bpf-helpers.h from gcc... which isn't very portable (and is scheduled for removal). + # libbpf ships bpf_helpers.h etc... so we sed that change across the source files. + find . -type f -exec sed -i -e 's/bpf-helpers.h/bpf_helpers.h/g' {} \; || die "bpf-helpers.h sed failed" + + # apply any user patches + eapply_user +} + +src_configure() { + + # create the build directory + mkdir "${WORKDIR}"/build + + # DTrace-utils requires a bpf target enabled compiler. + # Both gcc and clang support this, however gcc requires it be setup as an additional cross-compiler... + # whereas clang supports this natively, with no additional cross-compilers required. + # + # I can't really be bothered to create minimal gcc-bpf and binutils-bpf packages, + # nor do I think it is a good idea to depend on crossdev for this dependency. + # So for now we shall use clang... + MAKEARGS=( + BPFC="${CHOST}-clang" + BPFLD="$(tc-getLD)" + ) +} + +src_compile() { + + emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all || "build failed" +} + +pkg_postrm() { + + for symlinks_to_remove in ${BPF_HEADERS[*]} ; do + if [[ -h "${EROOT}"/usr/include/"${symlinks_to_remove}" ]]; then + rm -rf "${EROOT}"/usr/include/"${symlinks_to_remove}" + fi + done +} diff --git a/dev-util/dtrace-utils/files/fix-double-declaration-of-yylineno.patch b/dev-util/dtrace-utils/files/fix-double-declaration-of-yylineno.patch new file mode 100644 index 000000000000..7ad4d85a5244 --- /dev/null +++ b/dev-util/dtrace-utils/files/fix-double-declaration-of-yylineno.patch @@ -0,0 +1,30 @@ +From 470176a657a40d48b3947ee174d50f8d1655b768 Mon Sep 17 00:00:00 2001 +From: Kris Van Hees <kris.van.hees@oracle.com> +Date: Wed, 26 Aug 2020 21:35:39 -0400 +Subject: [PATCH] Fix double declaration of yylineno + +The yylineno variable was declared in dt_cc.c *and* in dt_lex.c (which +is generated from dt_lex.l). This poses a compilation issue with some +newer compilers. The declaration in dt_cc,c has been changed into an +extern declaration, while the one in dt_lex.c is kept as the actual +variable declaration. + +Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> +--- + libdtrace/dt_cc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdtrace/dt_cc.c b/libdtrace/dt_cc.c +index f29a21f0..f1ac0776 100644 +--- a/libdtrace/dt_cc.c ++++ b/libdtrace/dt_cc.c +@@ -91,7 +91,7 @@ + #include <dt_bpf.h> + #include <bpf_asm.h> + +-int yylineno; ++extern int yylineno; + + #ifdef FIXME + static const dtrace_diftype_t dt_void_rtype = { + |
