source: trunk/dports/x11/qt3/Portfile

Last change on this file was 141619, checked in by ryandesign@…, 21 months ago

qt3: add libGLU dependency (#49382)

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