Ticket #16862: Portfile.diff
File Portfile.diff, 10.1 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 16 years ago) |
---|
-
Portfile
old new 5 5 6 6 name qt4-mac 7 7 version 4.4.3 8 revision 1 8 9 categories aqua 9 10 platforms macosx 10 maintainers erickt clubjuggler@gmail.comopenmaintainer11 maintainers erickt gmail.com:clubjuggler openmaintainer 11 12 12 13 homepage http://www.trolltech.com/ 13 14 description Qt Tool Kit (Native Aqua Version) … … 22 23 sha1 00cdf6df27a590565f557a7c02ba2edc634354d1 \ 23 24 rmd160 7c39303f7aef6a369a16e787681b78d07c59fc76 24 25 25 depends_lib port:libmng port:libpng port:jpeg port:tiff 26 depends_lib port:libmng port:libpng port:jpeg port:tiff port:libiconv 26 27 27 patchfiles patch-mac.conf.diff 28 patchfiles patch-mac.conf.diff patch-compile.test.diff 29 30 post-patch { 31 reinplace -E "s|^I_FLAGS=\$|I_FLAGS=-isystem${prefix}/include|" \ 32 ${worksrcpath}/configure 33 } 28 34 29 35 # have to build with Apple gcc because of -fconstant-cfstrings 30 configure.compiler gcc-4.031 configure.cmd "CFLAGS=-isystem${prefix}/include CXXFLAGS=-isystem${prefix}/include ./configure"32 36 configure.pre_args 33 37 34 38 # directory for .app and executable files 35 39 # Once installed, they should not be moved so they can find each other 36 40 # (e.g. assistant.app) and the examples directory 37 41 set bindir ${prefix}/libexec/${name}/bin 38 set frameworkdir ${prefix}/Library/Frameworks39 42 40 43 # Can be removed once MacPorts 1.7.0 is released 41 44 if {![info exists applications_dir]} { 42 45 set applications_dir /Applications/MacPorts 43 46 } 47 if {![info exists frameworks_dir]} { 48 set frameworks_dir ${prefix}/Library/Frameworks 49 } 50 51 # Location of .a and .dylib files 52 set libdir ${frameworks_dir} 44 53 45 54 # See 46 55 # http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html … … 61 70 -system-zlib -qt-gif \ 62 71 -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql \ 63 72 -no-sql-sqlite -no-nis -no-cups \ 64 -framework -libdir '${framework dir}'\73 -framework -libdir '${frameworks_dir}' \ 65 74 -make libs -make tools \ 66 -I${worksrcpath}/include \ 67 -L${worksrcpath}/lib -L${prefix}/lib 75 -L${prefix}/lib 68 76 69 # Take care of this with the CXXFLAGS=-isystem${prefix}/include 70 # this puts the include at the end so that qt's include files are found first. 71 # -I${prefix}/include 72 # not made by default, anyway: -nomake demos -nomake examples 77 # default: -nomake demos -nomake examples 78 # default: -iconv -svg -webkit -phonon -phonon-backend -xmlpatterns 79 # default: -no-assistant-webkit 73 80 74 81 build.target first 75 82 use_parallel_build yes 76 83 77 84 destroot.destdir INSTALL_ROOT="${destroot}" 78 85 86 post-configure { 87 reinplace "s|gcc|${configure.cc}|g" \ 88 ${worksrcpath}/mkspecs/common/mac-g++.conf 89 reinplace "s|g++|${configure.cxx}|g" \ 90 ${worksrcpath}/mkspecs/common/mac-g++.conf 91 } 92 79 93 post-destroot { 80 xinstall -d -m 0755 ${destroot}${bindir}81 94 xinstall -d -m 0755 ${destroot}${applications_dir}/Qt 82 xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${portname} 95 96 # If we want to avoid conflict with qt4-x11, append -mac to all the binaries 97 if { [variant_isset qt4_select] } { 98 set binappend {-mac} 99 } else { 100 set binappend {} 101 } 83 102 84 103 # create link in ${prefix}/bin to executable files in ${bindir} 85 foreach bin [glob -t ype f -directory ${destroot}${bindir} *] {86 system "ln -s ${bindir}/ [file tail ${bin}] ${destroot}${prefix}/bin"104 foreach bin [glob -tails -type f -directory ${destroot}${bindir} *] { 105 system "ln -s ${bindir}/${bin} ${destroot}${prefix}/bin/${bin}${binappend}" 87 106 } 88 107 89 108 # create link in ${applications_dir}/Qt to .app directories in ${bindir} 90 109 # create link in ${prefix}/bin to all *.app/Contents/MacOS/* 91 110 foreach app [glob -type d -directory ${destroot}${bindir} *.app] { 92 111 system "ln -s ${bindir}/[file tail ${app}] ${destroot}${applications_dir}/Qt" 93 foreach bin [glob -t ype f -directory ${app} Contents/MacOS/*] {94 system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/ [file tail ${bin}] ${destroot}${prefix}/bin"112 foreach bin [glob -tails -type f -directory ${app}/Contents/MacOS *] { 113 system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/${bin} ${destroot}${prefix}/bin/${bin}${binappend}" 95 114 } 96 115 } 97 116 … … 104 123 } 105 124 } 106 125 107 # Put pkgconfig directory in correct place (Fix Ticket #15353) 108 system "mv ${destroot}${frameworkdir}/pkgconfig ${destroot}/${prefix}/lib/" 126 # Put pkgconfig directory in the same place irrespective of the noframework variant 127 system "mv ${destroot}${libdir}/pkgconfig ${destroot}${prefix}/lib/pkgconfig-${name}" 128 129 # If the qt4_select variant is not set, allow pkg-config to find the .pc files without setting PKG_CONFIG_PATH 130 if { ! [variant_isset qt4_select] } { 131 xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig 132 foreach pcfile [glob -tails -directory ${destroot}${prefix}/lib/pkgconfig-${name} *.pc] { 133 system "ln -s ../pkgconfig-${name}/${pcfile} ${destroot}${prefix}/lib/pkgconfig" 134 } 135 } 136 137 # Fix the .pc and .prl files by removing ${destroot} 138 foreach fixfile [glob -directory ${destroot}${prefix}/lib/pkgconfig-${name} *.pc] { 139 reinplace \ 140 "s|[regsub ${prefix} ${worksrcpath} {}]/bin|[regsub ${prefix} ${bindir} {}]|g" \ 141 ${fixfile} 142 } 143 foreach fixfile [glob -nocomplain -directory ${destroot} ${prefix}/lib/pkgconfig-${name}/*.pc ${libdir}/*.prl ${libdir}/*/*.prl] { 144 reinplace \ 145 "s|-L${worksrcpath}/lib|-L${libdir}|g" \ 146 ${fixfile} 147 148 reinplace \ 149 "s|-F${worksrcpath}/lib|-F${frameworks_dir}|g" \ 150 ${fixfile} 151 } 109 152 110 153 # install documentation 111 154 foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \ … … 116 159 117 160 default_variants +docs +dbus 118 161 119 variant dbus description "Include DBus support" { 162 variant qt4_select description {Do not conflict with qt4-x11} {} 163 164 variant dbus description {Include DBus support} { 120 165 depends_lib-append port:dbus 121 166 configure.args-append -dbus-linked 122 167 } 123 168 124 variant noframework description "Do not build frameworks" { 125 configure.args-delete -framework -libdir '${frameworkdir}' 126 configure.args-append -no-framework 169 variant noframework description {Do not build frameworks} { 170 configure.args-delete -framework -libdir '${frameworks_dir}' 171 configure.args-append -no-framework -libdir ${prefix}/lib/${name} 172 set libdir ${prefix}/lib/${name} 127 173 } 128 174 129 variant nis description "Include Network Information Service (NIS) support"{175 variant nis description {Include Network Information Service (NIS) support} { 130 176 configure.args-delete -no-nis 131 177 configure.args-append -nis 132 178 } 133 179 134 variant cups description "Include Common Unix Printing System (CUPS) support"{180 variant cups description {Include Common Unix Printing System (CUPS) support} { 135 181 configure.args-delete -no-cups 136 182 configure.args-append -cups 137 183 } 138 184 139 variant mysql4 conflicts mysql5 description "Include support for SQL via mysql4 driver"{185 variant mysql4 conflicts mysql5 description {Include support for SQL via mysql4 driver} { 140 186 depends_lib-append lib:libmysqlclient.12:mysql4 141 187 configure.args-delete -no-sql-mysql 142 188 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ 143 189 -I${prefix}/include/mysql -L${prefix}/lib/mysql 144 190 } 145 191 146 variant mysql5 conflicts mysql4 description "Include support for SQL via mysql5 driver"{192 variant mysql5 conflicts mysql4 description {Include support for SQL via mysql5 driver} { 147 193 depends_lib-append lib:libmysqlclient.15:mysql5 148 194 configure.args-delete -no-sql-mysql 149 195 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ 150 196 -I${prefix}/include/mysql5/mysql -L${prefix}/lib/mysql5/mysql 151 197 } 152 198 153 variant psql description "Include support for SQL via postgresql driver"{199 variant psql description {Include support for SQL via postgresql driver} { 154 200 depends_lib-append port:postgresql83 155 201 configure.args-delete -no-sql-psql 156 202 configure.args-append -qt-sql-psql -plugin-sql-psql \ 157 203 -I${prefix}/include/postgresql83 -L${prefix}/lib/postgresql83 158 204 } 159 205 160 variant sqlite description "Include support for SQL via sqlite driver"{206 variant sqlite description {Include support for SQL via sqlite driver} { 161 207 configure.args-delete -no-sql-sqlite 162 208 configure.args-append -qt-sql-sqlite -plugin-sql-sqlite 163 209 } 164 210 165 variant ssl description "Include OpenSSL support"{211 variant ssl description {Include OpenSSL support} { 166 212 depends_lib-append port:openssl 167 213 configure.args-delete -no-openssl 168 214 configure.args-append -openssl 169 215 } 170 216 171 variant examples description "Build Qt examples" { 217 variant webkit description {Use WebKit as html rendering engine in Assistant} { 218 #configure.args-delete -no-assistant-webkit 219 configure.args-append -assistant-webkit 220 } 221 222 variant examples description {Build Qt examples} { 172 223 # configure.args-delete "-nomake examples" 173 224 configure.args-append -make examples -examplesdir ${prefix}/share/${portname}/examples 174 225 } 175 226 176 variant demos description "Build Qt demos"{227 variant demos description {Build Qt demos} { 177 228 # configure.args-delete "-nomake demos" 178 229 configure.args-append -make demos -demosdir ${prefix}/share/${portname}/demos 179 230 } 180 231 181 variant docs description "Include Qt Documentation"{232 variant docs description {Include Qt Documentation} { 182 233 configure.args-append -make docs 183 234 } 184 235 185 186 236 livecheck.check regex 187 livecheck.url http://trolltech.com/d eveloper/downloads/qt/mac188 livecheck.regex " The current version of Qt/Mac Open Source Edition is (4(?:\\.\\d+)*)"237 livecheck.url http://trolltech.com/downloads/opensource/appdev/mac-os-cpp 238 livecheck.regex "qt-mac-opensource-src-(4(?:\\.\\d+)*)${extract.suffix}"