File: 01_configure.patch

package info (click to toggle)
pyqwt3d 0.1.8-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 984 kB
  • sloc: python: 3,932; cpp: 328; makefile: 115; sh: 7
file content (82 lines) | stat: -rw-r--r-- 2,760 bytes parent folder | download | duplicates (2)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
The Debian QwtPlot3D libraries are named libqwtplot3d-qt{3,4}, 
not libqwtplot3d
--- a/configure/configure.py
+++ b/configure/configure.py
@@ -583,9 +583,9 @@
         # yes, zap all 'qwtplot3d'
         while options.extra_libs.count('qwtplot3d'):
             options.extra_libs.remove('qwtplot3d')
-    #elif ('qwtplot3d' not in options.extra_libs: Must be added manually. libqwtplot3d or libqwtplot3d-qt4 is ok
-    #   no, add 'qwtplot3d' if needed
-    #    options.extra_libs.append('qwtplot3d')
+    elif ('qwtplot3d' not in options.extra_libs: #Must be added manually. libqwtplot3d or libqwtplot3d-qt4 is ok
+       no, add 'qwtplot3d' if needed
+        options.extra_libs.append('qwtplot3d')
 
     # do we also compile and link the sources of zlib into PyQwt3D?
     if options.zlib_sources:
--- a/configure/configure-qt5.py
+++ b/configure/configure-qt5.py
@@ -44,7 +44,7 @@
 import PyQt5.QtCore
 qtconf = PyQt5.QtCore.PYQT_CONFIGURATION
 pyqt_mod_dir="/usr/lib/python%s/dist-packages/PyQt5/"%pyvers
-qt_inc_dir="/usr/include/x86_64-linux-gnu/qt5/"
+#qt_inc_dir="/usr/include/x86_64-linux-gnu/qt5/"
 pyqt_sip_dir = "/usr/share/sip/PyQt5"
 #/usr/share/sip/PyQt4
 
@@ -56,6 +56,35 @@
 
 # class Die
 
+class _TargetQtConfiguration:
+    """ A container for the target Qt configuration. """
+
+    def __init__(self, qmake):
+        """ Initialise the configuration.  qmake is the full pathname of the
+        qmake executable that will provide the configuration.
+        """
+
+        pipe = os.popen("QT_SELECT=qt5 qmake -query")
+
+        for l in pipe:
+            l = l.strip()
+
+            tokens = l.split(':', 1)
+            if isinstance(tokens, list):
+                if len(tokens) != 2:
+                    error("Unexpected output from qmake: '%s'\n" % l)
+
+                name, value = tokens
+            else:
+                name = tokens
+                value = None
+
+            name = name.replace('/', '_')
+
+            setattr(self, name, value)
+
+        pipe.close()
+
 
 try:
     required = 'At least SIP-4.5 and its development tools are required.'
@@ -66,6 +95,8 @@
     raise Die(required)
 del required
 
+qt_config = _TargetQtConfiguration("qmake")
+qt_inc_dir = qt_config.QT_INSTALL_HEADERS
 
 def get_pyqt_configuration(options):
     """Return the PyQt configuration for Qt3 or Qt4
@@ -456,7 +487,7 @@
             )
 
     makefile.extra_cflags.extend(options.extra_cflags)
-    makefile.extra_cxxflags.extend(options.extra_cxxflags)
+    makefile.extra_cxxflags.extend(options.extra_cxxflags+["-Wno-narrowing"])
     makefile.extra_defines.extend(options.extra_defines)
     makefile.extra_include_dirs.extend(options.extra_include_dirs)
     makefile.extra_lflags.extend(options.extra_lflags)