File: 1006_avoid_xml2-config.patch

package info (click to toggle)
uwsgi 2.0.21-5.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,724 kB
  • sloc: ansic: 86,547; python: 6,255; sh: 1,387; cpp: 1,131; java: 708; perl: 646; ruby: 555; makefile: 471; xml: 130; cs: 121; objc: 37; erlang: 20; php: 14; javascript: 11
file content (64 lines) | stat: -rw-r--r-- 2,750 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Description: use pkg-config for libxml2
 xml2-config is deprecated
Author: Jonas Smedegaard <dr@jones.dk>
Bug-Debian: http://bugs.debian.org/949509
Last-Update: 2020-01-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/plugins/airbrake/uwsgiplugin.py
+++ b/plugins/airbrake/uwsgiplugin.py
@@ -2,8 +2,8 @@
 
 NAME='airbrake'
 
-CFLAGS = [spcall('xml2-config --cflags')]
+CFLAGS = [spcall('pkg-config --cflags libxml-2.0')]
 LDFLAGS = []
-LIBS = ['-lcurl', spcall('xml2-config --libs')]
+LIBS = ['-lcurl', spcall('pkg-config --libs libxml-2.0')]
 GCC_LIST = ['airbrake_plugin']
 
--- a/plugins/webdav/uwsgiplugin.py
+++ b/plugins/webdav/uwsgiplugin.py
@@ -3,8 +3,8 @@
 NAME = 'webdav'
 
 CFLAGS = ['-Wno-deprecated-declarations']
-CFLAGS += os.popen('xml2-config --cflags').read().rstrip().split()
+CFLAGS += os.popen('pkg-config --cflags libxml-2.0').read().rstrip().split()
 LDFLAGS = []
-LIBS = os.popen('xml2-config --libs').read().rstrip().split()
+LIBS = os.popen('pkg-config --libs libxml-2.0').read().rstrip().split()
 
 GCC_LIST = ['webdav']
--- a/uwsgiconfig.py
+++ b/uwsgiconfig.py
@@ -1311,10 +1311,10 @@
 
         if self.get('xml'):
             if self.get('xml') == 'auto':
-                xmlconf = spcall('xml2-config --libs')
+                xmlconf = spcall('pkg-config --libs libxml-2.0')
                 if xmlconf and uwsgi_os != 'Darwin':
                     self.libs.append(xmlconf)
-                    xmlconf = spcall("xml2-config --cflags")
+                    xmlconf = spcall("pkg-config --cflags libxml-2.0")
                     self.cflags.append(xmlconf)
                     self.cflags.append("-DUWSGI_XML -DUWSGI_XML_LIBXML2")
                     self.gcc_list.append('core/xmlconf')
@@ -1325,13 +1325,13 @@
                     self.gcc_list.append('core/xmlconf')
                     report['xml'] = 'expat'
             elif self.get('xml') == 'libxml2':
-                xmlconf = spcall('xml2-config --libs')
+                xmlconf = spcall('pkg-config --libs libxml-2.0')
                 if xmlconf is None:
                     print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
                     sys.exit(1)
                 else:
                     self.libs.append(xmlconf)
-                    xmlconf = spcall("xml2-config --cflags")
+                    xmlconf = spcall("pkg-config --cflags libxml-2.0")
                     if xmlconf is None:
                         print("*** libxml2 headers unavailable. uWSGI build is interrupted. You have to install libxml2 development package or use libexpat or disable XML")
                         sys.exit(1)