source: trunk/dports/aqua/qt4-kde/Portfile @ 61377

Last change on this file since 61377 was 61377, checked in by jmr@…, 10 years ago

jpeg: update to version 7, rev bump dependents (#20193)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.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 61377 2009-12-09 23:32:32Z jmr@macports.org $
3
4PortSystem          1.0
5
6name                qt4-kde
7version             4.5.2
8revision            1
9categories          aqua
10platforms           macosx
11maintainers         nomaintainer
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.qt.nokia.com/qt/source/
18distname            qt-mac-opensource-src-${version}
19checksums           md5     c549d6c0c2e0723377cb955c78a1b680 \
20                    sha1    61b45db17962b48c338628d58c0445c9f544d5e6 \
21                    rmd160  53c752de43aa0623f005ca1c5a12810acc1da013
22
23depends_build       port:pkgconfig
24
25depends_lib                                \
26    port:zlib                              \
27    port:tiff                              \
28    port:libpng                            \
29    port:libmng                            \
30    port:jpeg                              \
31    port:dbus                              \
32    port:unixODBC                          \
33    path:lib/mysql5:mysql5                 \
34    port:postgresql83                      \
35    port:openssl                           \
36    port:sqlite3
37
38patchfiles          patch-compile.test.diff patch-mac.conf.diff patch-configure.diff
39
40# have to build with Apple gcc because of -fconstant-cfstrings
41# configure.compiler should therefore not be one of the MacPorts compilers
42
43# --prefix is not recognized
44configure.pre_args-delete  --prefix=${prefix}
45# -I${prefix}/include and -L${prefix}/lib must be set in ${configure.args}
46#    or else some generated Makefiles will not seem them
47configure.cppflags
48configure.ldflags
49
50set qt_dir ${prefix}/libexec/${name}
51
52# See
53#   http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html
54# for options
55#
56# -isystem is used instead of -I to avoid conflicts with other ports (e.g. pcre).
57#  See http://trac.macports.org/ticket/15219 and http://trac.macports.org/ticket/18723.
58#
59# -dbus-linked prevends qt4 from trying to dynamically load libdbus-1,
60#     which it is not able to find in ${prefix}
61# -openssl-linked ensures that the MacPorts openssl is used
62configure.args                                                 \
63    -v                                                         \
64    -debug-and-release                                         \
65    -framework                                                 \
66    -confirm-license                                           \
67    -opensource                                           \
68    -prefix          ${qt_dir}                                 \
69    -docdir          ${prefix}/share/doc/${name}               \
70    -examplesdir     ${prefix}/share/${name}/examples          \
71    -demosdir        ${prefix}/share/${name}/demos             \
72    -system-sqlite                                             \
73    -openssl-linked                                            \
74    -dbus-linked                                               \
75    -isystem${prefix}/include                                  \
76    -isystem${prefix}/include/mysql5/mysql                     \
77    -isystem${prefix}/include/postgresql83                     \
78    -L${prefix}/lib                                            \
79    -L${prefix}/lib/mysql5/mysql                               \
80    -L${prefix}/lib/postgresql83
81
82build.target        first
83use_parallel_build  yes
84
85destroot.destdir    INSTALL_ROOT="${destroot}"
86
87post-patch {
88    # ensure that the MacPorts odbc is used
89    reinplace "s|-liodbc|-lodbc|" \
90        ${worksrcpath}/src/plugins/sqldrivers/odbc/odbc.pro
91
92    # ensure that securesocketclient demo is built
93    reinplace "s|contains(QT_CONFIG, openssl)|contains(QT_CONFIG, openssl) \\| contains(QT_CONFIG, openssl-linked)|" \
94        ${worksrcpath}/examples/network/network.pro
95
96    # ensure that MacPorts compilers are used
97    reinplace "s| gcc\$| ${configure.cc}|" ${worksrcpath}/mkspecs/common/mac-g++.conf
98    reinplace "s| g++\$| ${configure.cxx}|" ${worksrcpath}/mkspecs/common/mac-g++.conf
99}
100
101post-destroot {
102    # install documentation
103    foreach doc {INSTALL FAQ.txt LICENSE.LGPL LICENSE.GPL3 README \
104                     LGPL_EXCEPTION.TXT} {
105        xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${name}
106    }
107
108    # create link in ${prefix}/bin to executable files in ${qt_dir}/bin
109    foreach bin [glob -type f -directory ${destroot}${qt_dir}/bin *] {
110        ln -s ${qt_dir}/bin/[file tail ${bin}] ${destroot}${prefix}/bin
111    }
112
113    xinstall -d -m 0755 ${destroot}${applications_dir}/Qt
114    # create link in ${prefix}/bin to all *.app/Contents/MacOS/*
115    foreach app [glob -type d -directory ${destroot}${qt_dir}/bin *.app] {
116        foreach bin [glob -tails -type f -directory ${app}/Contents/MacOS *] {
117            ln -s ${qt_dir}/bin/[file tail ${app}]/Contents/MacOS/${bin} ${destroot}${prefix}/bin
118        }
119    }
120
121    # avoid conflict with other qt packages
122    # ensure lower case names
123    foreach bin [glob ${destroot}${prefix}/bin/*] {
124        file rename ${bin} ${destroot}${prefix}/bin/[string tolower [file tail ${bin}]]-kde
125    }
126
127    # Fix the .pc and .prl files by removing ${destroot}
128    foreach fixfile [glob -directory ${destroot}${qt_dir}/lib/pkgconfig *.pc] {
129        reinplace \
130            "s|[regsub ${prefix} ${worksrcpath} {}]/bin|[regsub ${prefix} ${qt_dir}/bin {}]|g" \
131            ${fixfile}
132    }
133    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] {
134        reinplace  \
135            "s|-L${worksrcpath}/lib|-L${qt_dir}/lib|g" \
136            ${fixfile}
137        reinplace  \
138            "s|-F${worksrcpath}/lib|-F${qt_dir}/lib|g" \
139            ${fixfile}
140    }
141
142    # install select file for qt4_select
143    xinstall -m 755 -d ${destroot}${prefix}/etc/select/qt4
144    xinstall -m 644 ${filespath}/${name} ${destroot}${prefix}/etc/select/qt4/
145}
146
147variant noframework description {Do not build frameworks} {
148    configure.args-delete   -framework
149    configure.args-append   -no-framework
150}
151
152variant webkit description {Use WebKit as html rendering engine in Assistant} {
153    configure.args-append   -assistant-webkit
154}
155
156variant universal {
157    configure.universal_args-delete --disable-dependency-tracking
158    configure.args-append           -universal
159}
160
161livecheck.type      regex
162livecheck.url       ftp://ftp.qt.nokia.com/qt/source/
163livecheck.regex     "qt-mac-opensource-src-(4(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.