[102344] trunk/dports/aqua/qt4-mac
michaelld at macports.org
michaelld at macports.org
Thu Jan 31 10:04:27 PST 2013
Revision: 102344
https://trac.macports.org/changeset/102344
Author: michaelld at macports.org
Date: 2013-01-31 10:04:27 -0800 (Thu, 31 Jan 2013)
Log Message:
-----------
qt4-mac : more compiler testing and comment changes only, so no rev-bump.
* addresses ticket #37868;
* add compiler check for LIBRARY_PATH;
* tweak comments to reflect new check;
* change blacklist to reflect new knowledge of non-working compilers.
Modified Paths:
--------------
trunk/dports/aqua/qt4-mac/Portfile
trunk/dports/aqua/qt4-mac/files/cpath/cpath.test
trunk/dports/aqua/qt4-mac/files/patch-configure.diff
Added Paths:
-----------
trunk/dports/aqua/qt4-mac/files/library_path/
trunk/dports/aqua/qt4-mac/files/library_path/library_path.test
trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.c
trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.h
trunk/dports/aqua/qt4-mac/files/library_path/library_path_test.c
Modified: trunk/dports/aqua/qt4-mac/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac/Portfile 2013-01-31 17:30:14 UTC (rev 102343)
+++ trunk/dports/aqua/qt4-mac/Portfile 2013-01-31 18:04:27 UTC (rev 102344)
@@ -358,6 +358,8 @@
${worksrcpath}/config.tests/mac
copy ${filespath}/cpath \
${worksrcpath}/config.tests/mac
+ copy ${filespath}/library_path \
+ ${worksrcpath}/config.tests/mac
}
@@ -368,27 +370,35 @@
# as installed by MacPorts but are supported by all versions of CLANG
# (both MacPorts' and Apple's).
#
-# * Some older versions of CLANG do not honor the CPATH or
-# LIBRARY_PATH environment variables, which are required for compiling
+# * Some older versions of CLANG do not honor the CPATH
+# environment variables, which is required for compiling
# this port when using MacPorts. The versions seem to be: MacPorts
# CLANG 2.9 or earlier, and Apple CLANG 318.0.58 or older.
#
+# * Some older versions of CLANG do not honor the LIBRARY_PATH
+# environment variables, which is required for compiling
+# this port when using MacPorts. The versions seem to be: MacPorts
+# CLANG 3.0 or earlier, and Apple CLANG 318.0.61 or older.
+#
# See also:
# < http://llvm.org/bugs/show_bug.cgi?id=8971 >,
# < https://trac.macports.org/ticket/30271 >,
-# < https://trac.macports.org/ticket/31076 >, and
-# < https://trac.macports.org/ticket/31638 >.
+# < https://trac.macports.org/ticket/31076 >,
+# < https://trac.macports.org/ticket/31638 >, and
+# < https://trac.macports.org/ticket/37868 >.
#
# NOTE: qt4-mac augments the standard Qt4 configure script with
-# pre-qmake-build tests for CPATH, -Xarch, -fconstant-cfstring,
-# Objective-C(++) blocks, and, if requested, C++11. The script will
-# error out quickly if the compiler does not seem to provide support
-# for any one of these properties, no matter this blacklist.
+# pre-qmake-build tests for CPATH, LIBRARY_PATH, -Xarch,
+# -fconstant-cfstring, Objective-C(++) blocks, and, if requested,
+# C++11. The script will error out quickly if the compiler does not
+# seem to provide support for any one of these properties, no matter
+# this blacklist.
-compiler.blacklist-append { clang <= 318.0.58 } \
+compiler.blacklist-append { clang <= 318.0.61 } \
macports-gcc-4.1 macports-gcc-4.2 macports-gcc-4.3 \
macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6 \
- macports-gcc-4.7 macports-gcc-4.8 macports-clang-2.9
+ macports-gcc-4.7 macports-gcc-4.8 \
+ macports-clang-2.9 macports-clang-3.0
# --prefix is not recognized.
configure.pre_args-delete --prefix=${prefix}
@@ -1049,7 +1059,7 @@
compiler.blacklist-append \
apple-gcc-4.0 apple-gcc-4.2 \
gcc-3.3 gcc-4.0 gcc-4.2 \
- llvm-gcc-4.2 macports-clang-3.0
+ llvm-gcc-4.2
pre-extract {
Modified: trunk/dports/aqua/qt4-mac/files/cpath/cpath.test
===================================================================
--- trunk/dports/aqua/qt4-mac/files/cpath/cpath.test 2013-01-31 17:30:14 UTC (rev 102343)
+++ trunk/dports/aqua/qt4-mac/files/cpath/cpath.test 2013-01-31 18:04:27 UTC (rev 102344)
@@ -6,10 +6,16 @@
WORKDIR=$3
cd $3
-export CPATH=.
+# (1) do the test, without CPATH; should fail
if "$COMPILER" -nostdinc -c cpath_test.c 2>/dev/null 1>&2; then
- CPATH_SUPPORT=yes
+ true
+else
+ # (2) do the test, with CPATH set; should pass
+ export CPATH=.
+ if "$COMPILER" -nostdinc -c cpath_test.c 2>/dev/null 1>&2; then
+ CPATH_SUPPORT=yes
+ fi
fi
rm -f cpath_test.o
Added: trunk/dports/aqua/qt4-mac/files/library_path/library_path.test
===================================================================
--- trunk/dports/aqua/qt4-mac/files/library_path/library_path.test (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/library_path/library_path.test 2013-01-31 18:04:27 UTC (rev 102344)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+LIBRARY_PATH_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+
+cd $3
+
+# (1) make the library
+if "$COMPILER" -dynamiclib -o library_path_lib.dylib library_path_lib.c 2>/dev/null 1>&2; then
+ # (2) do the test, without LIBRARY_PATH; should fail
+ if "$COMPILER" -nostdlib -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib 2>/dev/null 1>&2; then
+ true
+ else
+ # (3) do the test, with LIBRARY_PATH set; should pass
+ export LIBRARY_PATH=.
+ if "$COMPILER" -nostdlib -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib 2>/dev/null 1>&2; then
+ LIBRARY_PATH_SUPPORT=yes
+ fi
+ fi
+ rm -f library_path_test.o library_path_test
+else
+ echo "Unable to compile library; assuming LIBRARY_PATH works"
+ exit 1
+fi
+rm -f library_path_lib.dylib library_path_lib.o
+
+if [ "$LIBRARY_PATH_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "LIBRARY_PATH support not detected"
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "LIBRARY_PATH support detected"
+ exit 1
+fi
Property changes on: trunk/dports/aqua/qt4-mac/files/library_path/library_path.test
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.c
===================================================================
--- trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.c (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.c 2013-01-31 18:04:27 UTC (rev 102344)
@@ -0,0 +1 @@
+int test_cpath;
Added: trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.h
===================================================================
--- trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.h (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/library_path/library_path_lib.h 2013-01-31 18:04:27 UTC (rev 102344)
@@ -0,0 +1 @@
+extern int test_cpath;
Added: trunk/dports/aqua/qt4-mac/files/library_path/library_path_test.c
===================================================================
--- trunk/dports/aqua/qt4-mac/files/library_path/library_path_test.c (rev 0)
+++ trunk/dports/aqua/qt4-mac/files/library_path/library_path_test.c 2013-01-31 18:04:27 UTC (rev 102344)
@@ -0,0 +1,6 @@
+#include <library_path_lib.h>
+
+int main (void) {
+ test_cpath = 1;
+ return (0);
+}
Modified: trunk/dports/aqua/qt4-mac/files/patch-configure.diff
===================================================================
--- trunk/dports/aqua/qt4-mac/files/patch-configure.diff 2013-01-31 17:30:14 UTC (rev 102343)
+++ trunk/dports/aqua/qt4-mac/files/patch-configure.diff 2013-01-31 18:04:27 UTC (rev 102344)
@@ -1,5 +1,5 @@
---- configure.orig 2013-01-30 20:33:36.000000000 -0500
-+++ configure 2013-01-30 20:53:16.000000000 -0500
+--- configure.orig 2012-11-23 05:11:23.000000000 -0500
++++ configure 2013-01-31 12:49:12.000000000 -0500
@@ -918,12 +918,14 @@
CFG_ICU=auto
CFG_SYSTEM_PROXIES=no
@@ -48,7 +48,7 @@
system-proxies)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SYSTEM_PROXIES="$VAL"
-@@ -3451,6 +3463,38 @@
+@@ -3451,6 +3463,44 @@
CFG_MAC_XARCH=no
fi
@@ -58,6 +58,12 @@
+ exit 1
+fi
+
++# detect required support for LIBRARY_PATH
++if "$mactests/library_path/library_path.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests/library_path" ; then
++ echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the LIBRARY_PATH environment variable, which is required to compile qt4-mac using MacPorts when compiling on Mac OS X."
++ exit 1
++fi
++
+# detect required support for -fconstant-cfstrings
+if "$mactests/fconstant_cfstrings.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
+ echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the -fconstant-cfstrings flag, which is used extensively by the Qt build system when compiling on Mac OS X."
@@ -87,7 +93,7 @@
#auto-detect DWARF2 on the mac
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
-@@ -3460,15 +3504,6 @@
+@@ -3460,15 +3510,6 @@
fi
fi
@@ -103,7 +109,7 @@
# don't autodetect support for separate debug info on objcopy when
# cross-compiling as lots of toolchains seems to have problems with this
if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then
-@@ -3685,6 +3720,19 @@
+@@ -3685,6 +3726,19 @@
fi
QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
@@ -123,7 +129,7 @@
#bins
if [ -z "$QT_INSTALL_BINS" ]; then #default
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-@@ -4752,6 +4800,7 @@
+@@ -4752,6 +4806,7 @@
DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
@@ -131,7 +137,7 @@
BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
-@@ -4777,6 +4826,7 @@
+@@ -4777,6 +4832,7 @@
HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
@@ -139,7 +145,7 @@
HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
-@@ -4794,6 +4844,7 @@
+@@ -4794,6 +4850,7 @@
static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR";
static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
@@ -147,7 +153,7 @@
static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR";
static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR";
static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR";
-@@ -4812,6 +4863,7 @@
+@@ -4812,6 +4869,7 @@
static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR";
static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR";
@@ -155,7 +161,7 @@
static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR";
static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR";
static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR";
-@@ -4837,6 +4889,7 @@
+@@ -4837,6 +4895,7 @@
#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
@@ -163,7 +169,7 @@
#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
#define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
-@@ -4996,20 +5049,11 @@
+@@ -4996,20 +5055,11 @@
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
@@ -189,7 +195,7 @@
if [ '!' -z "$CFG_SDK" ]; then
echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
-@@ -7161,16 +7205,8 @@
+@@ -7161,16 +7211,8 @@
# set the global Mac deployment target. This is overridden on an arch-by-arch basis
# in some cases, see code further down
@@ -208,7 +214,7 @@
# disable Qt 3 support on VxWorks, Symbian and INTEGRITY
case "$XPLATFORM" in
-@@ -7447,6 +7483,10 @@
+@@ -7447,6 +7489,10 @@
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI"
fi
@@ -219,7 +225,7 @@
if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then
#On Mac we implicitly link against libz, so we
-@@ -7910,28 +7950,32 @@
+@@ -7910,28 +7956,32 @@
# env. variable.
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
@@ -268,7 +274,7 @@
fi
fi
-@@ -8689,6 +8733,7 @@
+@@ -8689,6 +8739,7 @@
QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
@@ -276,7 +282,7 @@
QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
EOF
-@@ -8727,6 +8772,11 @@
+@@ -8727,6 +8778,11 @@
echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp"
fi
@@ -288,7 +294,7 @@
#dump in the OPENSSL_LIBS info
if [ '!' -z "$OPENSSL_LIBS" ]; then
echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp"
-@@ -8886,6 +8936,7 @@
+@@ -8886,6 +8942,7 @@
else
echo "Debug .................. $CFG_DEBUG"
fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130131/237308d5/attachment-0001.html>
More information about the macports-changes
mailing list