source: trunk/dports/aqua/qt4-mac/files/patch-configure.diff @ 96486

Last change on this file since 96486 was 96486, checked in by michaelld@…, 7 years ago

qt4-mac :
+ Corrects detection of corewlan +universal builds.
+ Removes warnings when building on 10.8.
+ also addresses tickets:

  • #35523 : correctly select the "pg_config" for psql variant selected (if any), to allow building as universal;
  • #34934 : correctly use mach timer info to compute time;
  • #34902 : patch Qt QMake build system to allow full compilation on 32-bit systems;
  • #34864 : correct +framework header links; and
  • #34856 : disable ccache for now; try to fix later; it's involved.
File size: 10.8 KB
  • configure

    old new  
    901901QT_INSTALL_DOCS=
    902902QT_INSTALL_HEADERS=
    903903QT_INSTALL_LIBS=
     904QT_INSTALL_FRAMEWORKS=
    904905QT_INSTALL_BINS=
    905906QT_INSTALL_PLUGINS=
    906907QT_INSTALL_IMPORTS=
     
    13581359    libdir)
    13591360        QT_INSTALL_LIBS="$VAL"
    13601361        ;;
     1362    frameworkdir)
     1363        QT_INSTALL_FRAMEWORKS="$VAL"
     1364        ;;
    13611365    qtnamespace)
    13621366        QT_NAMESPACE="$VAL"
    13631367        ;;
     
    36493653    fi
    36503654    QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
    36513655
     3656    #frameworks
     3657    if [ -z "$QT_INSTALL_FRAMEWORKS" ]; then #default
     3658        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
     3659            if [ "$PLATFORM_MAC" = "yes" ]; then
     3660                if [ "$CFG_FRAMEWORK" = "yes" ]; then
     3661                    QT_INSTALL_FRAMEWORKS="/Libraries/Frameworks"
     3662                fi
     3663            fi
     3664        fi
     3665        [ -z "$QT_INSTALL_FRAMEWORKS" ] && QT_INSTALL_FRAMEWORKS="$QT_INSTALL_PREFIX/Library/Frameworks" #fallback
     3666    fi
     3667    QT_INSTALL_FRAMEWORKS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_FRAMEWORKS"`
     3668
    36523669    #bins
    36533670    if [ -z "$QT_INSTALL_BINS" ]; then #default
    36543671        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
     
    47004717DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"`
    47014718HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"`
    47024719LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"`
     4720FRAMEWORKS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_frameworkspath=$QT_INSTALL_FRAMEWORKS"`
    47034721BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"`
    47044722PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"`
    47054723IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"`
     
    47254743    HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
    47264744    HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
    47274745    HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
     4746    HOSTFRAMEWORKS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_frameworkspath=$QT_HOST_PREFIX/Library/Frameworks"`
    47284747    HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
    47294748    HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
    47304749    HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
     
    47424761static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
    47434762static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
    47444763static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
     4764static const char qt_configure_frameworks_path_str   [256 + 12] = "$HOSTFRAMEWORKS_PATH_STR";
    47454765static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
    47464766static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
    47474767static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
     
    47604780static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
    47614781static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
    47624782static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
     4783static const char qt_configure_frameworks_path_str   [256 + 18] = "$FRAMEWORKS_PATH_STR";
    47634784static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
    47644785static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
    47654786static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
     
    47854806#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
    47864807#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
    47874808#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
     4809#define QT_CONFIGURE_FRAMEWORKS_PATH qt_configure_frameworks_path_str + 18;
    47884810#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
    47894811#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
    47904812#define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12;
     
    49444966            EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
    49454967            EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
    49464968            EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
    4947             if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
    4948                 X86_CFLAGS="-arch i386"
    4949                 X86_LFLAGS="-arch i386"
    4950                 EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
    4951                 EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
    4952                 EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
    4953             fi
    4954             if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
    4955                 PPC_CFLAGS="-arch ppc"
    4956                 PPC_LFLAGS="-arch ppc"
    4957                 EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
    4958                 EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"
    4959                 EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"
    4960             fi
     4969           ARCH_CFLAGS="-arch @ARCHES@"
     4970           ARCH_LFLAGS="-arch @ARCHES@"
     4971           EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"
     4972           EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"
     4973           EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"
    49614974            if [ '!' -z "$CFG_SDK" ]; then
    49624975                echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
    49634976                echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
     
    53895402        psql)
    53905403            if [ "$CFG_SQL_psql" != "no" ]; then
    53915404                # Be careful not to use native pg_config when cross building.
    5392                 if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
    5393                     QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null`
    5394                     QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null`
     5405                if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" @PATH_TO_PG_CONFIG@pg_config >/dev/null 2>&1; then
     5406                    QT_CFLAGS_PSQL=`@PATH_TO_PG_CONFIG@pg_config --includedir 2>/dev/null`
     5407                    QT_LFLAGS_PSQL=`@PATH_TO_PG_CONFIG@pg_config --libdir 2>/dev/null`
    53955408                fi
    53965409                [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
    53975410                [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
     
    70427055
    70437056# set the global Mac deployment target. This is overridden on an arch-by-arch basis
    70447057# in some cases, see code further down
    7045 case "$PLATFORM,$CFG_MAC_COCOA" in
    7046     macx*,yes)
    7047         # Cocoa
    7048         QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
    7049         ;;
    7050     macx*,no)
    7051         # gcc, Carbon
    7052         QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
    7053         ;;
    7054 esac
     7058
     7059QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@
    70557060
    70567061# disable Qt 3 support on VxWorks, Symbian and INTEGRITY
    70577062case "$XPLATFORM" in
     
    77827787# env. variable.
    77837788if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
    77847789    if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
    7785         QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
    7786         QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
    7787         QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"
    7788         QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"
     7790        QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7791        QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7792        QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7793        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
    77897794    fi
    77907795    if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then
    7791         QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
    7792         QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
    7793         QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"
    7794         QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"
     7796        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7797        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7798        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7799        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
    77957800    fi
    77967801    if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then
    7797         QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
    7798         QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
    7799         QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"
    7800         QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"
     7802        QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7803        QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7804        QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7805        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
    78017806    fi
    78027807    if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then
    7803         QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
    7804         QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
    7805         QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"
    7806         QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"
     7808        QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7809        QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7810        QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
     7811        QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"
    78077812    fi
    78087813fi
    78097814
     
    85508555QMAKE_RCC        = \$\$QT_BUILD_TREE/bin/rcc
    85518556QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
    85528557QMAKE_INCDIR_QT  = \$\$QT_BUILD_TREE/include
     8558QMAKE_FRAMEWORKDIR_QT = \$\$QT_BUILD_TREE/Library/Frameworks
    85538559QMAKE_LIBDIR_QT  = \$\$QT_BUILD_TREE/lib
    85548560
    85558561EOF
Note: See TracBrowser for help on using the repository browser.