source: trunk/dports/aqua/qt4-mac/Portfile @ 30138

Last change on this file since 30138 was 30138, checked in by jochen@…, 13 years ago

allow build when older qt4 libraries are installed (in ${prefx}),
update sqlite variant to use system (MacPorts) sqlit3
bump revision

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