Ticket #19449: Portfile

File Portfile, 2.4 KB (added by chepra@…, 16 years ago)
Line 
1# $Id: Portfile 49597 2009-04-13 03:18:57Z macsforever2000@macports.org $
2
3PortSystem      1.0
4
5name            py26-pyqt4
6version         4.4.4
7categories      python devel
8platforms       macosx
9maintainers     saispo
10description     PyQt4 is a set of Python bindings for the Qt4 toolkit
11long_description \
12                PyQt4 is a set of Python bindings for the Qt4 toolkit. The \
13                bindings are implemented as a set of Python modules: qt, \
14                qtcanvas, qtgl, qtnetwork, qtsql, qttable, qtui and qtxml, \
15                and contains 300 classes and over 5,750 functions and methods.
16homepage        http://www.riverbankcomputing.co.uk/software/pyqt/intro
17master_sites    http://www.riverbankcomputing.com/static/Downloads/PyQt4/ \
18                http://pyqwt.sourceforge.net/support/
19distname        PyQt-mac-gpl-${version}
20
21checksums md5    b4fc6142bec4dc75facf7c9a8b556c1f \
22          sha1   3b761cb5cca18aa9d800c6b50e0ef619166fc7af \
23          rmd160 3cfee99c534a9b1a9374a97dc31414f6dde8234b
24
25depends_lib     port:py26-sip port:qt4-mac
26
27#patchfiles     patch-configure.py
28
29set pyversion 2.6
30set qt_dir      ${prefix}/libexec/qt4-mac
31
32pre-configure {
33        file copy -force ${qt_dir}/mkspecs/macx-g++/qmake.conf \
34                ${worksrcpath}/qmake.conf
35
36        reinplace "s|-bundle|-bundle -flat_namespace -undefined suppress|" \
37                ${worksrcpath}/qmake.conf
38}
39
40use_configure   yes
41
42configure.cmd   "${prefix}/bin/python2.6 configure.py \
43                -g -q ${qt_dir}/bin/qmake \
44                --confirm-license"
45configure.pre_args
46configure.post_args     LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
47
48build.target    all
49
50test.run        yes
51test.cmd        cd qt && ${prefix}/bin/python2.6 -c 'import PyQt4'
52
53post-destroot {
54    ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/pyrcc4 ${destroot}${prefix}/bin/pyrcc4-${pyversion}
55    ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/pyuic4 ${destroot}${prefix}/bin/pyuic4-${pyversion}   
56   
57   
58        xinstall -m 755 -d ${destroot}${prefix}/share/doc
59        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
60        file copy ${worksrcpath}/examples \
61                ${destroot}${prefix}/share/doc/${name}
62        xinstall -m 644 -W ${worksrcpath} \
63                ChangeLog GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT \
64                LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT NEWS README \
65                THANKS \
66                ${destroot}${prefix}/share/doc/${name}
67
68    # Workaround for python25 framework bug (#16334)
69#       move ${destroot}${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6 \
70#               ${destroot}${prefix}/lib/python2.6
71}