source: trunk/dports/x11/qt3/Portfile @ 20152

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

Fix a broken build when FTP access is not allowed by adding an HTTP
mirror of ftp://ftp.trolltech.com/qt/source/. This mirror is listed
at http://www.trolltech.com/developer/downloads/qt/x11.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.9 KB
Line 
1# $Id: Portfile 20152 2006-10-26 01:09:46Z blair@macports.org $
2
3#Synced with Fink, Version 3.3.6-1023
4
5PortSystem 1.0
6name            qt3
7version         3.3.7
8categories      x11
9maintainers     ben@macports.org takanori@macports.org
10description     Qt Tool Kit
11long_description Qt 3 is a multiplatform C++ application development framework.
12homepage        http://www.trolltech.com/products/qt/index.html
13platforms       darwin
14master_sites    ftp://ftp.trolltech.com/qt/source/:qt3 \
15                http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/:qt3 \
16                http://ranger.befunk.com/fink/:fink
17distname        qt-x11-free-${portversion}
18distfiles       ${distname}.tar.bz2:qt3 \
19                qt-upstream-patches-0003.tar.bz2:fink
20use_bzip2       yes
21
22depends_lib     lib:libGL.1:XFree86 \
23                port:freetype \
24                port:jpeg \
25                port:libpng \
26                port:perl5.8 \
27                port:Xft2 \
28                port:xrender \
29                port:zlib
30
31checksums       ${distname}.tar.bz2 md5 655e21cf6a7e66daf8ec6ceda81aae1e \
32                qt-upstream-patches-0003.tar.bz2 md5 cfe0cc6a7a8411bce151ebfaaa7e03e7
33
34patchfiles      qt3-tiger.patch dp01.patch
35patch   {
36                foreach p ${patchfiles} { system "cd ${worksrcpath} && sed -e 's|@PREFIX@|${prefix}|g' < ${portpath}/${filesdir}/${p} | patch -p1" }
37                #system "perl -pi -e 's|cp \-P|/bin/cp \-RL|' ${worksrcpath}/qmake/Makefile.unix"
38
39                foreach p { patches/qt-3.3.4-print-CJK.patch \
40                            patches/qt-3.0.5-nodebug.patch \
41                            patches/qt-x11-free-3.3.2-quiet.patch \
42                            patches/qt-uic-nostdlib.patch \
43                            patches/qt-x11-free-3.3.5-uic.patch \
44                            patches/qt-x11-free-3.3.4-qfontdatabase_x11.patch \
45                            patches/qt-3.3.3-gtkstyle.patch \
46                            patches/qt-x11-free-3.3.4-fullscreen.patch } {
47                                system "cd ${worksrcpath} && patch -p1 --fuzz=4 < ${workpath}/${p}"
48                }
49                foreach p { patches/0001-dnd_optimization.patch \
50                            patches/0002-dnd_active_window_fix.patch \
51                            patches/0005-qpixmap_mitshm.patch \
52                            patches/0007-qpixmap_constants.patch \
53                            patches/0015-qiconview-finditem.patch \
54                            patches/0016-qiconview-rebuildcontainer.patch \
55                            patches/0017-qiconview-ctrl_rubber.patch \
56                            patches/0020-designer-deletetabs.patch \
57                            patches/0032-fix_rotated_randr.diff \
58                            patches/0035-qvaluelist-streaming-operator.patch \
59                            patches/0036-qprogressbar-optimization.patch \
60                            patches/0038-dragobject-dont-prefer-unknown.patch \
61                            patches/0044-qscrollview-windowactivate-fix.diff \
62                            patches/0046-qiconview-no-useless-scrollbar.diff \
63                            patches/0047-fix-kmenu-width.diff \
64                            patches/0048-qclipboard_hack_80072.patch \
65                            patches/0049-qiconview-rubber_on_move.diff \
66                            patches/0056-khotkeys_input_84434.patch \
67                            patches/0059-qpopup_has_mouse.patch \
68                            patches/0060-qpopup_ignore_mousepos.patch \
69                            patches/0061-qscrollview-propagate-horizontal-wheelevent.patch \
70                            patches/0069-fix-minsize.patch } {
71                                system "cd ${worksrcpath} && patch -p0 --fuzz=4 < ${workpath}/${p}"
72                }
73}
74
75post-patch      {
76                foreach file {CompileScript.sh InstallScript.sh} {
77                    file copy ${portpath}/${filesdir}/${file} ${worksrcpath}
78                    reinplace "s|%p|${prefix}|g" ${worksrcpath}/${file}
79                    reinplace "s|%N|${name}|g" ${worksrcpath}/${file}
80                    reinplace "s|%n|${name}|g" ${worksrcpath}/${file}
81                    reinplace "s|%v|${version}|g" ${worksrcpath}/${file}
82                    reinplace "s|%r|${revision}|g" ${worksrcpath}/${file}
83                    reinplace "s|%c|${configure.args}|g" ${worksrcpath}/${file}
84                    reinplace "s|%d|${destroot}|g" ${worksrcpath}/${file}
85                    reinplace "s|%i|${destroot}${prefix}|g" ${worksrcpath}/${file}
86                    file attributes ${worksrcpath}/${file} -permissions 0755
87                }
88}
89
90configure.args  -fast -buildkey qt3-jaguar \
91                -platform darwin-g++ -xplatform darwin-g++ \
92                -prefix '${prefix}/lib/qt3' -docdir '${prefix}/share/doc/qt3' \
93                -headerdir '${prefix}/include/qt3' -libdir '${prefix}/lib' \
94                -release -shared -no-exceptions -thread -cups -stl \
95                -qt-gif -plugin-imgfmt-png -plugin-imgfmt-jpeg -plugin-imgfmt-mng \
96                -system-libpng -system-libjpeg -system-zlib -largefile \
97                -sm -xinerama -xrender -xft -xkb \
98                -plugin-sql-sqlite -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql
99
100configure       {
101                if {[file exists ${prefix}/bin/cups-config]} {
102                        ui_msg "port:cups-headers may prevent building this port."
103                        ui_msg "Please uninstall (or deactivate) cups-headers and restart the build."
104                        exit 1
105                }
106}
107
108#workaround for upgrade problem.
109pre-build       {if {[file exists ${prefix}/lib/libqassistantclient.a]} { system "ranlib ${prefix}/lib/libqassistantclient.a" }}
110
111build           { system "cd ${worksrcpath} && ./CompileScript.sh" }
112destroot        { system "cd ${worksrcpath} && ./InstallScript.sh" }
113
114post-destroot   {
115                xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
116                foreach f {FAQ INSTALL LICENSE* MANIFEST PLATFORMS README* changes*} {
117                        eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
118                }
119                foreach f {bin/findtr bin/qt20fix bin/qtrename140} {
120                        reinplace "s|#!/usr|#!${prefix}|" ${worksrcpath}/${f}
121                        xinstall -m 755 ${worksrcpath}/${f} ${destroot}${prefix}/share/doc/${name}
122                }
123}
124
125post-activate   {
126                system "ranlib ${prefix}/lib/libqassistantclient.a"
127
128                ui_msg "\nBefore using qt3 (qmake),"
129                ui_msg "please make sure to set environment variable QTDIR.\n"
130                ui_msg "  QTDIR=${prefix}/lib/qt3; export QTDIR\n"
131}
132
133platform darwin 9 {}
134
135platform darwin 8 {}
136
137platform darwin 7 {
138                patchfiles-delete qt3-tiger.patch
139                patchfiles-append qt3-panther.patch
140}
141
142platform darwin 6 {
143                ui_msg "Sorry, your platform is no longer supported."
144                exit 1
145}
146
147variant mysql {
148                depends_lib-append lib:libmysqlclient.10:mysql
149                configure.args-delete -no-sql-mysql
150                configure.args-append -qt-sql-mysql -L${prefix}/lib/mysql \
151                        -I${prefix}/include/mysql -plugin-sql-mysql
152}
153
154variant odbc {
155                depends_lib-append lib:libodbc.1:unixODBC
156                configure.args-delete -no-sql-odbc
157                configure.args-append -qt-sql-odbc -L${prefix}/lib \
158                        -I${prefix}/include -plugin-sql-odbc
159}
160
161variant psql {
162                depends_lib-append lib:libpq.2:postgresql
163                configure.args-delete -no-sql-psql
164                configure.args-append -qt-sql-psql -plugin-sql-psql
165}
Note: See TracBrowser for help on using the repository browser.