source: trunk/dports/x11/qt3/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: 8.0 KB
Line 
1# $Id: Portfile 61377 2009-12-09 23:32:32Z jmr@macports.org $
2
3#Synced with Fink, revision 1.25
4
5PortSystem      1.0
6name            qt3
7version         3.3.8
8revision        8
9categories      x11
10maintainers     nomaintainer
11description     Qt Tool Kit
12long_description \
13                Qt 3 is a multiplatform C++ application development framework.
14homepage        http://www.trolltech.com/products/qt/index.html
15platforms       darwin
16master_sites    trolltech::qt3 \
17                http://ranger.befunk.com/fink/:fink
18distname        qt-x11-free-${version}
19distfiles       ${distname}.tar.bz2:qt3 \
20                qt-upstream-patches-0004.tar.bz2:fink
21use_bzip2       yes
22checksums       ${distname}.tar.bz2              md5 cf3c43a7dfde5bfb76f8001102fe6e85 \
23                qt-upstream-patches-0004.tar.bz2 md5 1f27d5222813a0a29fe53fd8669e2239
24
25depends_lib     port:mesa \
26                port:jpeg \
27                port:libpng \
28                path:bin/perl:perl5 \
29                port:Xft2 \
30                port:xrender \
31                port:xorg-libXcursor \
32                port:xorg-libXinerama \
33                port:xorg-libXrandr \
34                port:zlib
35
36post-extract {
37    eval copy [glob ${filespath}/qt-copy/*] ${workpath}/patches/
38}
39
40patchfiles      qt3-tiger.patch dp01.patch macports-x11.patch
41patch {
42    foreach p ${patchfiles} {
43        system "cd ${worksrcpath} && sed -e 's|@PREFIX@|${prefix}|g' < ${portpath}/${filesdir}/${p} | patch -p1"
44    }
45    #system "perl -pi -e 's|cp \-P|/bin/cp \-RL|' ${worksrcpath}/qmake/Makefile.unix"
46
47    foreach p { patches/qt-3.3.4-print-CJK.patch \
48                patches/qt-3.0.5-nodebug.patch \
49                patches/qt-x11-free-3.3.2-quiet.patch \
50                patches/qt-uic-nostdlib.patch \
51                patches/qt-x11-free-3.3.5-uic.patch \
52                patches/qt-x11-free-3.3.4-qfontdatabase_x11.patch \
53                patches/qt-3.3.3-gtkstyle.patch \
54                patches/qt-x11-free-3.3.4-fullscreen.patch } {
55                    system "cd ${worksrcpath} && patch -p1 --fuzz=4 < ${workpath}/${p}"
56    }
57    foreach p { patches/0001-dnd_optimization.patch \
58                patches/0002-dnd_active_window_fix.patch \
59                patches/0005-qpixmap_mitshm.patch \
60                patches/0007-qpixmap_constants.patch \
61                patches/0015-qiconview-finditem.patch \
62                patches/0016-qiconview-rebuildcontainer.patch \
63                patches/0017-qiconview-ctrl_rubber.patch \
64                patches/0020-designer-deletetabs.patch \
65                patches/0032-fix_rotated_randr.diff \
66                patches/0035-qvaluelist-streaming-operator.patch \
67                patches/0036-qprogressbar-optimization.patch \
68                patches/0038-dragobject-dont-prefer-unknown.patch \
69                patches/0044-qscrollview-windowactivate-fix.diff \
70                patches/0046-qiconview-no-useless-scrollbar.diff \
71                patches/0047-fix-kmenu-width.diff \
72                patches/0048-qclipboard_hack_80072.patch \
73                patches/0049-qiconview-rubber_on_move.diff \
74                patches/0056-khotkeys_input_84434.patch \
75                patches/0059-qpopup_has_mouse.patch \
76                patches/0060-qpopup_ignore_mousepos.patch \
77                patches/0061-qscrollview-propagate-horizontal-wheelevent.patch \
78                patches/0073-xinerama-aware-qpopup.patch \
79                patches/0076-fix-qprocess.diff \
80                patches/0077-utf8-decoder-fixes.diff
81                patches/0078-argb-visual-hack.patch
82                patches/0079-compositing-types.patch
83                patches/0080-net-wm-sync-request.patch
84                patches/0082-fix-qdatetime-fromstring.diff
85                patches/0083-CVE-2007-4137.diff
86                patches/0084-compositing-properties.patch
87                patches/0085-fix-buildkey.diff
88                patches/0086-revert-qt-khmer-fix.diff
89                patches/0087-use-xrandr-1.2.diff
90                patches/0088-fix-xinput-clash.diff} {
91                    system "cd ${worksrcpath} && patch -p0 --fuzz=4 < ${workpath}/${p}"
92    }
93}
94
95post-patch {
96    foreach file {CompileScript.sh InstallScript.sh} {
97        copy ${portpath}/${filesdir}/${file} ${worksrcpath}
98        reinplace "s|%p|${prefix}|g" ${worksrcpath}/${file}
99        reinplace "s|%N|${name}|g" ${worksrcpath}/${file}
100        reinplace "s|%n|${name}|g" ${worksrcpath}/${file}
101        reinplace "s|%v|${version}|g" ${worksrcpath}/${file}
102        reinplace "s|%r|${revision}|g" ${worksrcpath}/${file}
103        reinplace "s|%c|${configure.args}|g" ${worksrcpath}/${file}
104        reinplace "s|%d|${destroot}|g" ${worksrcpath}/${file}
105        reinplace "s|%i|${destroot}${prefix}|g" ${worksrcpath}/${file}
106        reinplace "s|__MAKE__|${build.cmd}|g" ${worksrcpath}/${file}
107        file attributes ${worksrcpath}/${file} -permissions 0755
108    }
109}
110
111configure.args  -buildkey qt3-jaguar \
112                -platform darwin-g++ -xplatform darwin-g++ \
113                -prefix '${prefix}/lib/qt3' -docdir '${prefix}/share/doc/qt3' \
114                -headerdir '${prefix}/include/qt3' -libdir '${prefix}/lib' \
115                -release -shared -no-exceptions -thread -cups -stl \
116                -qt-gif -plugin-imgfmt-png -plugin-imgfmt-jpeg -plugin-imgfmt-mng \
117                -system-libpng -system-libjpeg -system-zlib -largefile \
118                -sm -xinerama -xrender -xft -xkb \
119                -plugin-sql-sqlite -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql
120
121use_configure       no
122
123#workaround for upgrade problem.
124pre-build {
125    if {[file exists ${prefix}/lib/libqassistantclient.a]} {
126        system "ranlib ${prefix}/lib/libqassistantclient.a"
127    }
128}
129
130use_parallel_build  yes
131build {
132    system "cd ${worksrcpath} && ./CompileScript.sh"
133}
134
135destroot {
136    system "cd ${worksrcpath} && ./InstallScript.sh"
137}
138post-destroot {
139    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
140    foreach f {FAQ INSTALL LICENSE* MANIFEST PLATFORMS README* changes*} {
141        eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
142    }
143    foreach f {bin/findtr bin/qt20fix bin/qtrename140} {
144        reinplace "s|#!/usr|#!${prefix}|" ${worksrcpath}/${f}
145        xinstall -m 755 ${worksrcpath}/${f} ${destroot}${prefix}/share/doc/${name}
146    }
147}
148
149post-activate {
150    system "ranlib ${prefix}/lib/libqassistantclient.a"
151
152    ui_msg "\nBefore using qt3 (qmake),"
153    ui_msg "please make sure to set environment variable QTDIR.\n"
154    ui_msg "  QTDIR=${prefix}/lib/qt3; export QTDIR\n"
155}
156
157universal_variant   no
158
159variant mysql description {Enable MySQL 5 SQL Driver} {
160    depends_lib-append      path:lib/mysql5:mysql5
161    configure.args-delete   -no-sql-mysql
162    configure.args-append   -qt-sql-mysql \
163                            -L${prefix}/lib/mysql5/mysql \
164                            -I${prefix}/include/mysql5/mysql \
165                            -plugin-sql-mysql
166}
167
168variant odbc description {Enable unixODBC SQL Driver} {
169    depends_lib-append      port:unixODBC
170    configure.args-delete   -no-sql-odbc
171    configure.args-append   -qt-sql-odbc \
172                            -plugin-sql-odbc
173}
174
175variant psql description {Enable PostgreSQL 8.3 SQL Driver} {
176    depends_lib-append      port:postgresql83
177    configure.args-delete   -no-sql-psql
178    configure.args-append   -qt-sql-psql \
179                            -L${prefix}/lib/postgresql83 \
180                            -I${prefix}/include/postgresql83 \
181                            -I${prefix}/include/postgresql83/server \
182                            -plugin-sql-psql
183}
184
185platform darwin 10 {
186    pre-patch {
187        if {${configure.build_arch} == "x86_64"} {
188            patchfiles-append   x86_64/patch-mkspecs_darwin-g++_qmake.conf.diff
189        }
190    }
191    post-patch {
192        if {${configure.build_arch} == "x86_64"} {
193            system "perl -pi -e \"s,\\(int\\)owner\\, \\(int\\),\\(long\\)owner\\, \\(long\\),g\" ${worksrcpath}/src/tools/qmutex_unix.cpp"
194        }
195    }
196}
197
198livecheck.type  regex
199livecheck.url   http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/
200livecheck.regex {qt-x11-free-(\d+(?:\.\d+)*)}
Note: See TracBrowser for help on using the repository browser.