# 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 @@ -1679,8 +1679,8 @@ if test $ac_cv_disable_unused_result_warning = yes then - BASECFLAGS="$BASECFLAGS -Wno-unused-result" - CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" +# BASECFLAGS="$BASECFLAGS -Wno-unused-result" +# CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" fi AC_MSG_CHECKING(if we can turn off $CC unused parameter warning) @@ -3061,6 +3061,8 @@ PKG_PROG_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 @@ -7123,8 +7124,8 @@ if test $ac_cv_disable_unused_result_warning = yes then - BASECFLAGS="$BASECFLAGS -Wno-unused-result" - CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" +# BASECFLAGS="$BASECFLAGS -Wno-unused-result" +# CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 --- setup.py.orig 2021-02-19 13:31:44.000000000 +0100 +++ setup.py 2021-02-26 10:53:25.554030000 +0100 @@ -1562,7 +1562,7 @@ self.missing.extend(['resource', 'termios']) # Platform-specific libraries - if HOST_PLATFORM.startswith(('linux', 'freebsd', 'gnukfreebsd')): + if HOST_PLATFORM.startswith(('linux', 'freebsd', 'gnukfreebsd', 'bsdsunix')): self.add(Extension('ossaudiodev', ['ossaudiodev.c'])) elif not AIX: self.missing.append('ossaudiodev')