forked from Lainports/freebsd-ports
The FreeBSD Python Team warmly welcomes Python 3.4 to the Ports tree: - Add lang/python34 - Add devel/py-setuptools34 - Add Python 3.4.0 docs to lang/python-doc Release Announcement and Major Features: https://www.python.org/download/releases/3.4.0/ This also marks the next stage of a cleaner, much-closer-to-upstream approach to Python on FreeBSD, that builds upon the hard work of the entire FreeBSD Python team over the last year. This port is built "entirely" from scratch, retiring as much of the legacy, workarounds, patches and hacks from the existing Python ports as possible. Of particular note: static + shared dual-build is gone, as it was flaky at best, grossly untested upstream and caused more issues than it solved. It is replaced by a shared build by default. The static python library remains installed and usable. Major changes in this structure are: - Replace dual static and shared in-tree build with shared-only. - Use options helpers - Replace plat-freebsd* hacks with a lighter weight alternative - Strip all libraries and shared extensions - Only retain patches that are absolutely necessary - Replace static disabled_module_list with one from upstream - Retain NIS and sparc64 workarounds from python33 - Deprecate SEM option, no longer optional. - Deprecate PTH option, no longer maintained or supported upstream - Deprecate FPECTL option, no longer maintained or supported upstream - Add upstream issue references & breadcrumb annotations where possible Tested by: many (Special thanks to Andrew Berg) Reviewed by: xmj, nemysis, antoine
58 lines
2 KiB
Text
58 lines
2 KiB
Text
# Backport patch 0001 from Issue #20210
|
|
# Issue: http://bugs.python.org/issue20210
|
|
# By: Thomas Petazzoni
|
|
|
|
--- ./Makefile.pre.in.orig 2014-03-24 22:45:17.908886504 +1100
|
|
+++ ./Makefile.pre.in 2014-03-24 22:47:55.503779805 +1100
|
|
@@ -172,6 +172,8 @@
|
|
# configure script arguments
|
|
CONFIG_ARGS= @CONFIG_ARGS@
|
|
|
|
+# disabled extensions
|
|
+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
|
|
|
|
# Subdirectories with code
|
|
SRCDIRS= @SRCDIRS@
|
|
@@ -555,6 +557,7 @@
|
|
esac; \
|
|
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
|
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
|
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
|
|
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
|
|
|
# Build static library
|
|
@@ -1352,7 +1355,8 @@
|
|
# Install the dynamically loadable modules
|
|
# This goes into $(exec_prefix)
|
|
sharedinstall: sharedmods
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
|
+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
|
|
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
|
--prefix=$(prefix) \
|
|
--install-scripts=$(BINDIR) \
|
|
--install-platlib=$(DESTSHARED) \
|
|
--- ./configure.ac.orig 2014-03-24 22:48:10.442551831 +1100
|
|
+++ ./configure.ac 2014-03-24 22:48:42.059827384 +1100
|
|
@@ -2331,6 +2331,8 @@
|
|
|
|
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
|
|
|
+AC_SUBST(DISABLED_EXTENSIONS)
|
|
+
|
|
# Check for use of the system expat library
|
|
AC_MSG_CHECKING(for --with-system-expat)
|
|
AC_ARG_WITH(system_expat,
|
|
--- ./setup.py.orig 2014-03-24 22:48:48.495472513 +1100
|
|
+++ ./setup.py 2014-03-24 22:49:20.076122201 +1100
|
|
@@ -33,7 +33,10 @@
|
|
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
|
|
|
# This global variable is used to hold the list of modules to be disabled.
|
|
-disabled_module_list = []
|
|
+try:
|
|
+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
|
|
+except KeyError:
|
|
+ disabled_module_list = list()
|
|
|
|
def add_dir_to_list(dirlist, dir):
|
|
"""Add the directory 'dir' to the list 'dirlist' (after any relative
|