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

Last change on this file since 44214 was 44214, checked in by mcalhoun@…, 11 years ago

qt4-mac: Increase revision after r44197, r44198, r44199, r44200, r44201,
r44202, r44203, r44204, r44206, r44207, r44208, r44209, r44210, r44211,
r44212, and r44213.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.7 KB
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: Portfile 44214 2008-12-23 21:17:33Z mcalhoun@macports.org $
3
4PortSystem          1.0
5
6name                qt4-mac
7version             4.4.3
8revision            1
9categories          aqua
10platforms           macosx
11maintainers         erickt gmail.com:clubjuggler openmaintainer
12
13homepage            http://www.trolltech.com/
14description         Qt Tool Kit (Native Aqua Version)
15long_description    This is Qt, TrollTech's C++ toolkit for writing cross-platform GUI applications. \
16                    This version uses the native Aqua UI. For a X11 version, see qt4-x11.
17master_sites        ftp://ftp.trolltech.com/qt/source/ \
18                    http://wftp.tu-chemnitz.de/pub/Qt/qt/source/ \
19                    http://ftp.heanet.ie/mirrors/ftp.trolltech.com/pub/qt/source/
20distname            qt-mac-opensource-src-${version}
21checksums           \
22    md5 766c02e23d2de1b19c9a25a68297b04e \
23    sha1 00cdf6df27a590565f557a7c02ba2edc634354d1 \
24    rmd160 7c39303f7aef6a369a16e787681b78d07c59fc76
25
26depends_build       port:pkgconfig
27
28depends_lib                                \
29    port:zlib                              \
30    port:tiff                              \
31    port:libpng                            \
32    port:libmng                            \
33    port:jpeg                              \
34    port:dbus                              \
35    port:unixODBC                          \
36    port:mysql5                            \
37    port:postgresql83                      \
38    port:openssl                           \
39    port:sqlite3
40
41patchfiles          patch-compile.test.diff patch-mac.conf.diff
42
43# have to build with Apple gcc because of -fconstant-cfstrings
44# configure.compiler should therefore not be one of the MacPorts compilers
45
46# --prefix is not recognized
47configure.pre_args-delete  --prefix=${prefix}
48# -I${prefix}/include and -L${prefix}/lib must be set in ${configure.args}
49#    or else some generated Makefiles will not seem them
50configure.cppflags
51configure.ldflags
52# ensure that MacPorts compilers are used
53configure.cmd \
54    /usr/bin/sed -ibak -e \"s| gcc\\\$| \${CC}|g\" -e \"s| g++\\\$| \${CXX}|g\" ${worksrcpath}/mkspecs/common/mac-g++.conf && ${configure.cmd}
55
56set qt_dir ${prefix}/libexec/${name}
57
58# See
59#   http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html
60# for options
61#
62# -I${prefix}/include should be set in ${configure.args}, but
63#    we instead patch -isystem ${prefix}/include into the configure
64#    script to avoid conflicts with other ports (e.g. pcre).
65# See http://trac.macports.org/ticket/15219
66#
67# -dbus-linked prevends qt4 from trying to dynamically load libdbus-1,
68#     which it is not able to find in ${prefix}
69# -openssl-linked ensures that the MacPorts openssl is used
70configure.args                                                 \
71    -v                                                         \
72    -debug-and-release                                         \
73    -framework                                                 \
74    -confirm-license                                           \
75    -prefix          ${qt_dir}                                 \
76    -docdir          ${prefix}/share/doc/${name}               \
77    -examplesdir     ${prefix}/share/${name}/examples          \
78    -demosdir        ${prefix}/share/${name}/demos             \
79    -system-sqlite                                             \
80    -openssl-linked                                            \
81    -dbus-linked                                               \
82    -I${prefix}/include/mysql5/mysql                           \
83    -I${prefix}/include/postgresql83                           \
84    -L${prefix}/lib                                            \
85    -L${prefix}/lib/mysql5/mysql                               \
86    -L${prefix}/lib/postgresql83
87
88build.target        first
89use_parallel_build  yes
90
91destroot.destdir    INSTALL_ROOT="${destroot}"
92
93post-patch {
94    # configure script only accepts -I..., but we want -isystem...
95    reinplace -E "s|^I_FLAGS=\$|I_FLAGS=-isystem${prefix}/include|" \
96        ${worksrcpath}/configure
97
98    # ensure that the MacPorts odbc is used
99    reinplace "s|-liodbc|-lodbc|" \
100        ${worksrcpath}/src/plugins/sqldrivers/odbc/odbc.pro
101
102    # ensure that securesocketclient demo is built
103    reinplace "s|contains(QT_CONFIG, openssl)|contains(QT_CONFIG, openssl) \\| contains(QT_CONFIG, openssl-linked)|" \
104        examples/network/network.pro
105}
106
107post-destroot {
108    # install documentation
109    foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \
110                     GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} {
111        xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname}
112    }
113
114    # create link in ${prefix}/bin to executable files in ${qt_dir}/bin
115    foreach bin [glob -type f -directory ${destroot}${qt_dir}/bin *] {
116        ln -s ${qt_dir}/bin/[file tail ${bin}] ${destroot}${prefix}/bin
117    }
118
119    xinstall -d -m 0755 ${destroot}${applications_dir}/Qt
120    # create link in ${applications_dir}/Qt to .app directories in ${qt_dir}/bin/
121    # create link in ${prefix}/bin to all *.app/Contents/MacOS/*
122    foreach app [glob -type d -directory ${destroot}${qt_dir}/bin *.app] {
123        ln -s ${qt_dir}/bin/[file tail ${app}] ${destroot}${applications_dir}/Qt
124        foreach bin [glob -tails -type f -directory ${app}/Contents/MacOS *] {
125            ln -s ${qt_dir}/bin/[file tail ${app}]/Contents/MacOS/${bin} ${destroot}${prefix}/bin
126        }
127    }
128
129    # avoid conflict with other qt packages
130    # ensure lower case names
131    foreach bin [glob ${destroot}${prefix}/bin/*] {
132        file rename ${bin} [string tolower ${bin}]-mac
133    }
134
135    # Fix the .pc and .prl files by removing ${destroot}
136    foreach fixfile [glob -directory ${destroot}${qt_dir}/lib/pkgconfig *.pc] {
137        reinplace \
138            "s|[regsub ${prefix} ${worksrcpath} {}]/bin|[regsub ${prefix} ${qt_dir}/bin {}]|g" \
139            ${fixfile}
140    }
141    foreach fixfile [glob -nocomplain -directory ${destroot} ${qt_dir}/lib/pkgconfig/*.pc ${qt_dir}/lib/*.prl ${qt_dir}/lib/*/*.prl ${prefix}/share/${name}/demos/shared/*.prl] {
142        reinplace  \
143            "s|-L${worksrcpath}/lib|-L${qt_dir}/lib|g" \
144            ${fixfile}
145        reinplace  \
146            "s|-F${worksrcpath}/lib|-F${qt_dir}/lib|g" \
147            ${fixfile}
148    }
149
150    # Create link to Frameworks in Frameworks directory
151    xinstall -d -m 0755 ${destroot}${frameworks_dir}
152    foreach fdir [glob -tails -directory ${destroot}${qt_dir}/lib -nocomplain *.framework] {
153        ln -s ${qt_dir}/lib/${fdir} ${destroot}${frameworks_dir}
154    }
155
156    # The debug .pc files have no counterpart in qt4-x11, so set a link to them in the pkgconfig directory
157    xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
158    foreach fl [glob -tails -directory ${destroot}${qt_dir}/lib/pkgconfig *_debug.pc] {
159        ln -s ${qt_dir}/lib/pkgconfig/${fl} ${destroot}${prefix}/lib/pkgconfig/
160    }
161
162    # install select file for qt4_select
163    xinstall -m 755 -d ${destroot}${prefix}/etc/select/qt4
164    xinstall -m 644 ${filespath}/${name} ${destroot}${prefix}/etc/select/qt4/
165}
166
167variant noframework description {Do not build frameworks} {
168    configure.args-delete   -framework
169    configure.args-append   -no-framework
170}
171
172variant webkit description {Use WebKit as html rendering engine in Assistant} {
173    configure.args-append   -assistant-webkit
174}
175
176variant universal {
177    configure.universal_args-delete --disable-dependency-tracking
178    configure.args-append           -universal
179}
180
181livecheck.check     regex
182livecheck.url       http://trolltech.com/downloads/opensource/appdev/mac-os-cpp
183livecheck.regex     "qt-mac-opensource-src-(4(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.