Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

root/trunk/dports/aqua/qt4-mac/Portfile

Revision 41375, 7.7 KB (checked in by toby@…, 5 weeks ago)

remove mirrors: ftp.iasi.roedu.net doesn't work, ftp.ntua.gr is slow
add ftp.heanet.ie mirror

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                qt4-mac
7version             4.4.3
8categories          aqua
9platforms           macosx
10maintainers         erickt clubjuggler@gmail.com openmaintainer
11
12homepage            http://www.trolltech.com/
13description         Qt Tool Kit (Native Aqua Version)
14long_description    This is Qt, TrollTech's C++ toolkit for writing cross-platform GUI applications. \
15                    This version uses the native Aqua UI. For a X11 version, see qt4-x11.
16master_sites        ftp://ftp.trolltech.com/qt/source/ \
17                    http://wftp.tu-chemnitz.de/pub/Qt/qt/source/ \
18                    http://ftp.heanet.ie/mirrors/ftp.trolltech.com/pub/qt/source/
19distname            qt-mac-opensource-src-${version}
20checksums           md5 766c02e23d2de1b19c9a25a68297b04e \
21                    sha1 00cdf6df27a590565f557a7c02ba2edc634354d1 \
22                    rmd160 7c39303f7aef6a369a16e787681b78d07c59fc76
23
24depends_lib         port:libmng port:libpng port:jpeg port:tiff
25
26patchfiles          patch-mac.conf.diff
27
28# have to build with Apple gcc because of -fconstant-cfstrings
29configure.compiler  gcc-4.0
30configure.cmd       "CFLAGS=-isystem${prefix}/include CXXFLAGS=-isystem${prefix}/include ./configure"
31configure.pre_args
32
33# directory for .app and executable files
34# Once installed, they should not be moved so they can find each other
35# (e.g. assistant.app) and the examples directory
36set bindir ${prefix}/libexec/${name}/bin
37set frameworkdir ${prefix}/Library/Frameworks
38
39# Can be removed once MacPorts 1.7.0 is released
40if {![info exists applications_dir]} {
41    set applications_dir /Applications/MacPorts
42}
43
44# See
45#   http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html
46# for options
47configure.args \
48    -v         \
49    -confirm-license \
50    -prefix         '${prefix}'                            \
51    -bindir         '${bindir}'                            \
52    -docdir         '${prefix}/share/doc/${portname}'      \
53    -datadir        '${prefix}/share/${portname}'          \
54    -headerdir      '${prefix}/include/${portname}'        \
55    -plugindir      '${prefix}/lib/${portname}-plugins'    \
56    -translationdir '${prefix}/share/${portname}/translations' \
57    -optimized-qmake    -debug-and-release        -shared         -stl      \
58    -no-openssl         -largefile                                          \
59    -system-libpng      -system-libjpeg -system-libmng  -system-libtiff     \
60    -system-zlib        -qt-gif                                             \
61    -no-sql-ibase       -no-sql-mysql   -no-sql-odbc    -no-sql-psql        \
62    -no-sql-sqlite      -no-nis         -no-cups                            \
63    -framework          -libdir '${frameworkdir}'                           \
64    -make libs          -make tools                                         \
65    -I${worksrcpath}/include \
66    -L${worksrcpath}/lib -L${prefix}/lib
67
68    # Take care of this with the CXXFLAGS=-isystem${prefix}/include
69    # this puts the include at the end so that qt's include files are found first.
70    # -I${prefix}/include
71    # not made by default, anyway: -nomake demos -nomake examples
72
73build.target        first
74use_parallel_build  yes
75
76destroot.destdir    INSTALL_ROOT="${destroot}"
77
78post-destroot {
79    xinstall -d -m 0755 ${destroot}${bindir}
80    xinstall -d -m 0755 ${destroot}${applications_dir}/Qt
81    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${portname}
82
83    # create link in ${prefix}/bin to executable files in ${bindir}
84    foreach bin [glob -type f -directory ${destroot}${bindir} *] {
85        system "ln -s ${bindir}/[file tail ${bin}] ${destroot}${prefix}/bin"
86    }
87
88    # create link in ${applications_dir}/Qt to .app directories in ${bindir}
89    # create link in ${prefix}/bin to all *.app/Contents/MacOS/*
90    foreach app [glob -type d -directory ${destroot}${bindir} *.app] {
91        system "ln -s ${bindir}/[file tail ${app}] ${destroot}${applications_dir}/Qt"
92        foreach bin [glob -type f -directory ${app} Contents/MacOS/*] {
93            system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/[file tail ${bin}] ${destroot}${prefix}/bin"
94        }
95    }
96
97    # fix id of plugins shared libraries
98    foreach dirFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins -type d -nocomplain *] {
99        set dir [file tail ${dirFull}]
100        foreach libFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins/${dir} -nocomplain *.dylib] {
101            set lib [file tail ${libFull}]
102            system "install_name_tool -id ${prefix}/lib/${portname}-plugins/${dir}/${lib} ${libFull}"
103        }
104    }
105
106    # Put pkgconfig directory in correct place (Fix Ticket #15353)
107    system "mv ${destroot}${frameworkdir}/pkgconfig ${destroot}/${prefix}/lib/"
108
109    # install documentation
110    foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \
111                 GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} {
112        xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname}
113    }
114}
115
116default_variants +docs +dbus
117
118variant dbus description "Include DBus support" {
119    depends_lib-append      port:dbus
120    configure.args-append   -dbus-linked
121}
122
123variant noframework description "Do not build frameworks" {
124    configure.args-delete   -framework -libdir '${frameworkdir}'
125    configure.args-append   -no-framework
126}
127
128variant nis description "Include Network Information Service (NIS) support" {
129    configure.args-delete   -no-nis
130    configure.args-append   -nis
131}
132
133variant cups description "Include Common Unix Printing System (CUPS) support" {
134    configure.args-delete   -no-cups
135    configure.args-append   -cups
136}
137
138variant mysql4 conflicts mysql5 description "Include support for SQL via mysql4 driver" {
139    depends_lib-append      lib:libmysqlclient.12:mysql4
140    configure.args-delete   -no-sql-mysql
141    configure.args-append   -qt-sql-mysql -plugin-sql-mysql \
142                            -I${prefix}/include/mysql -L${prefix}/lib/mysql
143}
144
145variant mysql5 conflicts mysql4 description "Include support for SQL via mysql5 driver" {
146    depends_lib-append      lib:libmysqlclient.15:mysql5
147    configure.args-delete   -no-sql-mysql
148    configure.args-append   -qt-sql-mysql -plugin-sql-mysql \
149                            -I${prefix}/include/mysql5/mysql -L${prefix}/lib/mysql5/mysql
150}
151
152variant psql description "Include support for SQL via postgresql driver" {
153    depends_lib-append      port:postgresql83
154        configure.args-delete   -no-sql-psql
155        configure.args-append   -qt-sql-psql -plugin-sql-psql \
156                            -I${prefix}/include/postgresql83 -L${prefix}/lib/postgresql83
157}
158
159variant sqlite description "Include support for SQL via sqlite driver" {
160        configure.args-delete   -no-sql-sqlite
161        configure.args-append   -qt-sql-sqlite -plugin-sql-sqlite
162}
163
164variant ssl description "Include OpenSSL support" {
165    depends_lib-append      port:openssl
166    configure.args-delete   -no-openssl
167    configure.args-append   -openssl
168}
169
170variant examples description "Build Qt examples" {
171    # configure.args-delete   "-nomake examples"
172    configure.args-append   -make examples -examplesdir ${prefix}/share/${portname}/examples
173}
174
175variant demos description "Build Qt demos" {
176    # configure.args-delete   "-nomake demos"
177    configure.args-append   -make demos -demosdir ${prefix}/share/${portname}/demos
178}
179
180variant docs description "Include Qt Documentation" {
181    configure.args-append   -make docs
182}
183
184
185livecheck.check     regex
186livecheck.url       http://trolltech.com/developer/downloads/qt/mac
187livecheck.regex     "The current version of Qt/Mac Open Source Edition is (4(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the browser.