summaryrefslogtreecommitdiff
path: root/dev-util
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-22 11:40:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-22 11:40:06 +0100
commit7a86906b67693cc65671d3e1476835d3a7e13092 (patch)
tree9de1b9e2cf77833183d4e5ffab2e94d0403ef725 /dev-util
parentd56d144655e3785864da43c9acb6c228ef9360ae (diff)
gentoo resync : 22.06.2019
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/bazel/bazel-0.27.0.ebuild121
-rw-r--r--dev-util/bpftrace/bpftrace-0.9.1_rc.ebuild68
-rw-r--r--dev-util/byacc/byacc-20190616.ebuild18
-rw-r--r--dev-util/comparator/comparator-2.12.ebuild40
-rw-r--r--dev-util/radare2/files/radare2-3.5.1-mount-free.patch22
-rw-r--r--dev-util/radare2/radare2-3.5.1-r1.ebuild60
6 files changed, 329 insertions, 0 deletions
diff --git a/dev-util/bazel/bazel-0.27.0.ebuild b/dev-util/bazel/bazel-0.27.0.ebuild
new file mode 100644
index 000000000000..3011c92b93f3
--- /dev/null
+++ b/dev-util/bazel/bazel-0.27.0.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 java-pkg-2 multiprocessing
+
+DESCRIPTION="Fast and correct automated build system"
+HOMEPAGE="https://bazel.build/"
+
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples test tools"
+# strip corrupts the bazel binary
+RESTRICT="strip test? ( network-sandbox ) !test? ( test )"
+RDEPEND=">=virtual/jdk-1.8:*"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ app-arch/zip"
+
+S="${WORKDIR}"
+QA_FLAGS_IGNORED="usr/bin/bazel"
+
+bazel-get-flags() {
+ local i fs=()
+ for i in ${CFLAGS}; do
+ fs+=( "--copt=${i}" "--host_copt=${i}" )
+ done
+ for i in ${CXXFLAGS}; do
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
+ done
+ for i in ${CPPFLAGS}; do
+ fs+=( "--copt=${i}" "--host_copt=${i}" )
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
+ done
+ for i in ${LDFLAGS}; do
+ fs+=( "--linkopt=${i}" "--host_linkopt=${i}" )
+ done
+ echo "${fs[*]}"
+}
+
+pkg_setup() {
+ echo ${PATH} | grep -q ccache && \
+ ewarn "${PN} usually fails to compile with ccache, you have been warned"
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ # Only unpack the main distfile
+ unpack ${P}-dist.zip
+}
+
+src_prepare() {
+ default
+
+ # F: fopen_wr
+ # S: deny
+ # P: /proc/self/setgroups
+ # A: /proc/self/setgroups
+ # R: /proc/24939/setgroups
+ # C: /usr/lib/systemd/systemd
+ addpredict /proc
+
+ # Use standalone strategy to deactivate the bazel sandbox, since it
+ # conflicts with FEATURES=sandbox.
+ cat > "${T}/bazelrc" <<-EOF || die
+ build --verbose_failures
+ build --spawn_strategy=standalone --genrule_strategy=standalone
+
+ build --distdir="${S}/derived/distdir/"
+ build --jobs=$(makeopts_jobs) $(bazel-get-flags)
+
+ test --verbose_failures --verbose_test_summary
+ test --spawn_strategy=standalone --genrule_strategy=standalone
+ EOF
+}
+
+src_compile() {
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) --host_javabase=@local_jdk//:jdk"
+ VERBOSE=yes ./compile.sh || die
+
+ ./scripts/generate_bash_completion.sh \
+ --bazel=output/bazel \
+ --output=bazel-complete.bash \
+ --prepend=scripts/bazel-complete-header.bash \
+ --prepend=scripts/bazel-complete-template.bash
+}
+
+src_test() {
+ output/bazel test \
+ --verbose_failures \
+ --spawn_strategy=standalone \
+ --genrule_strategy=standalone \
+ --verbose_test_summary \
+ examples/cpp:hello-success_test || die
+ output/bazel shutdown
+}
+
+src_install() {
+ dobin output/bazel
+ newbashcomp bazel-complete.bash ${PN}
+ bashcomp_alias ${PN} ibazel
+ insinto /usr/share/zsh/site-functions
+ doins scripts/zsh_completion/_bazel
+
+ if use examples; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ # could really build tools but I don't know which ones
+ # are actually used
+ if use tools; then
+ docinto tools
+ dodoc -r tools/*
+ docompress -x /usr/share/doc/${PF}/tools
+ fi
+}
diff --git a/dev-util/bpftrace/bpftrace-0.9.1_rc.ebuild b/dev-util/bpftrace/bpftrace-0.9.1_rc.ebuild
new file mode 100644
index 000000000000..5fcb41040f5d
--- /dev/null
+++ b/dev-util/bpftrace/bpftrace-0.9.1_rc.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs linux-info cmake-utils
+
+DESCRIPTION="High-level tracing language for eBPF"
+HOMEPAGE="https://github.com/iovisor/bpftrace"
+
+if [[ ${PV} =~ 9{4,} ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/iovisor/${PN}"
+ BDEPEND=""
+else
+ MY_PV="${PV//_/}"
+ SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ BDEPEND="app-arch/xz-utils "
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="test"
+
+COMMON_DEPEND="dev-util/systemtap
+ sys-devel/clang:=
+ dev-libs/libbpf:=
+ >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)]
+ >=dev-util/bcc-0.10.0:=
+ virtual/libelf"
+DEPEND="${COMMON_DEPEND}
+ test? ( dev-cpp/gtest )"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND+="dev-util/cmake
+ sys-devel/flex
+ sys-devel/bison"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so"
+
+PATCHES=(
+ "${FILESDIR}/bpftrace-0.10_pre20190614-install-libs.patch"
+ "${FILESDIR}/bpftrace-mandir.patch"
+)
+
+# lots of fixing needed
+RESTRICT="test"
+
+pkg_pretend() {
+ local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~BPF_JIT ~BPF_EVENTS"
+
+ check_extra_config
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local -a mycmakeargs
+ mycmakeargs=(
+ "-DSTATIC_LINKING:BOOL=OFF"
+ "-DBUILD_TESTING:BOOL=OFF"
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/dev-util/byacc/byacc-20190616.ebuild b/dev-util/byacc/byacc-20190616.ebuild
new file mode 100644
index 000000000000..52031138194a
--- /dev/null
+++ b/dev-util/byacc/byacc-20190616.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="the best variant of the Yacc parser generator"
+HOMEPAGE="https://invisible-island.net/byacc/byacc.html"
+SRC_URI="https://invisible-mirror.net/archives/byacc/${P}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CHANGES NEW_FEATURES NOTES README )
+
+src_configure() {
+ econf --program-prefix=b
+}
diff --git a/dev-util/comparator/comparator-2.12.ebuild b/dev-util/comparator/comparator-2.12.ebuild
new file mode 100644
index 000000000000..bbbbe0a4134a
--- /dev/null
+++ b/dev-util/comparator/comparator-2.12.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python{2_7,3_6,3_7} )
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="ESR's utility for making fast comparisons among large source trees"
+HOMEPAGE="http://www.catb.org/~esr/comparator/"
+SRC_URI="http://www.catb.org/~esr/comparator/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="=app-text/docbook-xml-dtd-4.1.2*
+ app-text/xmlto"
+
+src_prepare() {
+ sed \
+ -e '/python setup.py install/d' \
+ -i Makefile || die "sed failed"
+ eapply_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+ emake comparator.html scf-standard.html
+ distutils-r1_src_compile
+}
+
+src_install() {
+ emake ROOT="${D}" install
+ distutils-r1_src_install
+ docinto html
+ dodoc *.html
+}
diff --git a/dev-util/radare2/files/radare2-3.5.1-mount-free.patch b/dev-util/radare2/files/radare2-3.5.1-mount-free.patch
new file mode 100644
index 000000000000..ad27596fc124
--- /dev/null
+++ b/dev-util/radare2/files/radare2-3.5.1-mount-free.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/688336
+
+From 40453029179d230cf02ffed205f2d63e33981b8f Mon Sep 17 00:00:00 2001
+From: pancake <pancake@nopcode.org>
+Date: Mon, 17 Jun 2019 11:34:49 +0200
+Subject: [PATCH] Fix #14334 - Double-free in ms command
+
+---
+ libr/core/cmd_mount.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/libr/core/cmd_mount.c
++++ b/libr/core/cmd_mount.c
+@@ -471,7 +471,7 @@ static int cmd_mount(void *data, const char *_input) {
+ rli->completion.run_user = rli->user;
+ r_line_completion_set (&rli->completion, ms_argc, ms_argv);
+ r_fs_shell_prompt (&shell, core->fs, input);
+- free (cwd);
++ R_FREE (cwd);
+ r_pvector_clear (&rli->completion.args);
+ memcpy (&rli->completion, &c, sizeof (c));
+ }
diff --git a/dev-util/radare2/radare2-3.5.1-r1.ebuild b/dev-util/radare2/radare2-3.5.1-r1.ebuild
new file mode 100644
index 000000000000..781c3273fe47
--- /dev/null
+++ b/dev-util/radare2/radare2-3.5.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="unix-like reverse engineering framework and commandline tools"
+HOMEPAGE="http://www.radare.org"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/radare/radare2"
+else
+ SRC_URI="https://github.com/radare/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ssl libressl"
+
+RDEPEND="
+ dev-libs/capstone:0=
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5.1-mount-free.patch
+)
+
+src_configure() {
+ econf \
+ --without-libuv \
+ --with-syscapstone \
+ $(use_with ssl openssl)
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/zsh/site-functions
+ doins doc/zsh/_*
+
+ newbashcomp doc/bash_autocompletion.sh "${PN}"
+ bashcomp_alias "${PN}" rafind2 r2 rabin2 rasm2 radiff2
+
+ # a workaround for unstable $(INSTALL) call, bug #574866
+ local d
+ for d in doc/*; do
+ if [[ -d $d ]]; then
+ rm -rfv "$d" || die "failed to delete '$d'"
+ fi
+ done
+}