Enable --with-dtrace configure flag (upstream issue21590)

Add patch to fix out of tree --with-dtrace build (upstream issue28787)
This commit is contained in:
Charalampos Stratakis 2016-12-02 16:12:46 +01:00
parent 1b092958f3
commit af1b222b2b
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 28df0e1..42f811c 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -867,6 +867,7 @@ Python/frozen.o: Python/importlib.h Python/importlib_external.h
# follow our naming conventions. dtrace(1) uses the output filename to generate
# an include guard, so we can't use a pipeline to transform its output.
Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
+ @$(MKDIR_P) Include
$(DTRACE) $(DFLAGS) -o $@ -h -s $<
: sed in-place edit with POSIX-only tools
sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp

View File

@ -155,12 +155,11 @@ BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: sqlite-devel
%if 0%{?with_systemtap}
BuildRequires: systemtap-sdt-devel
BuildRequires: systemtap-devel
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
# /usr/bin/dtrace is a python 2 script)
%global tapsetdir /usr/share/systemtap/tapset
%endif # with_systemtap
BuildRequires: tar
BuildRequires: tcl-devel
@ -389,6 +388,12 @@ Patch206: 00206-remove-hf-from-arm-triplet.patch
# Fedora needs the default mips64-linux-gnu
Patch243: 00243-fix-mips64-triplet.patch
# 00249 #
# Fix builds using the --with-dtrace flag as the rpmbuild
# of python is an out of tree build
# Not yet fixed upstream: http://bugs.python.org/issue28787
Patch249: 00249-fix-out-of-tree-dtrace-builds.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -625,6 +630,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch205 -p1
%patch206 -p1
%patch243 -p1
%patch249 -p1
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library.
@ -681,6 +687,7 @@ BuildPython() {
--with-system-expat \
--with-system-ffi \
--enable-loadable-sqlite-extensions \
--with-dtrace \
%if 0%{?with_systemtap}
--with-systemtap \
%endif