uwsgi/uwsgi_fix_php8.patch
Ralf Ertzinger 8fe9ce38dd Update to 2.0.20
Fix build against PHP8
Remove support for EL6
General logic cleanup and removal of dead code from the spec file
Add --verbose to build step to show compiler settings
2022-02-02 20:32:34 +01:00

17 lines
686 B
Diff

diff -uNr a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py
--- a/plugins/php/uwsgiplugin.py 2022-01-22 22:40:33.783038869 +0100
+++ b/plugins/php/uwsgiplugin.py 2022-01-22 22:41:45.261394898 +0100
@@ -20,7 +20,12 @@
if ld_run_path:
LDFLAGS.append('-L%s' % ld_run_path)
-LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
+# PHP8 and above does not add the version to the library
+# name
+if int(php_version) < 8:
+ LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
+else:
+ LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp']
phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR')
if phplibdir: