aboutsummaryrefslogtreecommitdiff
path: root/devel/py-qt4-core/files/patch-configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'devel/py-qt4-core/files/patch-configure.py')
-rw-r--r--devel/py-qt4-core/files/patch-configure.py75
1 files changed, 46 insertions, 29 deletions
diff --git a/devel/py-qt4-core/files/patch-configure.py b/devel/py-qt4-core/files/patch-configure.py
index 6b67dc9245ed..2c32cb941c5b 100644
--- a/devel/py-qt4-core/files/patch-configure.py
+++ b/devel/py-qt4-core/files/patch-configure.py
@@ -1,6 +1,6 @@
---- configure.py.orig 2008-11-08 21:55:49.000000000 +1000
-+++ configure.py 2009-01-03 23:09:03.000000000 +1000
-@@ -42,6 +42,10 @@
+--- configure.py.orig 2009-07-15 00:31:43.000000000 +1100
++++ configure.py 2009-07-21 16:44:53.000000000 +1100
+@@ -41,6 +41,10 @@
import sipconfig
@@ -10,7 +10,7 @@
+if freebsd: freebsd_port = os.environ['PYQT4_COMPONENT']
# Initialise the globals.
- pyqt_version = 0x040404
+ pyqt_version = 0x040502
@@ -74,7 +78,6 @@
dbuslibdirs = []
dbuslibs = []
@@ -19,7 +19,7 @@
# Under Windows qmake and the Qt DLLs must be into the system PATH otherwise
# the dynamic linker won't be able to resolve the symbols. On other systems we
# assume we can just run qmake by using its full pathname.
-@@ -310,14 +313,23 @@
+@@ -347,14 +350,23 @@
elif sipcfg.universal:
sipconfig.inform("QtDesigner module disabled with universal binaries.")
else:
@@ -46,7 +46,7 @@
def code(self):
cons_xtra_incdirs = []
-@@ -338,6 +350,10 @@
+@@ -380,6 +392,10 @@
cons_xtra_libs.extend(sp_libs)
generate_code("QtCore")
@@ -57,7 +57,7 @@
else:
generate_code("QtCore", extra_include_dirs=sp_incdirs,
extra_lib_dirs=sp_libdirs, extra_libs=sp_libs)
-@@ -521,19 +537,28 @@
+@@ -565,19 +581,28 @@
sipconfig.inform("Unable to find the following static plugins: %s" % ", ".join(opts.staticplugins))
# Generate the QScintilla API file.
@@ -93,9 +93,9 @@
+
+ f.close()
- def _static_plugins(self, mname):
- """Return a tuple of the libraries (in platform neutral format) and the
-@@ -604,7 +629,13 @@
+ def _qpy_directories(self, mname):
+ """Return a tuple of the directories containing the header files and
+@@ -666,19 +691,25 @@
return libs, libdirs
def module_installs(self):
@@ -108,9 +108,24 @@
+ else:
+ return ["__init__.py", "pyqtconfig.py"]
- def qpylibs(self):
- # See which QPy libraries to build.
-@@ -690,23 +721,43 @@
+ def qpy_libs(self):
+ # See which QPy support libraries to build.
+ qpylibs = {}
+
+- if "QtCore" in pyqt_modules:
++ if freebsd_port == 'core':
+ qpylibs["QtCore"] = "qpycore.pro"
+
+- if "QtGui" in pyqt_modules:
++ if freebsd_port == 'gui':
+ qpylibs["QtGui"] = "qpygui.pro"
+
+- if "QtDesigner" in pyqt_modules:
++ if freebsd_port == 'designer':
+ qpylibs["QtDesigner"] = "qpydesigner.pro"
+
+ # Run qmake to generate the Makefiles.
+@@ -780,23 +811,43 @@
# Create the pyuic4 wrapper. Use the GUI version on MacOS (so that
# previews work properly and normal console use will work anyway), but
# not on Windows (so that normal console use will work).
@@ -167,7 +182,7 @@
if "QtXml" in pyqt_modules:
sipconfig.inform("Creating pylupdate4 Makefile...")
-@@ -743,7 +794,10 @@
+@@ -822,7 +873,10 @@
makefile.generate()
tool.append("pyrcc")
else:
@@ -179,7 +194,7 @@
if opts.designer_plugin and "QtDesigner" in pyqt_modules:
py_major = sipcfg.py_version >> 16
-@@ -766,11 +820,17 @@
+@@ -845,11 +899,17 @@
glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))):
lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
link = "%s -lpython%d.%d" % (lib_dir_flag, py_major, py_minor)
@@ -198,11 +213,11 @@
if opts.designer_plugin:
sipconfig.inform("Creating Qt Designer plugin Makefile...")
-@@ -839,21 +899,44 @@
+@@ -921,21 +981,44 @@
sipconfig.inform("The %s Qt libraries are in %s." % (lib_type, qt_libdir))
sipconfig.inform("The Qt binaries are in %s." % qt_bindir)
sipconfig.inform("The Qt mkspecs directory is in %s." % qt_datadir)
-- sipconfig.inform("These PyQt modules will be built: %s." % string.join(pyqt_modules))
+- sipconfig.inform("These PyQt modules will be built: %s." % ", ".join(pyqt_modules))
- sipconfig.inform("The PyQt Python package will be installed in %s." % opts.pyqtmoddir)
-
- if opts.designer_plugin:
@@ -251,7 +266,7 @@
if opts.vendorcheck:
sipconfig.inform("PyQt will only be usable with signed interpreters.")
-@@ -1253,7 +1336,11 @@
+@@ -1341,7 +1424,11 @@
of libraries.
extra_sip_flags is an optional list of additional flags to pass to SIP.
"""
@@ -264,7 +279,7 @@
mk_clean_dir(mname)
-@@ -1325,7 +1412,11 @@
+@@ -1413,7 +1500,11 @@
sipconfig.error("Unable to create the C++ code.")
# Generate the Makefile.
@@ -277,7 +292,7 @@
installs = []
-@@ -1764,6 +1855,10 @@
+@@ -1868,6 +1959,10 @@
p.print_help()
sys.exit(2)
@@ -288,7 +303,7 @@
sipcfg.set_build_macros(macros)
# Check Qt is what we need.
-@@ -1771,7 +1866,7 @@
+@@ -1875,7 +1970,7 @@
# Check the licenses are compatible.
check_license()
@@ -297,7 +312,7 @@
# Check which modules to build.
pyqt.check_modules()
-@@ -1793,9 +1888,18 @@
+@@ -1897,9 +1992,18 @@
installs=[(pyqt.module_installs(), pyqt_modroot)]
if opts.api:
@@ -318,26 +333,28 @@
if opts.bigqt:
xtra_modules.append("_qt")
-@@ -1806,14 +1910,31 @@
+@@ -1910,14 +2014,33 @@
if opts.mwg_qwt_dir:
xtra_modules.append("Qwt5")
+ if freebsd:
+ if freebsd_port == 'dbus':
+ s = pyqt.tools()
-+ elif freebsd_port == 'designer':
-+ s = pyqt.qpylibs() + [pyqt_modules[-1]]
++ elif freebsd_port in ('designer', 'gui'):
++ s = pyqt.qpy_libs() + [pyqt_modules[-1]]
+ elif freebsd_port == 'designerplugin':
+ s = pyqt.tools()
++ elif freebsd_port == 'xml':
++ s = [pyqt_modules[-1]] + pyqt.tools()
+ else:
+ s = [pyqt_modules[-1]]
-+ if freebsd_port in ('core', 'xml'):
-+ s += pyqt.tools()
-+ else: s = pyqt.qpylibs() + pyqt_modules + xtra_modules + pyqt.tools()
++ if freebsd_port == 'core':
++ s = pyqt.qpy_libs() + [pyqt_modules[-1]] + pyqt.tools()
++ else: s = pyqt.qpy_libs() + pyqt_modules + xtra_modules + pyqt.tools()
+
sipconfig.ParentMakefile(
configuration=sipcfg,
-- subdirs=pyqt.qpylibs() + pyqt_modules + xtra_modules + pyqt.tools(),
+- subdirs=pyqt.qpy_libs() + pyqt_modules + xtra_modules + pyqt.tools(),
+ subdirs=s,
installs=installs
).generate()