1 | # -*- 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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup python 1.0 |
---|
5 | |
---|
6 | name py-pyqt5 |
---|
7 | version 5.6 |
---|
8 | revision 4 |
---|
9 | categories-append devel |
---|
10 | platforms darwin |
---|
11 | maintainers mmoll openmaintainer |
---|
12 | description PyQt5 is a set of Python bindings for the Qt5 toolkit |
---|
13 | long_description ${description}. The bindings \ |
---|
14 | are implemented as a set of Python modules and contain over 620 classes. |
---|
15 | homepage http://www.riverbankcomputing.co.uk/software/pyqt/intro |
---|
16 | license GPL-3 |
---|
17 | master_sites sourceforge:pyqt |
---|
18 | distname PyQt5_gpl-${version} |
---|
19 | checksums rmd160 498905b678fc2641c8ff6521b5c2126ac6ddf347 \ |
---|
20 | sha256 2e481a6c4c41b96ed3b33449e5f9599987c63a5c8db93313bd57a6acbf20f0e1 |
---|
21 | |
---|
22 | python.versions 27 34 35 |
---|
23 | |
---|
24 | if {${name} ne ${subport}} { |
---|
25 | PortGroup qt5 1.0 |
---|
26 | |
---|
27 | if {[info procs qt5.depends_component] eq ""} { |
---|
28 | proc qt5.depends_component {first args} { |
---|
29 | global qt5_component_lib qt5.using_kde os.major |
---|
30 | # join ${first} and (the optional) ${args} |
---|
31 | set args [linsert $args[set list {}] 0 ${first}] |
---|
32 | if {[info exists qt5.using_kde] && ${qt5.using_kde}} { |
---|
33 | set qt5main "qt5-kde" |
---|
34 | } elseif {${os.major} == 11} { |
---|
35 | set qt5main "qt55" |
---|
36 | } else { |
---|
37 | set qt5main "qt5" |
---|
38 | } |
---|
39 | foreach comp ${args} { |
---|
40 | if {${comp} eq "qt5"} { |
---|
41 | if {[info exists qt5.using_kde] && ${qt5.using_kde}} { |
---|
42 | global qt5_dependency |
---|
43 | depends_lib-append ${qt5_dependency} |
---|
44 | } else { |
---|
45 | depends_lib-append port:${qt5main} |
---|
46 | } |
---|
47 | } else { |
---|
48 | set portname "${qt5main}-${comp}" |
---|
49 | depends_lib-append port:${portname} |
---|
50 | } |
---|
51 | } |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | # pull in the Qt5 meta-port |
---|
56 | qt5.depends_component \ |
---|
57 | qt5 |
---|
58 | |
---|
59 | depends_lib-append port:py${python.version}-sip \ |
---|
60 | port:dbus-python${python.version} |
---|
61 | |
---|
62 | use_configure yes |
---|
63 | configure.pre_args |
---|
64 | configure.cmd "${python.bin} configure.py" |
---|
65 | configure.args-append \ |
---|
66 | -q ${qt_qmake_cmd} \ |
---|
67 | --verbose \ |
---|
68 | --confirm-license \ |
---|
69 | --sip=${prefix}/bin/sip-${python.branch} \ |
---|
70 | --dbus=${python.include}/dbus-1.0 \ |
---|
71 | --designer-plugindir=${qt_plugins_dir}/designer/Py${python.version}Qt5 \ |
---|
72 | --qml-plugindir=${qt_plugins_dir}/Py${python.version}Qt5 \ |
---|
73 | --disable=QtWebKit \ |
---|
74 | --disable=QtWebKitWidgets \ |
---|
75 | --disable=QtWebEngineCore \ |
---|
76 | --disable=QtWebEngineWidgets |
---|
77 | |
---|
78 | # using --dbus means the compiler will find dbus-python.h but not |
---|
79 | # the DBus headers themselves |
---|
80 | # do not clear include directories just because --dbus is given |
---|
81 | patchfiles-append patch-dbus_includes.diff |
---|
82 | |
---|
83 | build.cmd make |
---|
84 | build.target all |
---|
85 | destroot.cmd ${build.cmd} |
---|
86 | destroot.destdir DESTDIR=${destroot} |
---|
87 | |
---|
88 | # override QMAKE_MACOSX_DEPLOYMENT_TARGET set in ${prefix}/libexec/qt5/mkspecs/macx-clang/qmake.conf |
---|
89 | configure.args-append \ |
---|
90 | QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target} |
---|
91 | |
---|
92 | # override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf |
---|
93 | # so value of ${configure.cxx_stdlib} can always be used |
---|
94 | configure.args-append \ |
---|
95 | QMAKE_CXXFLAGS-=-stdlib=libc++ \ |
---|
96 | QMAKE_LFLAGS-=-stdlib=libc++ \ |
---|
97 | QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib} \ |
---|
98 | QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib} |
---|
99 | |
---|
100 | variant debug description "Build debug libraries" { |
---|
101 | configure.cmd-append --debug |
---|
102 | } |
---|
103 | |
---|
104 | variant webengine conflicts universal description {Build QtWebEngine module} { |
---|
105 | qt5.depends_component qtwebengine |
---|
106 | configure.args-delete --disable=QtWebEngineCore \ |
---|
107 | --disable=QtWebEngineWidgets |
---|
108 | } |
---|
109 | |
---|
110 | # probably not justified yet, given QtWebEngine's size |
---|
111 | # default_variants-append +webengine |
---|
112 | |
---|
113 | variant webkit description {Build QtWebKit module} { |
---|
114 | qt5.depends_component qtwebkit |
---|
115 | configure.args-delete --disable=QtWebKit \ |
---|
116 | --disable=QtWebKitWidgets |
---|
117 | } |
---|
118 | |
---|
119 | variant graceful description {Don't abort (crash) on Python errors} { |
---|
120 | patchfiles-append patch-no-abort-on-python-errors.diff |
---|
121 | } |
---|
122 | |
---|
123 | if { ![variant_isset universal] } { |
---|
124 | configure.args-append "--spec=${qt_qmake_spec}" |
---|
125 | } else { |
---|
126 | configure.universal_args-delete --disable-dependency-tracking |
---|
127 | set merger_configure_args(i386) "--spec=${qt_qmake_spec_32}" |
---|
128 | set merger_configure_args(x86_64) "--spec=${qt_qmake_spec_64}" |
---|
129 | } |
---|
130 | |
---|
131 | } |
---|
132 | |
---|
133 | livecheck.type regex |
---|
134 | livecheck.url http://www.riverbankcomputing.co.uk/software/pyqt/download5 |
---|
135 | livecheck.regex >PyQt5_gpl-(\[0-9.\]*).tar.gz< |
---|