[73118] trunk/dports/aqua/qt4-mac/Portfile
michaelld at macports.org
michaelld at macports.org
Thu Nov 4 06:13:35 PDT 2010
Revision: 73118
http://trac.macports.org/changeset/73118
Author: michaelld at macports.org
Date: 2010-11-04 06:13:31 -0700 (Thu, 04 Nov 2010)
Log Message:
-----------
qt4-mac changes:
* Remove all archcheck.
* after 'configure' remove -all- '-I' and '-L' flags in the qmake
cache file related to SQLITE, DBUS, OPENSSL, and ODBC. These paths
are included in compiler.cpath and compiler.library_path already,
and can cause issues during compiling and/or linking Qt (meaning,
for example, that when "-L${prefix}/lib -lsqlite" comes -before-
"-L${QTCORE_DIR} -lQtCore" during linking, and when qt4 is already
installed via MacPorts, then the linker will try to link with the
system version of QtCore instead of the local-just-created version.
Removing these flags from the qmake cache means that (e.g.)
"-L{prefix}/lib" will be searched -after- all other paths, so (e.g.)
QtCore will be found locally while those for SQLITE etc. will
continue to be found in the system. Ditto for -I flags. The times
when this issue will arise and be important are (1) when the
installed qt4-mac is just for a single arch, but the new version is
+universal: linking will fail because the found (e.g.) QtCore
library is just a single arch; (2) when upgrading to a newer version
of Qt: the found headers and libraries might not be compatible with
what the local/newer version require. This issue is really one that
would be better handled by tweaking the QMake build files for these
modules: Including local paths -first- (in this case, for Qt headers
and libraries), and then system paths -last- (in this case, for
SQLITE, DBUS, OPENSSL, and ODBC), but this quick fix is much easier.
Modified Paths:
--------------
trunk/dports/aqua/qt4-mac/Portfile
Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile 2010-11-04 12:55:52 UTC (rev 73117)
+++ trunk/dports/aqua/qt4-mac/Portfile 2010-11-04 13:13:31 UTC (rev 73118)
@@ -31,11 +31,6 @@
depends_lib-append port:zlib port:dbus port:openssl port:sqlite3 \
port:tiff port:libpng port:libmng port:jpeg
-archcheck.files lib/libz.dylib lib/libdbus-1.dylib \
- lib/libssl.dylib lib/libsqlite3.dylib \
- lib/libtiff.dylib lib/libpng.dylib \
- lib/libmng.dylib lib/libjpeg.dylib
-
# (0) Fix the testing script to properly handle both +universal as
# well as the native arch for both CXX and CC compiling; also make
# sure it does not create a Mac app bundle.
@@ -185,8 +180,7 @@
# -openssl-linked ensures that the MacPorts openssl is used.
#
# -no-framework ensures that this port is installed as separate
-# libraries and headers, with guaranteed locations and names that
-# can be used for archcheck.
+# libraries and headers, with guaranteed locations and names.
#
# -no-phonon ensures that Qt does not install the 3rd-parth Phonon
# port or its backend to QuickTime 7; Phonon is now installed via
@@ -308,19 +302,39 @@
configure.args-delete -optimized-qmake
}
-# Remove any '-I' string from the C*FLAGS for SQLITE and DBUS, so that
-# what remains are just non-I flags; these paths are in compiler.cpath .
-# The includes for all the other variants are not used by
-# 'configure', and are already included in the compiler.cpath .
+# Remove any '-I' and '-L' string from the *FLAGS for SQLITE, DBUS,
+# ODBC, and OPENSSL, so that what remains are just non-I/L flags;
+# these paths are in compiler.cpath and compiler.library_path. The
+# header and library paths for all the other variants are not used by
+# 'configure', and are already included in the compiler.cpath and
+# compiler.library_path . during the 'build' stage, 'make' will
+# rebuild the Makefiles that depend on any of these changed files.
+# These patches are sufficient to make sure local (to this build)
+# paths are searched first, and then system paths last (via the
+# compiler.X settings). Ideally, 'qmake' -- either via its mkspecs
+# files or the project's build files -- would distinguish between
+# "local" and "system" includes & libraries.
post-configure {
# SQLITE
- reinplace "/CFLAGS_SQLITE/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ reinplace "/SQLITE/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
${worksrcpath}/.qmake.cache
+ reinplace "/SQLITE/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
# DBUS
- reinplace "/CFLAGS_DBUS/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ reinplace "/DBUS/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
${worksrcpath}/.qmake.cache
- # during the 'build' stage, 'make' will rebuild the Makefiles that
- # depend on any of these changed files.
+ reinplace "/DBUS/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ # OPENSSL
+ reinplace "/OPENSSL/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ reinplace "/OPENSSL/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ # ODBC
+ reinplace "/ODBC/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ reinplace "/ODBC/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
}
pre-build {
@@ -407,7 +421,6 @@
variant mysql description {Enable MySQL SQL Driver} {
depends_lib-append path:lib/mysql5:mysql5
- archcheck.files-append lib/mysql5/mysql/libmysqlclient.dylib
lunshift header_path ${prefix}/include/mysql5/mysql
lunshift library_path ${prefix}/lib/mysql5/mysql
configure.args-delete -no-sql-mysql
@@ -416,7 +429,6 @@
variant odbc description {Enable iODBC SQL Driver} {
depends_lib-append port:libiodbc
- archcheck.files-append lib/libiodbc.dylib
configure.args-delete -no-sql-odbc
configure.args-append -plugin-sql-odbc
}
@@ -446,7 +458,6 @@
if {${psql_version} != ""} {
depends_lib-append port:postgresql${psql_version}
- archcheck.files-append lib/postgresql${psql_version}/libpgtypes.dylib
lunshift header_path ${prefix}/include/postgresql${psql_version}
lunshift library_path ${prefix}/lib/postgresql${psql_version}
configure.args-delete -no-sql-psql
@@ -455,7 +466,6 @@
variant sqlite2 description {Enable SQLite version 2 SQL Driver} {
depends_lib-append port:sqlite2
- archcheck.files-append lib/libsqlite.dylib
configure.args-delete -no-sql-sqlite2
configure.args-append -plugin-sql-sqlite2
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101104/fadd7b5c/attachment.html>
More information about the macports-changes
mailing list