summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2018-11-13 10:30:48 -0500
committerCraig Andrews <candrews@gentoo.org>2018-11-13 10:31:32 -0500
commit9fd1e559687ccebdc4ae1d8702940ffa5ec204b9 (patch)
treec5b3110aaa4fdd84c00b4c6fd76eac1b12a263f0 /dev-util/trace-cmd
parentdev-libs/Ice: Bump to version 3.6.4 (diff)
downloadgentoo-9fd1e559687ccebdc4ae1d8702940ffa5ec204b9.tar.gz
gentoo-9fd1e559687ccebdc4ae1d8702940ffa5ec204b9.tar.bz2
gentoo-9fd1e559687ccebdc4ae1d8702940ffa5ec204b9.zip
dev-util/trace-cmd: 2.7 version bump
Closes: https://bugs.gentoo.org/605284 Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-util/trace-cmd')
-rw-r--r--dev-util/trace-cmd/Manifest1
-rw-r--r--dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch33
-rw-r--r--dev-util/trace-cmd/trace-cmd-2.7.ebuild78
3 files changed, 112 insertions, 0 deletions
diff --git a/dev-util/trace-cmd/Manifest b/dev-util/trace-cmd/Manifest
index 9efdfff4ea5a..9848415c7718 100644
--- a/dev-util/trace-cmd/Manifest
+++ b/dev-util/trace-cmd/Manifest
@@ -1,2 +1,3 @@
DIST trace-cmd-2.5.1.tar.xz 1577148 BLAKE2B 25436354315bcfe886cca26678017846ac95c8f19877bf9fc7ab24ed543406b61516ad56185e78c3a8d79bbbc672419fca468b205f178cdc01baaf0dfd140702 SHA512 2280eefa130a3914c34798f8bd4097a55f7f4fa4632b3d26ee1317bba54625d259ac61c6576dd3051fb2be48fb593fa54a4203d1828b7fec5fd196de00491ea2
DIST trace-cmd-2.6.tar.xz 1584768 BLAKE2B 42b2b4ac37246d610a2747bf0cb025d0f0ef5954a40c57acb8df8245f71fb516e0c124034b44addfee119ea453f1e732f6a2a73fa5e3bfb18da5ea7e1f920ed5 SHA512 cf479a940825935aa89b282c7a617d56fa5dd1f82e3322a969c4e0a08343ceca16c40058ead5f5878260ce0a003102550808c5475110706580769dffb1897c54
+DIST trace-cmd-v2.7.tar.gz 1865571 BLAKE2B e0df57c78c6505c856381f17cfdecdaa7a4441eee4cfc57af4fff79a0157ca7aa7c76a81428ddf8d9d00d6bb0a5391b99d4bb5f92fadc7e4062a0181facb2cc9 SHA512 e507eb6609f1fd3dddec541e9f69c466f4f3f66c28f0a7f4292615e3984cebaaf42725f3d82b8c625e5c60977d1f9b5e96cce7664b951eb5f99b955cc440efe4
diff --git a/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch b/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch
new file mode 100644
index 000000000000..da1ca62e7c04
--- /dev/null
+++ b/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch
@@ -0,0 +1,33 @@
+diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile
+--- trace-cmd-v2.7.orig/Makefile 2018-02-01 23:35:28.000000000 +0100
++++ trace-cmd-v2.7/Makefile 2018-09-16 16:42:58.445655156 +0200
+@@ -63,7 +63,7 @@
+ var_dir = $(HOME)/.trace-cmd/
+ else
+ plugin_dir = $(libdir)/trace-cmd/plugins
+-python_dir = $(libdir)/trace-cmd/python
++python_dir ?= $(libdir)/trace-cmd/python
+ PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
+ PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"
+ PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
+@@ -119,8 +119,11 @@
+ test-build = $(if $(shell sh -c 'echo "$(1)" | \
+ $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'), $2)
+
++ifndef NO_UDIS86
+ # have udis86 disassembler library?
+-udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
++udis86-flags := -DHAVE_UDIS86
++udis86-ldflags := -ludis86
++endif # NO_UDIS86
+
+ define BLK_TC_FLUSH_SOURCE
+ #include <linux/blktrace_api.h>
+@@ -276,6 +279,7 @@
+ # Append required CFLAGS
+ override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) $(VAR_DIR)
+ override CFLAGS += $(udis86-flags) $(blk-flags)
++override LDFLAGS += $(udis86-ldflags)
+
+ ifeq ($(VERBOSE),1)
+ Q =
diff --git a/dev-util/trace-cmd/trace-cmd-2.7.ebuild b/dev-util/trace-cmd/trace-cmd-2.7.ebuild
new file mode 100644
index 000000000000..edebefd435ba
--- /dev/null
+++ b/dev-util/trace-cmd/trace-cmd-2.7.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=(python2_7)
+
+inherit linux-info python-single-r1 toolchain-funcs
+
+DESCRIPTION="User-space front-end for Ftrace"
+HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git"
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/${PN}-v${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN}-v${PV}"
+fi
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+IUSE="doc gtk python udis86"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )
+ udis86? ( dev-libs/udis86 )
+ gtk? (
+ ${PYTHON_DEPS}
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ )"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ python? (
+ virtual/pkgconfig
+ dev-lang/swig
+ )
+ gtk? ( virtual/pkgconfig )
+ doc? ( app-text/asciidoc )"
+
+CONFIG_CHECK="
+ ~TRACING
+ ~FTRACE
+ ~BLK_DEV_IO_TRACE"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.7-makefile.patch
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ MAKEOPTS+=" prefix=/usr libdir=$(get_libdir) CC=$(tc-getCC) AR=$(tc-getAR)"
+
+ if use python; then
+ MAKEOPTS+=" PYTHON_VERS=${EPYTHON//python/python-}"
+ MAKEOPTS+=" python_dir=$(python_get_sitedir)/${PN}"
+ else
+ MAKEOPTS+=" NO_PYTHON=1"
+ fi
+
+ use udis86 || MAKEOPTS+=" NO_UDIS86=1"
+}
+
+src_compile() {
+ emake all_cmd
+ use doc && emake doc
+ use gtk && emake -j1 gui
+}
+
+src_install() {
+ default
+ use doc && emake DESTDIR="${D}" install_doc
+ use gtk && emake DESTDIR="${D}" install_gui
+}