Ticket #14601: Portfile.diff
File Portfile.diff, 7.1 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 set bindir ${prefix}/libexec/${name}/bin 33 31 34 # See 32 35 # http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html 33 36 # for options 34 37 configure.args \ 35 38 -v \ 36 39 -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' \ 40 -bindir '${bindir}' \ 41 -docdir '${prefix}/share/doc/${portname}' \ 42 -datadir '${prefix}/share/${portname}' \ 43 -headerdir '${prefix}/include/${portname}' \ 44 -plugindir '${prefix}/lib/${portname}-plugins' \ 45 -translationdir '${prefix}/share/${portname}/translations' \ 42 46 -optimized-qmake -release -shared -stl \ 43 47 -no-openssl -largefile \ 44 48 -system-libpng -system-libjpeg -system-libmng -system-libtiff \ … … 51 55 52 56 # not made by default, anyway: -nomake demos -nomake examples 53 57 54 build.env QMAKESPEC='' QTDIR='' DYLD_LIBRARY_PATH="${worksrcpath}/lib"55 58 build.target first 56 59 57 60 destroot.destdir INSTALL_ROOT="${destroot}" 58 61 59 set appPath ${destroot}/Applications/MacPorts/Qt60 set docPath ${destroot}${prefix}/share/doc/qt4-mac61 62 62 post-destroot { 63 xinstall -d -m 0755 ${appPath} 64 foreach app {assistant Designer Linguist pixeltool} { 65 move ${destroot}${prefix}/bin/${app}.app ${appPath} 63 xinstall -d -m 0755 ${destroot}${bindir} 64 xinstall -d -m 0755 ${destroot}/Applications/MacPorts/Qt 65 foreach bin [glob -type f -directory ${destroot}${bindir} *] { 66 system "ln -s ${bindir}/[file tail ${bin}] ${destroot}${prefix}/bin" 67 } 68 foreach app [glob -type d -directory ${destroot}${bindir} *.app] { 69 system "ln -s ${bindir}/[file tail ${app}] ${destroot}/Applications/MacPorts/Qt" 70 foreach bin [glob -type f -directory ${app} Contents/MacOS/*] { 71 system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/[file tail ${bin}] ${destroot}${prefix}/bin" 72 } 73 } 74 foreach bin [glob ${destroot}${prefix}/bin/*] { 75 move ${bin} ${bin}-mac 76 } 77 foreach dirFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins -type d -nocomplain *] { 78 set dir [file tail ${dirFull}] 79 foreach libFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins/${dir} -nocomplain *.dylib] { 80 set lib [file tail ${libFull}] 81 system "install_name_tool -id ${prefix}/lib/${portname}-plugins/${dir}/${lib} ${libFull}" 82 } 66 83 } 67 84 foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \ 68 85 GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} { 69 xinstall -c -m 644 ${worksrcpath}/$doc ${d ocPath}86 xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname} 70 87 } 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 88 } 80 89 81 90 variant dbus description "Include DBus support" { … … 85 94 86 95 variant framework description "Build frameworks" { 87 96 configure.args-delete -no-framework 88 configure.args-append -framework 97 configure.args-append -framework -libdir '${prefix}/Library/Frameworks' 98 } 99 100 variant nis description "Include Network Information Service (NIS) support" { 101 configure.args-delete -no-nis 102 configure.args-append -nis 89 103 } 90 104 91 variant ipv6 description "Include IPv6support" {92 configure.args-delete -no- ipv693 configure.args-append - ipv6105 variant cups description "Include Common Unix Printing System (CUPS) support" { 106 configure.args-delete -no-cups 107 configure.args-append -cups 94 108 } 95 109 96 variant mysql description "Include support for SQL via mysql driver" {110 variant mysql conflicts mysql5 description "Include support for SQL via mysql driver" { 97 111 depends_lib-append lib:libmysqlclient.12:mysql4 98 112 configure.args-delete -no-sql-mysql 99 113 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ 100 114 -I${prefix}/include/mysql -L${prefix}/lib/mysql 101 115 } 102 116 117 variant mysql5 conflicts mysql description "Include support for SQL via mysql5 driver" { 118 depends_lib-append port:mysql5 119 configure.args-delete -no-sql-mysql 120 configure.args-append -qt-sql-mysql -plugin-sql-mysql \ 121 -I${prefix}/include/mysql5/mysql -L${prefix}/lib/mysql5/mysql 122 } 123 103 124 variant sqlite description "Include support for SQL via sqlite driver" { 104 125 # depends_lib-append port:sqlite3 105 126 configure.args-delete -no-sql-sqlite 106 127 configure.args-append -qt-sql-sqlite -plugin-sql-sqlite 107 128 # -system-sqlite 108 post-destroot {109 # fix install-name of plugin110 system "install_name_tool -id ${prefix}/lib/qt4-plugins/sqldrivers/libqsqlite.dylib \111 ${destroot}${prefix}/lib/qt4-plugins/sqldrivers/libqsqlite.dylib"112 }113 129 } 114 130 115 131 variant ssl description "Include OpenSSL support" { … … 120 136 121 137 variant examples description "Build Qt examples" { 122 138 # configure.args-delete "-nomake examples" 123 configure.args-append -make examples 139 configure.args-append -make examples -examplesdir ${prefix}/share/${portname}/examples 124 140 } 125 141 126 142 variant demos description "Build Qt demos" { 127 143 # configure.args-delete "-nomake demos" 128 configure.args-append -make demos 129 post-destroot { 130 move ${destroot}${prefix}/demos ${appPath} 131 move ${destroot}${prefix}/bin/qtdemo.app ${appPath} 132 } 144 configure.args-append -make demos -demosdir ${prefix}/share/${portname}/demos 133 145 } 146 147 livecheck.check regex 148 livecheck.url http://trolltech.com/developer/downloads/qt/mac 149 livecheck.regex "The current version of Qt/Mac Open Source Edition is (4(?:\\.\\d+)*)"