pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python36 Add support for the dtrace option.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b44661a7742c
branches:  trunk
changeset: 362720:b44661a7742c
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue May 23 10:53:56 2017 +0000

description:
Add support for the dtrace option.

diffstat:

 lang/python36/PLIST                         |   3 ++-
 lang/python36/distinfo                      |   6 +++---
 lang/python36/options.mk                    |  10 ++++++++--
 lang/python36/patches/patch-Makefile.pre.in |  29 +++++++++++++++++++++++++++--
 lang/python36/patches/patch-configure       |  11 ++++++++++-
 5 files changed, 50 insertions(+), 9 deletions(-)

diffs (143 lines):

diff -r b30716f46f09 -r b44661a7742c lang/python36/PLIST
--- a/lang/python36/PLIST       Tue May 23 10:37:33 2017 +0000
+++ b/lang/python36/PLIST       Tue May 23 10:53:56 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2017/03/30 11:42:58 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2017/05/23 10:53:56 jperkin Exp $
 bin/2to3-${PY_VER_SUFFIX}
 bin/pydoc${PY_VER_SUFFIX}
 bin/python${PY_VER_SUFFIX}
@@ -71,6 +71,7 @@
 include/python${PY_VER_SUFFIX}/pyctype.h
 include/python${PY_VER_SUFFIX}/pydebug.h
 include/python${PY_VER_SUFFIX}/pydtrace.h
+${PLIST.dtrace}include/python${PY_VER_SUFFIX}/pydtrace_probes.h
 include/python${PY_VER_SUFFIX}/pyerrors.h
 include/python${PY_VER_SUFFIX}/pyexpat.h
 include/python${PY_VER_SUFFIX}/pyfpe.h
diff -r b30716f46f09 -r b44661a7742c lang/python36/distinfo
--- a/lang/python36/distinfo    Tue May 23 10:37:33 2017 +0000
+++ b/lang/python36/distinfo    Tue May 23 10:53:56 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2017/03/30 11:42:58 adam Exp $
+$NetBSD: distinfo,v 1.9 2017/05/23 10:53:56 jperkin Exp $
 
 SHA1 (Python-3.6.1.tar.xz) = 91d880a2a9fcfc6753cbfa132bf47a47e17e7b16
 RMD160 (Python-3.6.1.tar.xz) = 77e70ec6a07b9c17a99ac1df503f12f3a4c49fce
@@ -9,10 +9,10 @@
 SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
 SHA1 (patch-Lib_distutils_unixccompiler.py) = e7aa684fa186de7a01486c3d8bfa177afdd22ef9
 SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
-SHA1 (patch-Makefile.pre.in) = 99b33ba203eb2c9c626377f1bac03c723d467553
+SHA1 (patch-Makefile.pre.in) = cb93d2cbb9e395a92d144ec45ede91bea744dca9
 SHA1 (patch-Modules___cursesmodule.c) = 2ab2779e0418a4529987641c254686ba05d28593
 SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
 SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = b0ed2f58d1b554aa8d81ffdabaae39f3109811d0
+SHA1 (patch-configure) = fe9b0213b64313dab4c453a8bd7135db961f6ac4
 SHA1 (patch-setup.py) = 1e14b84fc5cb21b3fa61755bf574021ba9b2ab81
diff -r b30716f46f09 -r b44661a7742c lang/python36/options.mk
--- a/lang/python36/options.mk  Tue May 23 10:37:33 2017 +0000
+++ b/lang/python36/options.mk  Tue May 23 10:53:56 2017 +0000
@@ -1,12 +1,18 @@
-# $NetBSD: options.mk,v 1.1 2017/01/01 14:34:27 adam Exp $
+# $NetBSD: options.mk,v 1.2 2017/05/23 10:53:56 jperkin Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.python36
-PKG_SUPPORTED_OPTIONS+=        x11
+PKG_SUPPORTED_OPTIONS= dtrace x11
 PKG_SUGGESTED_OPTIONS= x11
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/bsd.options.mk"
 
+PLIST_VARS+=           dtrace
+.if !empty(PKG_OPTIONS:Mdtrace)
+CONFIGURE_ARGS+=       --with-dtrace
+PLIST.dtrace=          yes
+.endif
+
 .if !empty(PKG_OPTIONS:Mx11)
 # Support for native X11 paths as an option
 # This code is no-op for modular X11, however for simplicity don't make it conditional.
diff -r b30716f46f09 -r b44661a7742c lang/python36/patches/patch-Makefile.pre.in
--- a/lang/python36/patches/patch-Makefile.pre.in       Tue May 23 10:37:33 2017 +0000
+++ b/lang/python36/patches/patch-Makefile.pre.in       Tue May 23 10:53:56 2017 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-Makefile.pre.in,v 1.1 2017/01/01 14:34:27 adam Exp $
+$NetBSD: patch-Makefile.pre.in,v 1.2 2017/05/23 10:53:56 jperkin Exp $
 
 Use only one optimisation level; needed for PLIST and setuptools compatibility.
 
 Simplify _sysconfigdata to include only platform name.
 
---- Makefile.pre.in.orig       2016-12-23 02:21:21.000000000 +0000
+--- Makefile.pre.in.orig       2017-03-21 06:32:38.000000000 +0000
 +++ Makefile.pre.in
 @@ -96,7 +96,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODI
  # be able to build extension modules using the directories specified in the
@@ -15,6 +15,15 @@
  NO_AS_NEEDED= @NO_AS_NEEDED@
  LDLAST=               @LDLAST@
  SGI_ABI=      @SGI_ABI@
+@@ -463,7 +463,7 @@ LIBRARY_OBJS=      \
+ # On some systems, object files that reference DTrace probes need to be modified
+ # in-place by dtrace(1).
+ DTRACE_DEPS = \
+-      Python/ceval.o
++      Python/ceval.o Modules/gcmodule.o
+ # XXX: should gcmodule, etc. be here, too?
+ 
+ #########################################################################
 @@ -871,7 +871,6 @@ Objects/setobject.o: $(srcdir)/Objects/s
  $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
        $(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
@@ -23,6 +32,22 @@
  
  Python/frozen.o: Python/importlib.h Python/importlib_external.h
  
+@@ -879,13 +878,13 @@ Python/frozen.o: Python/importlib.h Pyth
+ # 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
+-      $(DTRACE) $(DFLAGS) -o $@ -h -s $<
++      $(DTRACE) $(DFLAGS) -o $@ -h -s $(srcdir)/Include/pydtrace.d
+       : sed in-place edit with POSIX-only tools
+       sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp
+       mv $@.tmp $@
+ 
+ Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
+-      $(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
++      $(DTRACE) $(DFLAGS) -o $@ -G -s $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
+ 
+ Objects/typeobject.o: Objects/typeslots.inc
+ Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
 @@ -1126,7 +1125,8 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
                if test -n "$(PY3LIBRARY)"; then \
                        $(INSTALL_SHARED) $(PY3LIBRARY) $(DESTDIR)$(LIBDIR)/$(PY3LIBRARY); \
diff -r b30716f46f09 -r b44661a7742c lang/python36/patches/patch-configure
--- a/lang/python36/patches/patch-configure     Tue May 23 10:37:33 2017 +0000
+++ b/lang/python36/patches/patch-configure     Tue May 23 10:53:56 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.5 2017/03/30 11:42:58 adam Exp $
+$NetBSD: patch-configure,v 1.6 2017/05/23 10:53:56 jperkin Exp $
 
 Simplify _sysconfigdata to include only platform name.
 
@@ -90,6 +90,15 @@
                if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
                then
                        LINKFORSHARED="-Wl,--export-dynamic"
+@@ -11122,7 +11125,7 @@ if ${ac_cv_dtrace_link+:} false; then :
+   $as_echo_n "(cached) " >&6
+ else
+               ac_cv_dtrace_link=no
+-            echo 'BEGIN' > conftest.d
++            echo 'BEGIN {}' > conftest.d
+             "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
+                 ac_cv_dtrace_link=yes
+ 
 @@ -14949,8 +14952,6 @@ $as_echo "$SOABI" >&6; }
  
  



Home | Main Index | Thread Index | Old Index