1 | # $Id: Portfile 26932 2007-07-12 10:30:19Z jann@macports.org $ |
---|
2 | PortSystem 1.0 |
---|
3 | |
---|
4 | name qt4-mac |
---|
5 | version 4.3.1 |
---|
6 | categories aqua |
---|
7 | homepage http://www.trolltech.com/ |
---|
8 | platforms macosx |
---|
9 | maintainers dinosaur@aztecfreenet.org |
---|
10 | |
---|
11 | description Qt Tool Kit (Native Aqua Version) |
---|
12 | long_description \ |
---|
13 | This is Qt, TrollTech's C++ toolkit for writing \ |
---|
14 | cross-platform GUI applications. |
---|
15 | |
---|
16 | master_sites \ |
---|
17 | ftp://ftp.trolltech.com/qt/source/ \ |
---|
18 | http://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/source/ \ |
---|
19 | http://ftp.ntua.gr/pub/X11/Qt/qt/source/ \ |
---|
20 | http://wftp.tu-chemnitz.de/pub/Qt/qt/source/ |
---|
21 | |
---|
22 | distname qt-mac-opensource-src-${version} |
---|
23 | checksums md5 adfb4196ee569d6ff5f7c7e539a76cd2 \ |
---|
24 | sha1 efdeb87a81f5e3f7303d4a92fbb0267f196419ac \ |
---|
25 | rmd160 b9e83a4cb42b4eec9e60da3a415499b2325f2e1a |
---|
26 | |
---|
27 | depends_lib port:libmng port:libpng port:tiff |
---|
28 | |
---|
29 | # have to build with Apple gcc because of -fconstant-cfstrings |
---|
30 | configure.compiler gcc-4.0 |
---|
31 | configure.cmd "echo yes | ./configure" |
---|
32 | configure.env QMAKESPEC='' QTDIR='' DYLD_LIBRARY_PATH='' |
---|
33 | configure.pre_args |
---|
34 | configure.args \ |
---|
35 | -v \ |
---|
36 | -prefix '${prefix}' \ |
---|
37 | -docdir '${prefix}/share/doc/${portname}/html' \ |
---|
38 | -datadir '${prefix}/share/qt4' \ |
---|
39 | -headerdir '${prefix}/include/qt4' \ |
---|
40 | -plugindir '${prefix}/lib/qt4-plugins' \ |
---|
41 | -translationdir '${prefix}/share/qt4/translations' \ |
---|
42 | -release -shared -fast -stl \ |
---|
43 | -qt-gif -qt-libpng -qt-libjpeg -qt-libmng \ |
---|
44 | -qt-libtiff -optimized-qmake \ |
---|
45 | -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql \ |
---|
46 | -no-sql-sqlite -no-nis -no-cups -nomake examples \ |
---|
47 | -system-zlib -largefile -no-framework -nomake demos \ |
---|
48 | -I${prefix}/include -L${prefix}/lib |
---|
49 | |
---|
50 | build.env QMAKESPEC='' QTDIR='' DYLD_LIBRARY_PATH="${worksrcpath}/lib" |
---|
51 | #build.target symlinks src-qmake src-moc sub-src sub-tools |
---|
52 | build.target first |
---|
53 | |
---|
54 | destroot.destdir INSTALL_ROOT="${destroot}" |
---|
55 | set appPath ${destroot}/Applications/MacPorts/Qt |
---|
56 | |
---|
57 | post-destroot { |
---|
58 | xinstall -d -m 0755 ${appPath} |
---|
59 | foreach app {assistant Designer Linguist pixeltool qdbusviewer} { |
---|
60 | move ${destroot}${prefix}/bin/${app}.app \ |
---|
61 | ${appPath} |
---|
62 | } |
---|
63 | foreach doc {INSTALL LICENSE.GPL OPENSOURCE-NOTICE.TXT README} { |
---|
64 | xinstall -c -m 644 ${worksrcpath}/$doc \ |
---|
65 | ${destroot}${prefix}/share/doc/qt4-mac |
---|
66 | } |
---|
67 | if {![file exists ${destroot}${prefix}/lib/libqt.dylib]} { |
---|
68 | set majorver [strsed ${version} {s/\.[0-9]*\.[0-9]*$//}] |
---|
69 | set minorver [strsed ${version} {s/\.[0-9]*$//}] |
---|
70 | system "cd ${destroot}${prefix}/lib && |
---|
71 | ln -s libqt-mt.${version}.dylib libqt.dylib && |
---|
72 | ln -s libqt-mt.${version}.dylib libqt.${majorver}.dylib && |
---|
73 | ln -s libqt-mt.${version}.dylib libqt.${minorver}.dylib" |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | variant mysql { |
---|
78 | depends_lib-append lib:libmysqlclient.12:mysql4 |
---|
79 | configure.args-delete -no-sql-mysql |
---|
80 | configure.args-append -qt-sql-mysql \ |
---|
81 | -L${prefix}/lib/mysql \ |
---|
82 | -I${prefix}/include/mysql \ |
---|
83 | -plugin-sql-mysql |
---|
84 | } |
---|
85 | variant ipv6 { |
---|
86 | configure.args-delete -no-ipv6 |
---|
87 | configure.args-append -ipv6 |
---|
88 | } |
---|
89 | variant framework { |
---|
90 | configure.args-delete -no-framework |
---|
91 | configure.args-append -framework |
---|
92 | post-destroot { |
---|
93 | # move the stuff that doesn't belong into /Library/Frameworks into ${prefix}/lib |
---|
94 | foreach f {libQtUiTools.a libQtUiTools.prl libQtUiTools_debug.a libQtUiTools_debug.prl pkgconfig Qt3Support.la QtCore.la QtDBus.la QtGui.la QtNetwork.la QtOpenGL.la QtScript.la QtSql.la QtSvg.la QtTest.la QtXml.la} { |
---|
95 | move ${destroot}/Library/Frameworks/$f ${destroot}${prefix}/lib |
---|
96 | } |
---|
97 | } |
---|
98 | } |
---|
99 | variant examples { |
---|
100 | configure.args-delete -nomake examples |
---|
101 | configure.args-append -make examples |
---|
102 | } |
---|
103 | variant demos { |
---|
104 | configure.args-delete -nomake demos |
---|
105 | configure.args-append -make demos |
---|
106 | post-destroot { |
---|
107 | move ${destroot}${prefix}/demos ${appPath} |
---|
108 | move ${destroot}${prefix}/bin/qtdemo.app ${appPath} |
---|
109 | } |
---|
110 | } |
---|