diff --git a/lang/python37/Makefile b/lang/python37/Makefile index 1fbc864fc546..00715d704b09 100644 --- a/lang/python37/Makefile +++ b/lang/python37/Makefile @@ -1,141 +1,146 @@ # Created by: Kubilay Kocak PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} DISTNAME= Python-${DISTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi \ libmpdec.so:math/mpdecimal USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes GNU_CONFIGURE= yes python_CMD= ${PREFIX}/bin/python${PYTHON_DISTVERSION:R} SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py # Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits. PYTHON_VER= ${PYTHON_DISTVERSION:R} PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --with-system-ffi --with-system-libmpdec --without-ensurepip -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX} PLIST_SUB= ABI=${ABIFLAGS} \ XY=${PYTHON_SUFFIX} \ XYDOT=${PYTHON_VER} \ XYZDOT=${DISTVERSION} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 NLS PYMALLOC OPTIONS_DEFAULT= PYMALLOC OPTIONS_RADIO= HASH OPTIONS_RADIO_HASH= FNV SIPHASH OPTIONS_SUB= yes NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs HASH_DESC= Hash Algorithm (PEP-456) FNV_DESC= Modified Fowler-Noll-Vo Algorithm SIPHASH_DESC= SipHash24 Algorithm FNV_CONFIGURE_ON= --with-hash-algorithm=fnv SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: https://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MPYMALLOC} ABIFLAGS:= m${ABIFLAGS} .endif .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python${PYTHON_VER}${ABIFLAGS} \ bin/python${PYTHON_VER}${ABIFLAGS}-config \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}.pc .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See https://bugs.freebsd.org/115940 and https://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " DISABLED_EXTENSIONS+= nis .else PLIST_SUB+= NO_NIS="" .endif post-patch: # disable the detection of includes and library from e2fsprogs-libuuid, # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: https://bugs.python.org/issue17975 .endif # This code block exists for the qemu-user enabled cross build environment. # When using this environment in poudriere, CC is not set to the default # of /usr/bin/cc and a cross-compile toolchain is used. We need to hand # edit this so that the run time configuration for python matches what the # FreeBSD base system provides. sbruno 02Aug2017 .if ${CC} == /nxb-bin/usr/bin/cc @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -O -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/config-${PYTHON_VER}${ABIFLAGS}/Makefile .endif for i in ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions ${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \ ${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py .include diff --git a/lang/python37/files/patch-issue20210 b/lang/python37/files/patch-issue20210 deleted file mode 100644 index 90330d8f90a5..000000000000 --- a/lang/python37/files/patch-issue20210 +++ /dev/null @@ -1,68 +0,0 @@ -# Backport patch 0001 from Issue #20210 -# Issue: https://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, ---- configure.orig 2015-03-01 13:57:08.000000000 +0300 -+++ configure 2015-03-01 13:57:30.000000000 +0300 -@@ -650,6 +650,7 @@ - TCLTK_LIBS - TCLTK_INCLUDES - LIBFFI_INCLUDEDIR -+DISABLED_EXTENSIONS - PKG_CONFIG_LIBDIR - PKG_CONFIG_PATH - PKG_CONFIG ---- ./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 diff --git a/lang/python38/Makefile b/lang/python38/Makefile index 83a6943299b3..26f043a13531 100644 --- a/lang/python38/Makefile +++ b/lang/python38/Makefile @@ -1,145 +1,150 @@ # Created by: Kubilay Kocak PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} DISTNAME= Python-${DISTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes GNU_CONFIGURE= yes python_CMD= ${PREFIX}/bin/python${PYTHON_DISTVERSION:R} SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \ Lib/test/ziptestdata/exe_with_zip \ Lib/test/ziptestdata/header.sh # Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits. PYTHON_VER= ${PYTHON_DISTVERSION:R} PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ --with-system-ffi -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX} PLIST_SUB= ABI=${ABIFLAGS} \ XY=${PYTHON_SUFFIX} \ XYDOT=${PYTHON_VER} \ XYZDOT=${DISTVERSION} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC OPTIONS_DEFAULT= LIBMPDEC PYMALLOC OPTIONS_RADIO= HASH OPTIONS_RADIO_HASH= FNV SIPHASH OPTIONS_SUB= yes LIBMPDEC_DESC= Use libmpdec from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs HASH_DESC= Hash Algorithm (PEP-456) FNV_DESC= Modified Fowler-Noll-Vo Algorithm SIPHASH_DESC= SipHash24 Algorithm FNV_CONFIGURE_ON= --with-hash-algorithm=fnv SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: https://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python${PYTHON_VER}${ABIFLAGS} \ bin/python${PYTHON_VER}${ABIFLAGS}-config \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}.pc \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}-embed.pc .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See https://bugs.freebsd.org/115940 and https://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " DISABLED_EXTENSIONS+= nis .else PLIST_SUB+= NO_NIS="" .endif post-patch: # disable the detection of includes and library from e2fsprogs-libuuid, # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: https://bugs.python.org/issue17975 .endif # This code block exists for the qemu-user enabled cross build environment. # When using this environment in poudriere, CC is not set to the default # of /usr/bin/cc and a cross-compile toolchain is used. We need to hand # edit this so that the run time configuration for python matches what the # FreeBSD base system provides. sbruno 02Aug2017 .if ${CC} == /nxb-bin/usr/bin/cc @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -O -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/config-${PYTHON_VER}${ABIFLAGS}/Makefile .endif for i in ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions ${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \ ${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py .include diff --git a/lang/python39/Makefile b/lang/python39/Makefile index 227b7085a135..e937b5a23b23 100644 --- a/lang/python39/Makefile +++ b/lang/python39/Makefile @@ -1,146 +1,151 @@ # Created by: Kubilay Kocak PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} DISTNAME= Python-${DISTVERSION} DIST_SUBDIR= python MAINTAINER= python@FreeBSD.org COMMENT= Interpreted object-oriented programming language LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \ shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes GNU_CONFIGURE= yes python_CMD= ${PREFIX}/bin/python${PYTHON_DISTVERSION:R} SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \ Lib/test/ziptestdata/exe_with_zip \ Lib/test/ziptestdata/header.sh # Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits. PYTHON_VER= ${PYTHON_DISTVERSION:R} PYTHON_VERSION= python${PYTHON_VER} PYTHON_SUFFIX= ${PYTHON_VER:S/.//g} DISABLED_EXTENSIONS= _sqlite3 _tkinter _gdbm CONFIGURE_ARGS+= --enable-shared --without-ensurepip \ --with-system-ffi -CONFIGURE_ENV+= OPT="" DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS}" # Null out OPT to respect user CFLAGS and remove optimizations +CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files TEST_TARGET= buildbottest TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER} MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library SUB_FILES= pkg-message SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX} PLIST_SUB= ABI=${ABIFLAGS} \ XY=${PYTHON_SUFFIX} \ XYDOT=${PYTHON_VER} \ XYZDOT=${DISTVERSION} \ OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC OPTIONS_DEFAULT= LIBMPDEC PYMALLOC OPTIONS_RADIO= HASH OPTIONS_RADIO_HASH= FNV SIPHASH OPTIONS_SUB= yes LIBMPDEC_DESC= Use libmpdec from ports instead of bundled version NLS_DESC= Enable gettext support for the locale module PYMALLOC_DESC= Enable specialized mallocs HASH_DESC= Hash Algorithm (PEP-456) FNV_DESC= Modified Fowler-Noll-Vo Algorithm SIPHASH_DESC= SipHash24 Algorithm FNV_CONFIGURE_ON= --with-hash-algorithm=fnv SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 DEBUG_CONFIGURE_WITH= pydebug IPV6_CONFIGURE_ENABLE= ipv6 LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 # Upstream Issue: https://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no PYMALLOC_CONFIGURE_WITH= pymalloc .include "${.CURDIR}/Makefile.version" .include .if ${PORT_OPTIONS:MDEBUG} ABIFLAGS:= d${ABIFLAGS} .endif .if !empty(ABIFLAGS) PLIST_FILES+= bin/python${PYTHON_VER}${ABIFLAGS} \ bin/python${PYTHON_VER}${ABIFLAGS}-config \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}.pc \ libdata/pkgconfig/python-${PYTHON_VER}${ABIFLAGS}-embed.pc .endif .if ${ARCH} == sparc64 CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif # See https://bugs.freebsd.org/115940 and https://bugs.freebsd.org/193650 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) PLIST_SUB+= NO_NIS="@comment " DISABLED_EXTENSIONS+= nis .else PLIST_SUB+= NO_NIS="" .endif post-patch: # disable the detection of includes and library from e2fsprogs-libuuid, # which introduces hidden dependency and breaks build @${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure @${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py +# Apply DISABLED_EXTENSIONS + @${ECHO} '*disabled*' > ${WRKSRC}/Modules/Setup.local +. for _module in ${DISABLED_EXTENSIONS} + @${ECHO} ${_module} >> ${WRKSRC}/Modules/Setup.local +. endfor post-install: .if ! ${PORT_OPTIONS:MDEBUG} ${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so # Upstream Issue: https://bugs.python.org/issue17975 .endif # This code block exists for the qemu-user enabled cross build environment. # When using this environment in poudriere, CC is not set to the default # of /usr/bin/cc and a cross-compile toolchain is used. We need to hand # edit this so that the run time configuration for python matches what the # FreeBSD base system provides. sbruno 02Aug2017 .if ${CC} == /nxb-bin/usr/bin/cc @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${WRKSRC} \ ./python -E -O -m compileall -d ${PREFIX}/lib/python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/_sysconfigdata_${ABIFLAGS}_freebsd${OSREL:R}_.py @${REINPLACE_CMD} -e 's=/nxb-bin==' \ ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/config-${PYTHON_VER}${ABIFLAGS}/Makefile .endif for i in ${STAGEDIR}${PREFIX}/lib/python${PYTHON_VER}/lib-dynload/*.so; do \ ${STRIP_CMD} $$i; done # Strip shared extensions ${INSTALL_DATA} ${WRKSRC}/Tools/gdb/libpython.py \ ${STAGEDIR}${PREFIX}/lib/libpython${PYTHON_VER}${ABIFLAGS}.so.1.0-gdb.py .include