[138326] trunk/dports/python/py-pyqt4

michaelld at macports.org michaelld at macports.org
Sun Jul 5 12:25:33 PDT 2015


Revision: 138326
          https://trac.macports.org/changeset/138326
Author:   michaelld at macports.org
Date:     2015-07-05 12:25:32 -0700 (Sun, 05 Jul 2015)
Log Message:
-----------
py*-pyqt4:
+ remove cruft from py2[4-6], py3[0-3];
+ always build with dbus-python[27,34];
+ patch configure.py to work with phonon installed in a different directory than Qt4;
+ rev-bump for changes.

Modified Paths:
--------------
    trunk/dports/python/py-pyqt4/Portfile
    trunk/dports/python/py-pyqt4/files/patch-configure.py.diff

Modified: trunk/dports/python/py-pyqt4/Portfile
===================================================================
--- trunk/dports/python/py-pyqt4/Portfile	2015-07-05 19:21:46 UTC (rev 138325)
+++ trunk/dports/python/py-pyqt4/Portfile	2015-07-05 19:25:32 UTC (rev 138326)
@@ -20,6 +20,7 @@
 homepage        http://www.riverbankcomputing.co.uk/software/pyqt/intro
 
 version         4.11.4
+revision        1
 
 set branch      [join [lrange [split ${version} .] 0 1] .]
 set patch       [lindex [split ${version} .] 2]
@@ -147,37 +148,22 @@
         CFLAGS="${cflags}" \
         CXXFLAGS="${cxxflags}"
 
-    # subport for Python 2.4 or 2.5 installs into non-Framework locations
-    if {${python.version} <= 25} {
-        configure.cmd-append " -d ${python.pkgd} -b ${prefix}/bin"
-    }
+    configure.args-append   -e QtDesigner
 
-    # Don't build designer plugin for 2.4; not built as a framework
-    if {${python.version} != 24 } {
-        configure.args-append   -e QtDesigner
-    }
+    depends_lib-append      port:dbus-python${python.version}
+    configure.args-append   --dbus=${python.include}/dbus-1.0
 
     variant phonon description {Add phonon support} {
         configure.args-append   -e phonon
         depends_lib-append      port:phonon
     }
 
-
     variant scintilla description {Add QScintilla API file } {
         configure.args-delete   --no-qsci-api
         configure.args-append   --qsci-api
         depends_lib-append      port:qscintilla
     }
 
-    # dbus-python does not yet work correctly with 3.0+
-
-    if {${python.version} <= 27} {
-
-        depends_lib-append port:dbus-python${python.version}
-        configure.args-append --dbus=${python.include}/dbus-1.0
-
-    }
-
     post-configure {
         if {[variant_isset universal]} {
             set conflags ""

Modified: trunk/dports/python/py-pyqt4/files/patch-configure.py.diff
===================================================================
--- trunk/dports/python/py-pyqt4/files/patch-configure.py.diff	2015-07-05 19:21:46 UTC (rev 138325)
+++ trunk/dports/python/py-pyqt4/files/patch-configure.py.diff	2015-07-05 19:25:32 UTC (rev 138326)
@@ -1,5 +1,5 @@
---- configure.py.orig	2015-06-11 11:33:16.000000000 -0400
-+++ configure.py	2015-06-30 13:19:46.000000000 -0400
+--- configure.py.orig	2015-07-03 16:51:11.000000000 -0400
++++ configure.py	2015-07-03 16:52:51.000000000 -0400
 @@ -39,6 +39,7 @@
  qt_dir = None
  qt_incdir = None
@@ -8,7 +8,48 @@
  qt_bindir = None
  qt_datadir = None
  qt_archdatadir = None
-@@ -973,18 +974,7 @@
+@@ -513,7 +514,39 @@
+             generate_code("QtXmlPatterns")
+ 
+         if "phonon" in pyqt_modules:
+-            generate_code("phonon")
++            # check to see if phonon is installed by Qt or external to
++            # it. adding to the include path and library path will not
++            # hurt if Qt installed phonon, and will get the headers
++            # and library if phonon was installed external to Qt.
++            phononincdirs = []
++            phononlibdirs = []
++            sout = get_command_stdout("pkg-config --cflags-only-I --libs phonon")
++            iflags = sout.read().strip()
++            if iflags:
++                sout = get_command_stdout("%s -query QT_INSTALL_PREFIX" % opts.qmake)
++                qt_install_prefix = sout.read().strip()
++                if sys.hexversion >= 0x03000000:
++                    iflags = iflags.decode()
++                    qt_install_prefix = qt_install_prefix.decode()
++                for f in iflags.split():
++                    # look for flags outside the Qt install prefix only
++                    if f.find(qt_install_prefix) == -1:
++                        if f.startswith("-I"):
++                            tdir = f[2:]
++                            phononincdirs.append(tdir)
++                            if not tdir.endswith("phonon"):
++                                phononincdirs.append(tdir + "/phonon")
++                        elif f.startswith("-L"):
++                            phononlibdirs.append(f[2:])
++
++            if opts.bigqt:
++                cons_xtra_incdirs.append(phononincdirs)
++                cons_xtra_libdirs.append(phononlibdirs)
++
++                generate_code("phonon")
++            else:
++                generate_code("phonon", extra_include_dirs=phononincdirs,
++                    extra_lib_dirs=phononlibdirs)
+ 
+         if "QtAssistant" in pyqt_modules:
+             generate_code("QtAssistant")
+@@ -973,18 +1006,7 @@
                      dynamic_pylib = "--enable-shared" in config_args
  
                  if dynamic_pylib:
@@ -28,7 +69,7 @@
                  else:
                      sipconfig.inform("The Qt Designer plugin was disabled because a dynamic Python library couldn't be found")
                      opts.designer_plugin = False
-@@ -1083,7 +1073,10 @@
+@@ -1083,7 +1105,10 @@
  
      sipconfig.inform("SIP %s is being used." % sipcfg.sip_version_str)
      sipconfig.inform("The Qt header files are in %s." % qt_incdir)
@@ -40,7 +81,7 @@
      sipconfig.inform("The Qt binaries are in %s." % qt_bindir)
      sipconfig.inform("The Qt mkspecs directory is in %s." % qt_archdatadir)
      sipconfig.inform("These PyQt modules will be built: %s." % ", ".join(pyqt_modules))
-@@ -1148,7 +1141,8 @@
+@@ -1148,7 +1173,8 @@
          "qt_data_dir":        qt_datadir,
          "qt_archdata_dir":    qt_archdatadir,
          "qt_inc_dir":         qt_incdir,
@@ -50,7 +91,7 @@
      }
  
      sipconfig.create_config_module(module, template, content, macros)
-@@ -1736,7 +1730,7 @@
+@@ -1736,7 +1762,7 @@
              lfile = license.LicenseFile
          except AttributeError:
              lfile = None
@@ -59,7 +100,7 @@
          ltype = None
  
      if ltype is None:
-@@ -1841,12 +1835,14 @@
+@@ -1841,12 +1867,14 @@
      names = list(sipcfg.build_macros().keys())
      names.append("INCDIR_QT")
      names.append("LIBDIR_QT")
@@ -75,7 +116,7 @@
      }
  
      macros = sipconfig.parse_build_macros(fname, names, overrides, properties)
-@@ -1892,7 +1888,7 @@
+@@ -1892,7 +1920,7 @@
  
      # Work out how Qt was built on MacOS.
      if sys.platform == "darwin":
@@ -84,7 +125,7 @@
              global qt_framework
              qt_framework = 1
  
-@@ -1909,6 +1905,7 @@
+@@ -1909,6 +1937,7 @@
      sipcfg.qt_threaded = 1
      sipcfg.qt_dir = qt_dir
      sipcfg.qt_lib_dir = qt_libdir
@@ -92,7 +133,7 @@
  
      return ConfigurePyQt4(generator)
  
-@@ -1924,7 +1921,7 @@
+@@ -1924,7 +1953,7 @@
  
  
  def get_qt_configuration():
@@ -101,7 +142,7 @@
      qt_archdatadir, qt_pluginsdir and qt_xfeatures globals for the Qt
      installation.
      """
-@@ -1996,6 +1993,7 @@
+@@ -1996,6 +2025,7 @@
      out << QLibraryInfo::location(QLibraryInfo::PrefixPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::HeadersPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::LibrariesPath) << '\\n';
@@ -109,7 +150,7 @@
      out << QLibraryInfo::location(QLibraryInfo::BinariesPath) << '\\n';
      out << QLibraryInfo::location(QLibraryInfo::DataPath) << '\\n';
  #if QT_VERSION >= 0x050000
-@@ -2124,22 +2122,23 @@
+@@ -2124,22 +2154,23 @@
      lines = f.read().strip().split("\n")
      f.close()
  
@@ -143,7 +184,7 @@
  
      if opts.assume_shared:
          qt_shared = 'shared'
-@@ -2202,6 +2201,11 @@
+@@ -2202,6 +2233,11 @@
      p = create_optparser()
      opts, args = p.parse_args()
  
@@ -155,7 +196,7 @@
      # Provide defaults for platform-specific options.
      if sys.platform == 'win32':
          opts.qmake = find_default_qmake()
-@@ -2319,7 +2323,6 @@
+@@ -2319,7 +2355,6 @@
          raise
      except:
          sys.stderr.write(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150705/e121e37e/attachment-0001.html>


More information about the macports-changes mailing list