diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2019-07-15 11:11:58 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2019-07-15 11:11:58 -0700 |
commit | 13a95ec5a587ca4db5f699e873b36efcb5d60979 (patch) | |
tree | 4a687f1e3e93fccf06b2f2018c6095b6e340ea47 /dev-util/trace-cmd/files | |
parent | sys-libs/kpmcore: Restrict tests, need polkit etc. (diff) | |
download | gentoo-13a95ec5a587ca4db5f699e873b36efcb5d60979.tar.gz gentoo-13a95ec5a587ca4db5f699e873b36efcb5d60979.tar.bz2 gentoo-13a95ec5a587ca4db5f699e873b36efcb5d60979.zip |
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@gentoo.org>
Diffstat (limited to 'dev-util/trace-cmd/files')
3 files changed, 151 insertions, 0 deletions
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 000000000000..17c2e693f1c0 --- /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 000000000000..d66ee35accf9 --- /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 000000000000..523f2d44467e --- /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) \ |