[35909] trunk/dports/x11
mcalhoun at macports.org
mcalhoun at macports.org
Wed Apr 9 10:06:01 PDT 2008
Revision: 35909
http://trac.macosforge.org/projects/macports/changeset/35909
Author: mcalhoun at macports.org
Date: 2008-04-09 10:06:00 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
qt4-x11: Create new port.
Added Paths:
-----------
trunk/dports/x11/qt4-x11/
trunk/dports/x11/qt4-x11/Portfile
trunk/dports/x11/qt4-x11/files/
trunk/dports/x11/qt4-x11/files/patch-Makefile.unix.diff
trunk/dports/x11/qt4-x11/files/patch-q3process_unix.cpp.diff
trunk/dports/x11/qt4-x11/files/patch-qlibrary_unix.cpp.diff
trunk/dports/x11/qt4-x11/files/patch-qmake.conf.diff
trunk/dports/x11/qt4-x11/files/patch-qprocess_unix.cpp.diff
Added: trunk/dports/x11/qt4-x11/Portfile
===================================================================
--- trunk/dports/x11/qt4-x11/Portfile (rev 0)
+++ trunk/dports/x11/qt4-x11/Portfile 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,158 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id:$
+
+PortSystem 1.0
+
+name qt4-x11
+version 4.3.4
+categories x11
+maintainers mcalhoun
+homepage http://www.trolltech.com/
+platforms darwin
+description Qt Tool Kit
+long_description This is Qt, TrollTech's C++ toolkit for writing cross-platform GUI applications.
+master_sites ftp://ftp.trolltech.com/qt/source/ \
+ http://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/source/ \
+ http://ftp.ntua.gr/pub/X11/Qt/qt/source/ \
+ http://wftp.tu-chemnitz.de/pub/Qt/qt/source/
+distname qt-x11-opensource-src-${version}
+checksums \
+ md5 9499101ec54eb7b0de195b3c5e3ffa93 \
+ sha1 639f6469d5aa07c51c2aa6795f8e3de3aab8cd25 \
+ rmd160 eb081e599e61bcaa126981aecbe2db480be35eca
+
+depends_lib port:libmng port:libpng port:jpeg port:tiff port:libiconv
+
+# have to build with Apple gcc because of -fconstant-cfstrings
+configure.compiler gcc-4.0
+configure.cmd "echo yes | ./configure"
+configure.pre_args
+
+configure.args \
+ -v \
+ -prefix '${prefix}' \
+ -docdir '${prefix}/share/doc/${portname}' \
+ -datadir '${prefix}/share/${portname}' \
+ -headerdir '${prefix}/include/${portname}' \
+ -plugindir '${prefix}/lib/${portname}-plugins' \
+ -translationdir '${prefix}/share/${portname}/translations' \
+ -optimized-qmake -release -shared -stl \
+ -no-openssl -largefile \
+ -system-libpng -system-libjpeg -system-libmng -system-libtiff \
+ -system-zlib -qt-gif \
+ -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql \
+ -no-sql-sqlite -no-nis -no-cups \
+ -make libs -make tools \
+ -I${worksrcpath}/include -I${prefix}/include \
+ -L${worksrcpath}/lib -L${prefix}/lib -lresolv \
+ -no-rpath
+
+build.target first
+
+destroot.destdir INSTALL_ROOT="${destroot}"
+
+patchfiles \
+ patch-Makefile.unix.diff patch-qlibrary_unix.cpp.diff patch-q3process_unix.cpp.diff \
+ patch-qprocess_unix.cpp.diff patch-qmake.conf.diff
+
+post-patch {
+ reinplace "s|ARCH=macosx|ARCH=`uname -p`|g" ${worksrcpath}/configure
+ reinplace "s|Q_OS_DARWIN|Q_WS_MAC|g" ${worksrcpath}/qmake/generators/mac/pbuilder_pbx.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/demos/qtdemo/colors.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/examples/dialogs/standarddialogs/dialog.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/examples/tools/plugandpaint/mainwindow.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/qmake/main.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/codecs/qiconvcodec.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/codecs/qiconvcodec_p.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/tools/qstring.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/global/qglobal.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/io/qfsfileengine_unix.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/global/qlibraryinfo.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/tools/qlocale.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/io/qsettings.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/qmake/option.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/io/qsettings_p.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/plugin/qlibrary.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/tools/qpoint.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/tools/qrect.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/dialogs/qprintdialog.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/kernel/qapplication.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/kernel/qapplication_p.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/widgets/qdockwidget.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/corelib/thread/qthread_unix.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/text/qfont.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/gui/text/qfontdatabase.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/plugins/accessible/widgets/simplewidgets.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/qt3support/other/q3accel.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/qt3support/other/q3polygonscanner.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/qt3support/text/q3textedit.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/sql/drivers/odbc/qsql_odbc.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/tools/uic/cpp/cppwriteinitialization.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/tools/uic/cpp/cppwriteinitialization.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/src/tools/uic/cpp/cppwriteinitialization.h
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/tools/assistant/lib/qassistantclient.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+ reinplace "s|Q_OS_MAC|Q_WS_MAC|g" ${worksrcpath}/tools/linguist/shared/proparserutils.h
+}
+
+post-destroot {
+ foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 LICENSE.QPL OPENSOURCE-NOTICE.TXT README \
+ GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} {
+ xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname}
+ }
+ system "cd ${destroot}/${prefix}/lib && ln -s libQtAssistantClient.dylib libQtAssistant.dylib"
+}
+
+variant dbus description "Include DBus support" {
+ depends_lib-append port:dbus
+ configure.args-append -qdbus
+}
+
+variant nis description "Include Network Information Service (NIS) support" {
+ configure.args-delete -no-nis
+ configure.args-append -nis
+}
+
+variant cups description "Include Common Unix Printing System (CUPS) support" {
+ configure.args-delete -no-cups
+ configure.args-append -cups
+}
+
+variant mysql conflicts mysql5 description "Include support for SQL via mysql driver" {
+ depends_lib-append lib:libmysqlclient.12:mysql4
+ configure.args-delete -no-sql-mysql
+ configure.args-append -qt-sql-mysql -plugin-sql-mysql \
+ -I${prefix}/include/mysql -L${prefix}/lib/mysql
+}
+
+variant mysql5 conflicts mysql description "Include support for SQL via mysql5 driver" {
+ depends_lib-append port:mysql5
+ configure.args-delete -no-sql-mysql
+ configure.args-append -qt-sql-mysql -plugin-sql-mysql \
+ -I${prefix}/include/mysql5/mysql -L${prefix}/lib/mysql5/mysql
+}
+
+variant sqlite description "Include support for SQL via sqlite driver" {
+ depends_lib-append port:sqlite3
+ configure.args-delete -no-sql-sqlite
+ configure.args-append -qt-sql-sqlite -plugin-sql-sqlite
+ # -system-sqlite
+}
+
+variant ssl description "Include OpenSSL support" {
+ depends_lib-append port:openssl
+ configure.args-delete -no-openssl
+ configure.args-append -openssl
+}
+
+variant examples description "Build Qt examples" {
+ configure.args-append -make examples -examplesdir ${prefix}/share/${portname}/examples
+}
+
+variant demos description "Build Qt demos" {
+ configure.args-append -make demos -demosdir ${prefix}/share/${portname}/demos
+}
+
+livecheck.check regex
+livecheck.url http://trolltech.com/developer/downloads/qt/x11
+livecheck.regex "The current version of Qt/X11 Open Source Edition is (4(?:\\.\\d+)*)"
Property changes on: trunk/dports/x11/qt4-x11/Portfile
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/dports/x11/qt4-x11/files/patch-Makefile.unix.diff
===================================================================
--- trunk/dports/x11/qt4-x11/files/patch-Makefile.unix.diff (rev 0)
+++ trunk/dports/x11/qt4-x11/files/patch-Makefile.unix.diff 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,11 @@
+--- qmake/Makefile.unix.orig 2008-02-20 17:10:34.000000000 -0700
++++ qmake/Makefile.unix 2008-02-20 17:10:51.000000000 -0700
+@@ -86,7 +86,7 @@
+ -I$(SOURCE_PATH)/src/script -DQT_NO_PCRE \
+ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE \
+ -DQT_NO_COMPRESS -I$(QMAKESPEC) -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT \
+- -DQT_NO_GEOM_VARIANT $(OPENSOURCE_CXXFLAGS)
++ -DQT_NO_GEOM_VARIANT -D__USE_WS_X11__ $(OPENSOURCE_CXXFLAGS)
+
+ CXXFLAGS = @QMAKE_CXXFLAGS@ $(CPPFLAGS)
+
Added: trunk/dports/x11/qt4-x11/files/patch-q3process_unix.cpp.diff
===================================================================
--- trunk/dports/x11/qt4-x11/files/patch-q3process_unix.cpp.diff (rev 0)
+++ trunk/dports/x11/qt4-x11/files/patch-q3process_unix.cpp.diff 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,29 @@
+--- src/qt3support/other/q3process_unix.cpp.orig 2008-02-20 19:52:59.000000000 -0700
++++ src/qt3support/other/q3process_unix.cpp 2008-02-20 19:53:34.000000000 -0700
+@@ -761,7 +761,7 @@
+ #endif
+ i++;
+ }
+-#ifdef Q_OS_MACX
++#ifdef Q_WS_MACX
+ if(i) {
+ Q3CString arg_bundle = arglistQ[0];
+ QFileInfo fi(QString::fromUtf8(arg_bundle.constData()));
+@@ -858,7 +858,7 @@
+ QStringList pathList = QStringList::split( QLatin1Char(':'), QString::fromLocal8Bit(getenv( "PATH" )) );
+ for (QStringList::Iterator it = pathList.begin(); it != pathList.end(); ++it ) {
+ QString dir = *it;
+-#if defined(Q_OS_MACX) //look in a bundle
++#if defined(Q_WS_MACX) //look in a bundle
+ if(!QFile::exists(dir + QLatin1Char('/') + command) && QFile::exists(dir + QLatin1Char('/') + command + QLatin1String(".app")))
+ dir += QLatin1Char('/') + command + QLatin1String(".app/Contents/MacOS");
+ #endif
+@@ -868,7 +868,7 @@
+ QFileInfo fileInfo( dir + "/" + command );
+ #endif
+ if ( fileInfo.isExecutable() ) {
+-#if defined(Q_OS_MACX)
++#if defined(Q_WS_MACX)
+ arglistQ[0] = fileInfo.absFilePath().local8Bit();
+ #else
+ arglistQ[0] = fileInfo.filePath().local8Bit();
Added: trunk/dports/x11/qt4-x11/files/patch-qlibrary_unix.cpp.diff
===================================================================
--- trunk/dports/x11/qt4-x11/files/patch-qlibrary_unix.cpp.diff (rev 0)
+++ trunk/dports/x11/qt4-x11/files/patch-qlibrary_unix.cpp.diff 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,29 @@
+--- src/corelib/plugin/qlibrary_unix.cpp.orig 2008-02-20 19:25:57.000000000 -0700
++++ src/corelib/plugin/qlibrary_unix.cpp 2008-02-20 19:26:36.000000000 -0700
+@@ -43,7 +43,7 @@
+
+ #ifndef QT_NO_LIBRARY
+
+-#ifdef Q_OS_MAC
++#ifdef Q_WS_MAC
+ # include <private/qcore_mac_p.h>
+ #endif
+
+@@ -190,7 +190,7 @@
+ pHnd = dlopen(QFile::encodeName(attempt), dlFlags);
+ }
+ }
+-#ifdef Q_OS_MAC
++#ifdef Q_WS_MAC
+ if (!pHnd) {
+ if (CFBundleRef bundle = CFBundleGetBundleWithIdentifier(QCFString(fileName))) {
+ QCFType<CFURLRef> url = CFBundleCopyExecutableURL(bundle);
+@@ -220,7 +220,7 @@
+ return true;
+ }
+
+-#ifdef Q_OS_MAC
++#ifdef Q_WS_MAC
+ Q_CORE_EXPORT void *qt_mac_resolve_sys(void *handle, const char *symbol)
+ {
+ return dlsym(handle, symbol);
Added: trunk/dports/x11/qt4-x11/files/patch-qmake.conf.diff
===================================================================
--- trunk/dports/x11/qt4-x11/files/patch-qmake.conf.diff (rev 0)
+++ trunk/dports/x11/qt4-x11/files/patch-qmake.conf.diff 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,17 @@
+--- mkspecs/darwin-g++/qmake.conf.orig 2008-02-24 13:49:32.000000000 -0700
++++ mkspecs/darwin-g++/qmake.conf 2008-02-24 13:52:05.000000000 -0700
+@@ -51,12 +51,13 @@
+
+ QMAKE_LINK = c++
+ QMAKE_LINK_SHLIB = c++
+-QMAKE_LFLAGS =
++QMAKE_LFLAGS = -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
+ QMAKE_LFLAGS_RELEASE =
+ QMAKE_LFLAGS_DEBUG =
+ QMAKE_LFLAGS_APP = -prebind
+ QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module -headerpad_max_install_names
+ QMAKE_LFLAGS_PLUGIN = -bundle
++QMAKE_LFLAGS_SONAME = -Wl,-install_name,$$[QT_INSTALL_LIBS]/
+ QMAKE_LFLAGS_THREAD =
+
+ QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
Added: trunk/dports/x11/qt4-x11/files/patch-qprocess_unix.cpp.diff
===================================================================
--- trunk/dports/x11/qt4-x11/files/patch-qprocess_unix.cpp.diff (rev 0)
+++ trunk/dports/x11/qt4-x11/files/patch-qprocess_unix.cpp.diff 2008-04-09 17:06:00 UTC (rev 35909)
@@ -0,0 +1,20 @@
+--- src/corelib/io/qprocess_unix.cpp.orig 2008-02-20 20:07:04.000000000 -0700
++++ src/corelib/io/qprocess_unix.cpp 2008-02-20 20:08:38.000000000 -0700
+@@ -78,7 +78,7 @@
+ #include "qprocess.h"
+ #include "qprocess_p.h"
+
+-#ifdef Q_OS_MAC
++#ifdef Q_WS_MAC
+ #include <private/qcore_mac_p.h>
+ #endif
+
+@@ -591,7 +591,7 @@
+
+ // Encode the program name.
+ QByteArray encodedProgramName = QFile::encodeName(program);
+-#ifdef Q_OS_MAC
++#ifdef Q_WS_MAC
+ // allow invoking of .app bundles on the Mac.
+ QFileInfo fileInfo(QString::fromUtf8(encodedProgramName.constData()));
+ if (encodedProgramName.endsWith(".app") && fileInfo.isDir()) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080409/f82241b3/attachment.html
More information about the macports-changes
mailing list