Ticket #14601: Portfile.2.diff
File Portfile.2.diff, 8.4 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 17 years ago) |
---|
-
Portfile
old new 19 19 http://wftp.tu-chemnitz.de/pub/Qt/qt/source/ 20 20 distname qt-mac-opensource-src-${version} 21 21 checksums md5 e3997f7c7620bcf03c635676c3b01fef \ 22 sha1 bdba9cd2a5ad79724d536f8a4a3010c3a223108b 22 sha1 bdba9cd2a5ad79724d536f8a4a3010c3a223108b \ 23 rmd160 b02600a73ce54e367b3f362223cfafbaf337ca80 23 24 24 25 depends_lib port:libmng port:libpng port:jpeg port:tiff 25 26 26 27 # have to build with Apple gcc because of -fconstant-cfstrings 27 28 configure.compiler gcc-4.0 28 29 configure.cmd "echo yes | ./configure" 29 configure.env QMAKESPEC='' QTDIR='' DYLD_LIBRARY_PATH=''30 30 configure.pre_args 31 32 # directory to put .app and executable files 33 # once installed there, should not be moved so they can find each other 34 # (e.g. assistant.app) and the examples directory 35 set bindir ${prefix}/libexec/${name}/bin 36 31 37 # See 32 38 # http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html 33 39 # for options 34 40 configure.args \ 35 41 -v \ 36 42 -prefix '${prefix}' \ 37 -docdir '${prefix}/share/doc/${portname}/html' \ 38 -datadir '${prefix}/share/qt4' \ 39 -headerdir '${prefix}/include/qt4' \ 40 -plugindir '${prefix}/lib/qt4-plugins' \ 41 -translationdir '${prefix}/share/qt4/translations' \ 43 -bindir '${bindir}' \ 44 -docdir '${prefix}/share/doc/${portname}' \ 45 -datadir '${prefix}/share/${portname}' \ 46 -headerdir '${prefix}/include/${portname}' \ 47 -plugindir '${prefix}/lib/${portname}-plugins' \ 48 -translationdir '${prefix}/share/${portname}/translations' \ 42 49 -optimized-qmake -release -shared -stl \ 43 50 -no-openssl -largefile \ 44 51 -system-libpng -system-libjpeg -system-libmng -system-libtiff \ 45 52 -system-zlib -qt-gif \ 46 53 -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql \ 47 -no-sql-sqlite -no-nis -no-cups -no-framework \ 54 -no-sql-sqlite -no-nis -no-cups \ 55 -framework -libdir '${prefix}/Library/Frameworks' \ 48 56 -make libs -make tools \ 49 57 -I${worksrcpath}/include -I${prefix}/include \ 50 58 -L${worksrcpath}/lib -L${prefix}/lib 51 59 52 60 # not made by default, anyway: -nomake demos -nomake examples 53 61 54 build.env QMAKESPEC='' QTDIR='' DYLD_LIBRARY_PATH="${worksrcpath}/lib"55 62 build.target first 56 63 57 64 destroot.destdir INSTALL_ROOT="${destroot}" 58 65 59 set appPath ${destroot}/Applications/MacPorts/Qt60 set docPath ${destroot}${prefix}/share/doc/qt4-mac61 62 66 post-destroot { 63 xinstall -d -m 0755 ${appPath} 64 foreach app {assistant Designer Linguist pixeltool} { 65 move ${destroot}${prefix}/bin/${app}.app ${appPath} 67 xinstall -d -m 0755 ${destroot}${bindir} 68 xinstall -d -m 0755 ${destroot}/Applications/MacPorts/Qt 69 70 # create link in ${prefix}/bin to executable files in ${bindir} 71 foreach bin [glob -type f -directory ${destroot}${bindir} *] { 72 system "ln -s ${bindir}/[file tail ${bin}] ${destroot}${prefix}/bin" 73 } 74 75 # create link in /Applications/MacPorts/Qt to .app directories in ${bindir} 76 # create link in ${prefix}/bin to all *.app/Contents/MacOS/* 77 foreach app [glob -type d -directory ${destroot}${bindir} *.app] { 78 system "ln -s ${bindir}/[file tail ${app}] ${destroot}/Applications/MacPorts/Qt" 79 foreach bin [glob -type f -directory ${app} Contents/MacOS/*] { 80 system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/[file tail ${bin}] ${destroot}${prefix}/bin" 81 } 82 } 83 84 # append -mac to links in ${prefix}/bin to avoid conflict with qt4-x11 85 foreach bin [glob ${destroot}${prefix}/bin/*] { 86 move ${bin} ${bin}-mac 87 } 88 89 # fix id of plugins shared libraries 90 foreach dirFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins -type d -nocomplain *] { 91 set dir [file tail ${dirFull}] 92 foreach libFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins/${dir} -nocomplain *.dylib] { 93 set lib [file tail ${libFull}] 94 system "install_name_tool -id ${prefix}/lib/${portname}-plugins/${dir}/${lib} ${libFull}" 95 } 66 96 } 97 98 # install documentation 67 99 foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \ 68 100 GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} { 69 xinstall -c -m 644 ${worksrcpath}/$doc ${d ocPath}101 xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname} 70 102 } 71 if {![file exists ${destroot}${prefix}/lib/libqt.dylib]} {72 set majorver [strsed ${version} {s/\.[0-9]*\.[0-9]*$//}]73 set minorver [strsed ${version} {s/\.[0-9]*$//}]74 system "cd ${destroot}${prefix}/lib &&75 ln -s libqt-mt.${version}.dylib libqt.dylib &&76 ln -s libqt-mt.${version}.dylib libqt.${majorver}.dylib &&77 ln -s libqt-mt.${version}.dylib libqt.${minorver}.dylib"78 }79 103 } 80 104 81 105 variant dbus description "Include DBus support" { … … 83 107 configure.args-append -qdbus 84 108 } 85 109 86 variant framework description "Build frameworks" {87 configure.args-delete - no-framework88 configure.args-append - framework110 variant noframework description "Do not build frameworks" { 111 configure.args-delete -framework -libdir '${prefix}/Library/Frameworks' 112 configure.args-append -no-framework 89 113 } 90 114 91 variant ipv6 description "Include IPv6support" {92 configure.args-delete -no- ipv693 configure.args-append - ipv6115 variant nis description "Include Network Information Service (NIS) support" { 116 configure.args-delete -no-nis 117 configure.args-append -nis 94 118 } 95 119 96 variant mysql description "Include support for SQL via mysql driver" { 120 variant cups description "Include Common Unix Printing System (CUPS) support" { 121 configure.args-delete -no-cups 122 configure.args-append -cups 123 } 124 125 variant mysql description conflicts mysql5 "Include support for SQL via mysql driver" { 97 126 depends_lib-append lib:libmysqlclient.12:mysql4 98 127 configure.args-delete -no-sql-mysql 99 128 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ 100 129 -I${prefix}/include/mysql -L${prefix}/lib/mysql 101 130 } 102 131 103 variant mysql5 description "Include support for SQL via mysqldriver" {132 variant mysql5 conflicts mysql description "Include support for SQL via mysql5 driver" { 104 133 depends_lib-append lib:libmysqlclient.15:mysql5 105 134 configure.args-delete -no-sql-mysql 106 135 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ … … 112 141 configure.args-delete -no-sql-sqlite 113 142 configure.args-append -qt-sql-sqlite -plugin-sql-sqlite 114 143 # -system-sqlite 115 post-destroot {116 # fix install-name of plugin117 system "install_name_tool -id ${prefix}/lib/qt4-plugins/sqldrivers/libqsqlite.dylib \118 ${destroot}${prefix}/lib/qt4-plugins/sqldrivers/libqsqlite.dylib"119 }120 144 } 121 145 122 146 variant ssl description "Include OpenSSL support" { 123 depends_lib 147 depends_lib-append port:openssl 124 148 configure.args-delete -no-openssl 125 149 configure.args-append -openssl 126 150 } 127 151 128 152 variant examples description "Build Qt examples" { 129 153 # configure.args-delete "-nomake examples" 130 configure.args-append -make examples 154 configure.args-append -make examples -examplesdir ${prefix}/share/${portname}/examples 131 155 } 132 156 133 157 variant demos description "Build Qt demos" { 134 158 # configure.args-delete "-nomake demos" 135 configure.args-append -make demos 136 post-destroot { 137 move ${destroot}${prefix}/demos ${appPath} 138 move ${destroot}${prefix}/bin/qtdemo.app ${appPath} 139 } 159 configure.args-append -make demos -demosdir ${prefix}/share/${portname}/demos 140 160 } 161 162 livecheck.check regex 163 livecheck.url http://trolltech.com/developer/downloads/qt/mac 164 livecheck.regex "The current version of Qt/Mac Open Source Edition is (4(?:\\.\\d+)*)"