public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/trace-cmd/files/, dev-util/trace-cmd/
@ 2019-04-10  0:55 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-04-10  0:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6790ee11d7e93abaac0b18e0d58e8949fba2cbb8
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Apr 10 00:55:09 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 00:55:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6790ee11

dev-util/trace-cmd: Clean up how flags are passed to the build system

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../trace-cmd/files/trace-cmd-2.7-makefile.patch   | 15 ++++++-----
 dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild         | 31 ++++++++++++----------
 dev-util/trace-cmd/trace-cmd-9999.ebuild           | 31 ++++++++++++----------
 3 files changed, 43 insertions(+), 34 deletions(-)

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
index da1ca62e7c0..a9d7584dc62 100644
--- a/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch
+++ b/dev-util/trace-cmd/files/trace-cmd-2.7-makefile.patch
@@ -1,7 +1,8 @@
-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 @@
+diff --git a/Makefile b/Makefile
+index a5d2c38..a99e5a4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,7 +63,7 @@ python_dir = $(HOME)/.trace-cmd/python
  var_dir = $(HOME)/.trace-cmd/
  else
  plugin_dir = $(libdir)/trace-cmd/plugins
@@ -10,7 +11,7 @@ diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile
  PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
  PYTHON_DIR = -DPYTHON_DIR="$(python_dir)"
  PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
-@@ -119,8 +119,11 @@
+@@ -119,8 +119,13 @@ endif # NO_PYTHON
  test-build = $(if $(shell sh -c 'echo "$(1)" | \
  	$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'), $2)
  
@@ -19,11 +20,13 @@ diff -ur trace-cmd-v2.7.orig/Makefile trace-cmd-v2.7/Makefile
 -udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
 +udis86-flags := -DHAVE_UDIS86
 +udis86-ldflags := -ludis86
++else
++udis86-flags := -UHAVE_UDIS86
 +endif # NO_UDIS86
  
  define BLK_TC_FLUSH_SOURCE
  #include <linux/blktrace_api.h>
-@@ -276,6 +279,7 @@
+@@ -276,6 +281,7 @@ endif
  # Append required CFLAGS
  override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) $(VAR_DIR)
  override CFLAGS += $(udis86-flags) $(blk-flags)

diff --git a/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild b/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild
index d38e2e55b21..f9a2adfa4f0 100644
--- a/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild
+++ b/dev-util/trace-cmd/trace-cmd-2.7-r2.ebuild
@@ -41,8 +41,8 @@ CONFIG_CHECK="
 	~BLK_DEV_IO_TRACE"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-2.7-makefile.patch
-	"${FILESDIR}"/${PN}-2.7-soname.patch
+	"${FILESDIR}"/trace-cmd-2.7-makefile.patch
+	"${FILESDIR}"/trace-cmd-2.7-soname.patch
 )
 
 pkg_setup() {
@@ -51,30 +51,33 @@ pkg_setup() {
 }
 
 src_configure() {
-	MAKEOPTS+=" prefix=/usr
-		libdir=/usr/$(get_libdir)
-		CC=$(tc-getCC)
-		AR=$(tc-getAR)
-		$(usex audit '' '' 'NO_AUDIT=1')"
+	EMAKE_FLAGS=(
+		"prefix=/usr"
+		"libdir=/usr/$(get_libdir)"
+		"CC=$(tc-getCC)"
+		"AR=$(tc-getAR)"
+		$(usex audit '' '' 'NO_AUDIT=1')
+		$(usex udis86 '' '' 'NO_UDIS86=1')
+	)
 
 	if use python; then
-		MAKEOPTS+=" PYTHON_VERS=${EPYTHON//python/python-}"
-		MAKEOPTS+=" python_dir=$(python_get_sitedir)/${PN}"
+		EMAKE_FLAGS+=(
+			"PYTHON_VERS=${EPYTHON//python/python-}"
+			"python_dir=$(python_get_sitedir)/${PN}"
+		)
 	else
-		MAKEOPTS+=" NO_PYTHON=1"
+		EMAKE_FLAGS+=("NO_PYTHON=1")
 	fi
-
-	use udis86 || MAKEOPTS+=" NO_UDIS86=1"
 }
 
 src_compile() {
-	emake V=1 all_cmd libs
+	emake "${EMAKE_FLAGS[@]}" all_cmd libs
 	use doc && emake doc
 
 }
 
 src_install() {
-	emake DESTDIR="${D}" V=1 install install_libs
+	emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" V=1 install install_libs
 	use doc && emake DESTDIR="${D}" install_doc
 
 }

diff --git a/dev-util/trace-cmd/trace-cmd-9999.ebuild b/dev-util/trace-cmd/trace-cmd-9999.ebuild
index d38e2e55b21..f9a2adfa4f0 100644
--- a/dev-util/trace-cmd/trace-cmd-9999.ebuild
+++ b/dev-util/trace-cmd/trace-cmd-9999.ebuild
@@ -41,8 +41,8 @@ CONFIG_CHECK="
 	~BLK_DEV_IO_TRACE"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-2.7-makefile.patch
-	"${FILESDIR}"/${PN}-2.7-soname.patch
+	"${FILESDIR}"/trace-cmd-2.7-makefile.patch
+	"${FILESDIR}"/trace-cmd-2.7-soname.patch
 )
 
 pkg_setup() {
@@ -51,30 +51,33 @@ pkg_setup() {
 }
 
 src_configure() {
-	MAKEOPTS+=" prefix=/usr
-		libdir=/usr/$(get_libdir)
-		CC=$(tc-getCC)
-		AR=$(tc-getAR)
-		$(usex audit '' '' 'NO_AUDIT=1')"
+	EMAKE_FLAGS=(
+		"prefix=/usr"
+		"libdir=/usr/$(get_libdir)"
+		"CC=$(tc-getCC)"
+		"AR=$(tc-getAR)"
+		$(usex audit '' '' 'NO_AUDIT=1')
+		$(usex udis86 '' '' 'NO_UDIS86=1')
+	)
 
 	if use python; then
-		MAKEOPTS+=" PYTHON_VERS=${EPYTHON//python/python-}"
-		MAKEOPTS+=" python_dir=$(python_get_sitedir)/${PN}"
+		EMAKE_FLAGS+=(
+			"PYTHON_VERS=${EPYTHON//python/python-}"
+			"python_dir=$(python_get_sitedir)/${PN}"
+		)
 	else
-		MAKEOPTS+=" NO_PYTHON=1"
+		EMAKE_FLAGS+=("NO_PYTHON=1")
 	fi
-
-	use udis86 || MAKEOPTS+=" NO_UDIS86=1"
 }
 
 src_compile() {
-	emake V=1 all_cmd libs
+	emake "${EMAKE_FLAGS[@]}" all_cmd libs
 	use doc && emake doc
 
 }
 
 src_install() {
-	emake DESTDIR="${D}" V=1 install install_libs
+	emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" V=1 install install_libs
 	use doc && emake DESTDIR="${D}" install_doc
 
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/trace-cmd/files/, dev-util/trace-cmd/
@ 2019-07-15 18:12 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-07-15 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     13a95ec5a587ca4db5f699e873b36efcb5d60979
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Mon Jul 15 18:11:58 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Jul 15 18:11:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13a95ec5

dev-util/trace-cmd: Version bump to 2.8, update 9999

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-util/trace-cmd/Manifest                        |   1 +
 .../trace-cmd-2.8-python-pkgconfig-name.patch      |  27 +++++
 .../files/trace-cmd-2.8-python3-warnings.patch     | 111 +++++++++++++++++++++
 .../trace-cmd/files/trace-cmd-2.8-soname.patch     |  13 +++
 dev-util/trace-cmd/trace-cmd-2.8.ebuild            | 110 ++++++++++++++++++++
 dev-util/trace-cmd/trace-cmd-9999.ebuild           |  59 ++++++++---
 6 files changed, 305 insertions(+), 16 deletions(-)

diff --git a/dev-util/trace-cmd/Manifest b/dev-util/trace-cmd/Manifest
index 5c3fead0ec3..8aabb8d3f87 100644
--- a/dev-util/trace-cmd/Manifest
+++ b/dev-util/trace-cmd/Manifest
@@ -1 +1,2 @@
 DIST trace-cmd-v2.7.tar.gz 1865571 BLAKE2B e0df57c78c6505c856381f17cfdecdaa7a4441eee4cfc57af4fff79a0157ca7aa7c76a81428ddf8d9d00d6bb0a5391b99d4bb5f92fadc7e4062a0181facb2cc9 SHA512 e507eb6609f1fd3dddec541e9f69c466f4f3f66c28f0a7f4292615e3984cebaaf42725f3d82b8c625e5c60977d1f9b5e96cce7664b951eb5f99b955cc440efe4
+DIST trace-cmd-v2.8.tar.gz 1996407 BLAKE2B 6a9a0b221418d448f5af5508bf8acf0baca08e0cdd8c1a835a06d26f5f729608d6988f7ed83ccdc9e117ade19893fa32c2400a61c2d396804cd042bc25cd498a SHA512 0675c057e78878a0f56ee69edfe7ab4b771fd5346920fcd3ad4af777180fae311cc369dc3faa6cd49d30664401497d20e45a0cf1914805139116e3be8587e0a7

diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-python-pkgconfig-name.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-python-pkgconfig-name.patch
new file mode 100644
index 00000000000..17c2e693f1c
--- /dev/null
+++ b/dev-util/trace-cmd/files/trace-cmd-2.8-python-pkgconfig-name.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile b/Makefile
+index d34c615..7931c88 100644
+--- a/Makefile
++++ b/Makefile
+@@ -115,9 +115,10 @@ PYTHON		:= ctracecmd.so
+ PYTHON_GUI	:= ctracecmd.so ctracecmdgui.so
+ 
+ PYTHON_VERS ?= python
++PYTHON_PKGCONFIG_VERS ?= $(PYTHON_VERS)
+ 
+ # Can build python?
+-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
++ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_PKGCONFIG_VERS) > /dev/null 2>&1 && echo y"), y)
+ 	PYTHON_PLUGINS := plugin_python.so
+ 	BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
+ 	BUILD_PYTHON_WORKS := 1
+@@ -372,8 +373,8 @@ report_nopythondev: force
+ 	$(Q)echo
+ 
+ ifndef NO_PYTHON
+-PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)`
+-PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \
++PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_PKGCONFIG_VERS)`
++PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_PKGCONFIG_VERS)` \
+ 		$(shell $(PYTHON_VERS)-config --ldflags)
+ PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
+ else

diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-python3-warnings.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-python3-warnings.patch
new file mode 100644
index 00000000000..d66ee35accf
--- /dev/null
+++ b/dev-util/trace-cmd/files/trace-cmd-2.8-python3-warnings.patch
@@ -0,0 +1,111 @@
+diff --git a/plugins/plugin_python.c b/plugins/plugin_python.c
+index e725ad8..196b825 100644
+--- a/plugins/plugin_python.c
++++ b/plugins/plugin_python.c
+@@ -81,7 +81,7 @@ int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
+ 	} else
+ 		Py_DECREF(res);
+ 
+-	str = PyString_FromString("pevent");
++	str = PyUnicode_FromString("pevent");
+ 	if (!str)
+ 		return -ENOMEM;
+ 
+diff --git a/python/ctracecmd.i b/python/ctracecmd.i
+index 65a3d51..031e462 100644
+--- a/python/ctracecmd.i
++++ b/python/ctracecmd.i
+@@ -16,6 +16,7 @@
+ %{
+ #include "trace-cmd.h"
+ #include "event-utils.h"
++#include <Python.h>
+ %}
+ 
+ 
+@@ -108,7 +109,7 @@ static PyObject *py_field_get_stack(struct tep_handle *pevent,
+ 		    ((int)addr == -1))
+ 			break;
+ 		func = tep_find_function(event->tep, addr);
+-		if (PyList_Append(list, PyString_FromString(func))) {
++		if (PyList_Append(list, PyUnicode_FromString(func))) {
+ 			Py_DECREF(list);
+ 			return NULL;
+ 		}
+@@ -137,10 +138,10 @@ static PyObject *py_field_get_data(struct tep_format_field *f, struct tep_record
+ 		offset = val & 0xffff;
+ 		len = val >> 16;
+ 
+-		return PyBuffer_FromMemory((char *)r->data + offset, len);
++		return PyMemoryView_FromMemory((char *)r->data + offset, len, PyBUF_READ);
+ 	}
+ 
+-	return PyBuffer_FromMemory((char *)r->data + f->offset, f->size);
++	return PyMemoryView_FromMemory((char *)r->data + f->offset, f->size, PyBUF_READ);
+ }
+ 
+ static PyObject *py_field_get_str(struct tep_format_field *f, struct tep_record *r)
+@@ -162,10 +163,10 @@ static PyObject *py_field_get_str(struct tep_format_field *f, struct tep_record
+ 		 */
+ 		offset = val & 0xffff;
+ 
+-		return PyString_FromString((char *)r->data + offset);
++		return PyUnicode_FromString((char *)r->data + offset);
+ 	}
+ 
+-	return PyString_FromStringAndSize((char *)r->data + f->offset,
++	return PyUnicode_FromStringAndSize((char *)r->data + f->offset,
+ 				strnlen((char *)r->data + f->offset, f->size));
+ }
+ 
+@@ -177,7 +178,7 @@ static PyObject *py_format_get_keys(struct tep_event *ef)
+ 	list = PyList_New(0);
+ 
+ 	for (f = ef->format.fields; f; f = f->next) {
+-		if (PyList_Append(list, PyString_FromString(f->name))) {
++		if (PyList_Append(list, PyUnicode_FromString(f->name))) {
+ 			Py_DECREF(list);
+ 			return NULL;
+ 		}
+@@ -210,14 +211,14 @@ static int python_callback(struct trace_seq *s,
+ 	result = PyEval_CallObject(context, arglist);
+ 	Py_XDECREF(arglist);
+ 	if (result && result != Py_None) {
+-		if (!PyInt_Check(result)) {
++		if (!PyLong_Check(result)) {
+ 			PyErr_SetString(PyExc_TypeError,
+ 					"callback must return int");
+ 			PyErr_Print();
+ 			Py_XDECREF(result);
+ 			return 0;
+ 		}
+-		r = PyInt_AS_LONG(result);
++		r = PyLong_AsLong(result);
+ 	} else if (result == Py_None)
+ 		r = 0;
+ 	else
+diff --git a/python/ctracecmdgui.i b/python/ctracecmdgui.i
+index 1dcdab0..8ca38f7 100644
+--- a/python/ctracecmdgui.i
++++ b/python/ctracecmdgui.i
+@@ -7,6 +7,7 @@
+ #include <pygobject.h>
+ #include <pyglib.h>
+ #include <Python.h>
++#include <memoryobject.h>
+ 
+ extern GtkTreeModel *trace_view_store_as_gtk_tree_model(struct trace_view_store *store);
+ 
+@@ -37,10 +38,10 @@ pytype_from_gtype(GType gtype)
+ 
+ /* help swig cope with g* types */
+ %typemap(in) gint {
+-    $1 = PyInt_AsLong($input);
++    $1 = PyLong_AsLong($input);
+ }
+ %typemap(out) gint {
+-    $result = PyInt_FromLong($1);
++    $result = PyLong_FromLong($1);
+ }
+ %typemap(in) guint {
+     $1 = PyLong_AsUnsignedLong($input);

diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
new file mode 100644
index 00000000000..523f2d44467
--- /dev/null
+++ b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
@@ -0,0 +1,13 @@
+diff --git a/scripts/utils.mk b/scripts/utils.mk
+index 260023a..9eb127d 100644
+--- a/scripts/utils.mk
++++ b/scripts/utils.mk
+@@ -54,7 +54,7 @@ do_build_static_lib =				\
+ 
+ do_compile_shared_library =			\
+ 	($(print_shared_lib_compile)		\
+-	$(CC) --shared $^ -o $@)
++	$(CC) --shared $^ -Wl,-soname,$@ -o $@)
+ 
+ do_compile_plugin_obj =				\
+ 	($(print_plugin_obj_compile)		\

diff --git a/dev-util/trace-cmd/trace-cmd-2.8.ebuild b/dev-util/trace-cmd/trace-cmd-2.8.ebuild
new file mode 100644
index 00000000000..33ae834f1ac
--- /dev/null
+++ b/dev-util/trace-cmd/trace-cmd-2.8.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 python3_{6,7} )
+DISTUTILS_OPTIONAL=1
+
+inherit linux-info python-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/utils/trace-cmd/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="+audit doc python udis86"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="audit? ( sys-process/audit )
+	python? ( ${PYTHON_DEPS} )
+	udis86? ( dev-libs/udis86 )"
+DEPEND="${RDEPEND}
+	sys-kernel/linux-headers
+	python? (
+		virtual/pkgconfig
+		dev-lang/swig
+	)
+
+	doc? ( app-text/asciidoc )"
+
+CONFIG_CHECK="
+	~TRACING
+	~FTRACE
+	~BLK_DEV_IO_TRACE"
+
+PATCHES=(
+	"${FILESDIR}/trace-cmd-2.7-makefile.patch"
+	"${FILESDIR}/trace-cmd-2.8-python-pkgconfig-name.patch"
+	"${FILESDIR}/trace-cmd-2.8-soname.patch"
+)
+
+pkg_setup() {
+	linux-info_pkg_setup
+}
+
+src_configure() {
+	EMAKE_FLAGS=(
+		"prefix=/usr"
+		"libdir=/usr/$(get_libdir)"
+		"CC=$(tc-getCC)"
+		"AR=$(tc-getAR)"
+		$(usex audit '' '' '' 'NO_AUDIT=1')
+		$(usex udis86 '' '' '' 'NO_UDIS86=1')
+		VERBOSE=1
+	)
+}
+
+src_compile() {
+	emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \
+		trace-cmd libs
+
+	if use python; then
+		python_copy_sources
+		python_foreach_impl python_compile
+	fi
+
+	use doc && emake doc
+}
+
+python_compile() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+	python_is_python3 && eapply "${FILESDIR}/trace-cmd-2.8-python3-warnings.patch"
+
+	emake "${EMAKE_FLAGS[@]}" \
+		PYTHON_VERS="${EPYTHON}" \
+		PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \
+		python_dir=$(python_get_sitedir)/${PN} \
+		python python-plugin
+
+	popd > /dev/null || die
+}
+
+src_install() {
+	emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \
+		DESTDIR="${D}" \
+		install install_libs
+
+	use doc && emake DESTDIR="${D}" install_doc
+	use python && python_foreach_impl python_install
+}
+
+python_install() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+
+	emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" \
+		PYTHON_VERS="${EPYTHON}" \
+		PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \
+		python_dir=$(python_get_sitedir)/${PN} \
+		install_python
+
+	popd > /dev/null || die
+}

diff --git a/dev-util/trace-cmd/trace-cmd-9999.ebuild b/dev-util/trace-cmd/trace-cmd-9999.ebuild
index 27b25b7f121..33ae834f1ac 100644
--- a/dev-util/trace-cmd/trace-cmd-9999.ebuild
+++ b/dev-util/trace-cmd/trace-cmd-9999.ebuild
@@ -2,9 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=(python2_7)
+PYTHON_COMPAT=( python2_7 python3_{6,7} )
+DISTUTILS_OPTIONAL=1
 
-inherit linux-info python-single-r1 toolchain-funcs
+inherit linux-info python-r1 toolchain-funcs
 
 DESCRIPTION="User-space front-end for Ftrace"
 HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git"
@@ -13,7 +14,7 @@ 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/${PN}.git/snapshot/${PN}-v${PV}.tar.gz"
+	SRC_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/${PN}-v${PV}.tar.gz"
 	KEYWORDS="~amd64 ~x86"
 	S="${WORKDIR}/${PN}-v${PV}"
 fi
@@ -41,13 +42,13 @@ CONFIG_CHECK="
 	~BLK_DEV_IO_TRACE"
 
 PATCHES=(
-	"${FILESDIR}"/trace-cmd-2.7-makefile.patch
-	"${FILESDIR}"/trace-cmd-2.7-soname.patch
+	"${FILESDIR}/trace-cmd-2.7-makefile.patch"
+	"${FILESDIR}/trace-cmd-2.8-python-pkgconfig-name.patch"
+	"${FILESDIR}/trace-cmd-2.8-soname.patch"
 )
 
 pkg_setup() {
 	linux-info_pkg_setup
-	use python && python-single-r1_pkg_setup
 }
 
 src_configure() {
@@ -58,26 +59,52 @@ src_configure() {
 		"AR=$(tc-getAR)"
 		$(usex audit '' '' '' 'NO_AUDIT=1')
 		$(usex udis86 '' '' '' 'NO_UDIS86=1')
+		VERBOSE=1
 	)
+}
+
+src_compile() {
+	emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \
+		trace-cmd libs
 
 	if use python; then
-		EMAKE_FLAGS+=(
-			"PYTHON_VERS=${EPYTHON//python/python-}"
-			"python_dir=$(python_get_sitedir)/${PN}"
-		)
-	else
-		EMAKE_FLAGS+=("NO_PYTHON=1")
+		python_copy_sources
+		python_foreach_impl python_compile
 	fi
-}
 
-src_compile() {
-	emake "${EMAKE_FLAGS[@]}" all_cmd libs
 	use doc && emake doc
+}
 
+python_compile() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+	python_is_python3 && eapply "${FILESDIR}/trace-cmd-2.8-python3-warnings.patch"
+
+	emake "${EMAKE_FLAGS[@]}" \
+		PYTHON_VERS="${EPYTHON}" \
+		PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \
+		python_dir=$(python_get_sitedir)/${PN} \
+		python python-plugin
+
+	popd > /dev/null || die
 }
 
 src_install() {
-	emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" V=1 install install_libs
+	emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \
+		DESTDIR="${D}" \
+		install install_libs
+
 	use doc && emake DESTDIR="${D}" install_doc
+	use python && python_foreach_impl python_install
+}
+
+python_install() {
+	pushd "${BUILD_DIR}" > /dev/null || die
+
+	emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" \
+		PYTHON_VERS="${EPYTHON}" \
+		PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \
+		python_dir=$(python_get_sitedir)/${PN} \
+		install_python
 
+	popd > /dev/null || die
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/trace-cmd/files/, dev-util/trace-cmd/
@ 2019-07-20  2:04 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-07-20  2:04 UTC (permalink / raw
  To: gentoo-commits

commit:     40cbcbd9b3cacd2d90576080d9a2d806320f71d7
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Sat Jul 20 02:03:35 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Sat Jul 20 02:03:57 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40cbcbd9

dev-util/trace-cmd: Revbump, soname fix and install missing headers

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../trace-cmd/files/trace-cmd-2.8-makefile.patch   | 48 ++++++++++++++++++++++
 .../trace-cmd/files/trace-cmd-2.8-soname.patch     |  6 +--
 ...-cmd-2.8.2.ebuild => trace-cmd-2.8.2-r1.ebuild} |  8 ++--
 3 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch
new file mode 100644
index 00000000000..f95ffc3b18c
--- /dev/null
+++ b/dev-util/trace-cmd/files/trace-cmd-2.8-makefile.patch
@@ -0,0 +1,48 @@
+diff --git a/Makefile b/Makefile
+index ad74a96..3bab851 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ python_dir = $(HOME)/.trace-cmd/python
+ 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))'
+@@ -136,8 +136,13 @@ export NO_PYTHON
+ 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
++else
++udis86-flags := -UHAVE_UDIS86
++endif # NO_UDIS86
+ 
+ define BLK_TC_FLUSH_SOURCE
+ #include <linux/blktrace_api.h>
+@@ -237,6 +242,7 @@ endif
+ # Append required CFLAGS
+ override CFLAGS += $(INCLUDES) $(PLUGIN_DIR_SQ) $(VAR_DIR)
+ override CFLAGS += $(udis86-flags) $(blk-flags)
++override LDFLAGS += $(udis86-ldflags)
+ 
+ CMD_TARGETS = trace-cmd $(BUILD_PYTHON)
+ 
+@@ -339,8 +345,10 @@ install_gui: install_cmd gui
+ install_libs: libs
+ 	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
+ 	$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ))
+-	$(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ))
++	$(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
++	$(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
+ 	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ))
++	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(includedir_SQ))
+ 
+ doc:
+ 	$(MAKE) -C $(src)/Documentation all

diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
index 523f2d44467..b869080fb01 100644
--- a/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
+++ b/dev-util/trace-cmd/files/trace-cmd-2.8-soname.patch
@@ -3,11 +3,11 @@ index 260023a..9eb127d 100644
 --- a/scripts/utils.mk
 +++ b/scripts/utils.mk
 @@ -54,7 +54,7 @@ do_build_static_lib =				\
- 
+
  do_compile_shared_library =			\
  	($(print_shared_lib_compile)		\
 -	$(CC) --shared $^ -o $@)
-+	$(CC) --shared $^ -Wl,-soname,$@ -o $@)
- 
++	$(CC) --shared $^ -Wl,-soname,$(@F) -o $@)
+
  do_compile_plugin_obj =				\
  	($(print_plugin_obj_compile)		\

diff --git a/dev-util/trace-cmd/trace-cmd-2.8.2.ebuild b/dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
similarity index 94%
rename from dev-util/trace-cmd/trace-cmd-2.8.2.ebuild
rename to dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
index 33ae834f1ac..5fdce8d46d5 100644
--- a/dev-util/trace-cmd/trace-cmd-2.8.2.ebuild
+++ b/dev-util/trace-cmd/trace-cmd-2.8.2-r1.ebuild
@@ -20,7 +20,7 @@ else
 fi
 
 LICENSE="GPL-2+ LGPL-2.1+"
-SLOT="0"
+SLOT="0/${PV}"
 IUSE="+audit doc python udis86"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -42,7 +42,7 @@ CONFIG_CHECK="
 	~BLK_DEV_IO_TRACE"
 
 PATCHES=(
-	"${FILESDIR}/trace-cmd-2.7-makefile.patch"
+	"${FILESDIR}/trace-cmd-2.8-makefile.patch"
 	"${FILESDIR}/trace-cmd-2.8-python-pkgconfig-name.patch"
 	"${FILESDIR}/trace-cmd-2.8-soname.patch"
 )
@@ -53,8 +53,8 @@ pkg_setup() {
 
 src_configure() {
 	EMAKE_FLAGS=(
-		"prefix=/usr"
-		"libdir=/usr/$(get_libdir)"
+		"prefix=${EPREFIX}/usr"
+		"libdir=${EPREFIX}/usr/$(get_libdir)"
 		"CC=$(tc-getCC)"
 		"AR=$(tc-getAR)"
 		$(usex audit '' '' '' 'NO_AUDIT=1')


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-20  2:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-20  2:04 [gentoo-commits] repo/gentoo:master commit in: dev-util/trace-cmd/files/, dev-util/trace-cmd/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2019-07-15 18:12 Patrick McLean
2019-04-10  0:55 Patrick McLean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox