# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {michaelld @michaelld} openmaintainer
description PyQt4 is a set of Python bindings for the Qt4 toolkit
PyQt4 is a set of Python bindings for the Qt4 toolkit. The \
bindings are implemented as a set of Python modules: qt, \
qtcanvas, qtgl, qtnetwork, qtsql, qttable, qtui and qtxml, \
and contains 300 classes and over 5,750 functions and methods.
homepage https://www.riverbankcomputing.com/software/pyqt/intro
set branch [join [lrange [split ${version} .] 0 1] .]
set patch [lindex [split ${version} .] 2]
# pre-declare provided subports
python.versions 27 34 35 36 37
python.default_version 27
foreach py_ver ${python.versions} {
subport py${py_ver}-pyqt4 {}
if {${name} ne ${subport}} {
master_sites sourceforge:pyqt
distname PyQt4_gpl_mac-${branch}
distname PyQt4_gpl_mac-${version}
# bump the epoch to revert the version back to 4.12.1
# bump the revision back to 2, where it was
# before the updates to 4.12.[23].
checksums rmd160 07125dd79a1d76dd83680a4f940f267f792486aa \
sha256 3224ab2c4d392891eb0abbc2bf076fef2ead3a5bb36ceae2383df4dda00ccce5 \
patchfiles-append patch-configure.py.diff \
depends_lib-append port:py${python.version}-sip \
port:dbus-python${python.version}
# patch-configure.py* file alters configure.py so that the
# qtdesigner plugin can link. It ensures that both LFLAGS are
# included and that the relevant version framework is linked. It
# also adds a "framework" directory concept to make the split in
# qt4-mac as of 4.8.0, and uses it where appropriate.
# fix location of MacPorts'-installed Qt .apps, step 1
patchfiles-append patch-fix-qt_apps_dir.diff
# because CPATH is set, pkgconfig does not include
# ${prefix}/include even when requested the configure.py script,
# however, adds /phonon to the include directory
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
reinplace "s|@@MACPORTS_PYTHON_FRAMEWORK@@|${python.prefix}/Python|" ${worksrcpath}/configure.py
# fix location of MacPorts'-installed Qt .apps, step 2
reinplace "s|@QT_APPS_DIR@|${qt_apps_dir}|" \
${worksrcpath}/examples/demos/qtdemo/menumanager.py \
examples/designer/plugins/plugins.py