From f7450587dcb605f64e9f6085c795c754193ca2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Molina=20Garc=C3=ADa?= Date: Sun, 5 Sep 2021 20:54:57 +0200 Subject: [PATCH] Fix build of ossaudiodev in Linux/FreeBSD for Python 2.6 (#2049) This is essentially the same fix as in pull request #2047, but it is applied from Python 2.6.6 to 2.6.9, and for `ossaudiodev` as well as the (deprecated) `linuxaudiodev`. --- .../2.6.6/Python-2.6.6/000_patch-setup.py.diff | 18 +++++++++++++++++- .../2.6.7/Python-2.6.7/000_patch-setup.py.diff | 18 +++++++++++++++++- .../2.6.8/Python-2.6.8/000_patch-setup.py.diff | 18 +++++++++++++++++- .../2.6.9/Python-2.6.9/000_patch-setup.py.diff | 18 +++++++++++++++++- 4 files changed, 68 insertions(+), 4 deletions(-) diff --git a/plugins/python-build/share/python-build/patches/2.6.6/Python-2.6.6/000_patch-setup.py.diff b/plugins/python-build/share/python-build/patches/2.6.6/Python-2.6.6/000_patch-setup.py.diff index bf60166b..322cf298 100644 --- a/plugins/python-build/share/python-build/patches/2.6.6/Python-2.6.6/000_patch-setup.py.diff +++ b/plugins/python-build/share/python-build/patches/2.6.6/Python-2.6.6/000_patch-setup.py.diff @@ -44,4 +44,20 @@ diff -r -u setup.py setup.py # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. - +@@ -1443,14 +1443,13 @@ + + + # Platform-specific libraries +- if platform == 'linux2': ++ if platform.startswith('linux'): + # Linux-specific modules + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + else: + missing.append('linuxaudiodev') + +- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', +- 'freebsd7', 'freebsd8'): ++ if platform.startswith('linux') or platform.startswith('freebsd'): + exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) + else: + missing.append('ossaudiodev') diff --git a/plugins/python-build/share/python-build/patches/2.6.7/Python-2.6.7/000_patch-setup.py.diff b/plugins/python-build/share/python-build/patches/2.6.7/Python-2.6.7/000_patch-setup.py.diff index bf60166b..322cf298 100644 --- a/plugins/python-build/share/python-build/patches/2.6.7/Python-2.6.7/000_patch-setup.py.diff +++ b/plugins/python-build/share/python-build/patches/2.6.7/Python-2.6.7/000_patch-setup.py.diff @@ -44,4 +44,20 @@ diff -r -u setup.py setup.py # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. - +@@ -1443,14 +1443,13 @@ + + + # Platform-specific libraries +- if platform == 'linux2': ++ if platform.startswith('linux'): + # Linux-specific modules + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + else: + missing.append('linuxaudiodev') + +- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', +- 'freebsd7', 'freebsd8'): ++ if platform.startswith('linux') or platform.startswith('freebsd'): + exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) + else: + missing.append('ossaudiodev') diff --git a/plugins/python-build/share/python-build/patches/2.6.8/Python-2.6.8/000_patch-setup.py.diff b/plugins/python-build/share/python-build/patches/2.6.8/Python-2.6.8/000_patch-setup.py.diff index bf60166b..322cf298 100644 --- a/plugins/python-build/share/python-build/patches/2.6.8/Python-2.6.8/000_patch-setup.py.diff +++ b/plugins/python-build/share/python-build/patches/2.6.8/Python-2.6.8/000_patch-setup.py.diff @@ -44,4 +44,20 @@ diff -r -u setup.py setup.py # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. - +@@ -1443,14 +1443,13 @@ + + + # Platform-specific libraries +- if platform == 'linux2': ++ if platform.startswith('linux'): + # Linux-specific modules + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + else: + missing.append('linuxaudiodev') + +- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', +- 'freebsd7', 'freebsd8'): ++ if platform.startswith('linux') or platform.startswith('freebsd'): + exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) + else: + missing.append('ossaudiodev') diff --git a/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff b/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff index bf60166b..322cf298 100644 --- a/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff +++ b/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff @@ -44,4 +44,20 @@ diff -r -u setup.py setup.py # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. - +@@ -1443,14 +1443,13 @@ + + + # Platform-specific libraries +- if platform == 'linux2': ++ if platform.startswith('linux'): + # Linux-specific modules + exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) ) + else: + missing.append('linuxaudiodev') + +- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', +- 'freebsd7', 'freebsd8'): ++ if platform.startswith('linux') or platform.startswith('freebsd'): + exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) + else: + missing.append('ossaudiodev')