Skip to content

Commit 6bd250d

Browse files
authored
Merge pull request #2734 from niol/build-fixes
Some minor build fixes
2 parents f931938 + bd85f47 commit 6bd250d

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

plugins/airbrake/uwsgiplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
NAME = 'airbrake'
44

5-
CFLAGS = [spcall('xml2-config --cflags')]
5+
CFLAGS = [spcall('pkg-config --cflags libxml-2.0')]
66
LDFLAGS = []
77
LIBS = [
88
'-lcurl',
9-
spcall('xml2-config --libs')
9+
spcall('pkg-config --libs libxml-2.0')
1010
]
1111
GCC_LIST = ['airbrake_plugin']

plugins/jvm/uwsgiplugin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@
4848
break
4949

5050
try:
51-
JVM_INCPATH = ['-I"' + os.environ['UWSGICONFIG_JVM_INCPATH'] + '"']
51+
JVM_INCPATH = ['-I' + os.environ['UWSGICONFIG_JVM_INCPATH']]
5252
except KeyError:
5353
pass
5454

5555
try:
56-
JVM_LIBPATH = ['-L"' + os.environ['UWSGICONFIG_JVM_LIBPATH'] + '"']
56+
JVM_INCPATH = [os.environ['UWSGICONFIG_JVM_INCLUDES']]
57+
except KeyError:
58+
pass
59+
60+
try:
61+
JVM_LIBPATH = ['-L' + os.environ['UWSGICONFIG_JVM_LIBPATH']]
5762
except KeyError:
5863
pass
5964

plugins/php/uwsgiplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# PHP8 and above does not add the version to the library
2525
# name
2626
if int(php_version) < 8:
27-
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version]
27+
LIBS = ['-lphp' + php_version]
2828
else:
29-
LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp']
29+
LIBS = ['-lphp']
3030

3131
phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR')
3232
if phplibdir:

plugins/webdav/uwsgiplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
NAME = 'webdav'
44

55
CFLAGS = ['-Wno-deprecated-declarations']
6-
CFLAGS += os.popen('xml2-config --cflags').read().rstrip().split()
6+
CFLAGS += os.popen('pkg-config --cflags libxml-2.0').read().rstrip().split()
77
LDFLAGS = []
8-
LIBS = os.popen('xml2-config --libs').read().rstrip().split()
8+
LIBS = os.popen('pkg-config --libs libxml-2.0').read().rstrip().split()
99

1010
GCC_LIST = ['webdav']

uwsgiconfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,10 +1327,10 @@ def get_gcll(self):
13271327

13281328
if self.get('xml'):
13291329
if self.get('xml') == 'auto':
1330-
xmlconf = spcall('xml2-config --libs')
1330+
xmlconf = spcall('pkg-config --libs libxml-2.0')
13311331
if xmlconf and uwsgi_os != 'Darwin':
13321332
self.libs.append(xmlconf)
1333-
xmlconf = spcall("xml2-config --cflags")
1333+
xmlconf = spcall("pkg-config --cflags libxml-2.0")
13341334
self.cflags.append(xmlconf)
13351335
self.cflags.append("-DUWSGI_XML -DUWSGI_XML_LIBXML2")
13361336
self.gcc_list.append('core/xmlconf')
@@ -1341,13 +1341,13 @@ def get_gcll(self):
13411341
self.gcc_list.append('core/xmlconf')
13421342
report['xml'] = 'expat'
13431343
elif self.get('xml') == 'libxml2':
1344-
xmlconf = spcall('xml2-config --libs')
1344+
xmlconf = spcall('pkg-config --libs libxml-2.0')
13451345
if xmlconf is None:
13461346
print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
13471347
sys.exit(1)
13481348
else:
13491349
self.libs.append(xmlconf)
1350-
xmlconf = spcall("xml2-config --cflags")
1350+
xmlconf = spcall("pkg-config --cflags libxml-2.0")
13511351
if xmlconf is None:
13521352
print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
13531353
sys.exit(1)

0 commit comments

Comments
 (0)