source: trunk/dports/emulators/virtualbox/files/patch-build.diff @ 88127

Last change on this file since 88127 was 88127, checked in by royliu@…, 6 years ago

virtualbox: fix build for Xcode 3.2.6 and close ticket #32602

File size: 14.7 KB
  • Config.kmk

    old new  
    10921092# of VirtualBox binaries.  We request though that you always use something that
    10931093# clearly identifies your build and makes it clear that it is not one done by
    10941094# the VirtualBox team.
    1095  VBOX_BUILD_PUBLISHER = _OSE
     1095 VBOX_BUILD_PUBLISHER = _MacPorts
    10961096endif
    10971097
    10981098# Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
     
    17811781   if "$(VBOX_XCODE_VERSION_MAJOR)" == "4"
    17821782    VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
    17831783    VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    1784     VBOX_MACOSX_GCC_INFIX ?= -4.2
     1784    VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
    17851785   else
    17861786    VBOX_DEF_MACOSX_VERSION_MIN ?= 10.5
    17871787    VBOX_DARWIN_NO_COMPACT_LINKEDIT ?= $(VBOX_LD_no_compact_linkedit)
    1788     VBOX_MACOSX_GCC_INFIX ?= -4.2
     1788    VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
    17891789   endif
    17901790  else
    17911791   if $(VBOX_XCODE_VERSION_MAJOR) >= 4
     
    17931795   endif
    17941796   VBOX_DEF_MACOSX_VERSION_MIN ?= 10.4
    17951797   VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    1796    VBOX_MACOSX_GCC_INFIX ?= -4.0
     1798   VBOX_MACOSX_GCC_INFIX ?= -apple-4.0
    17971799  endif
    17981800 else
    17991801  if $(VBOX_XCODE_VERSION_MAJOR) < 4 && "$(VBOX_XCODE_VERSION)" != "3.2"
    18001802   $(error 64-bit darwin builds require Xcode 3.2 or later, you have $(VBOX_XCODE_VERSION))
    18011803  endif
    18021804  VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
    1803   VBOX_MACOSX_GCC_INFIX ?= -4.2
     1805  VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
    18041806  VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
    18051807 endif
    18061808 TOOL_GCC4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
     
    20632063VBOX_GCC32_CHECK_CXX = $(2)
    20642064else
    20652065VBOX_GCC_CHECK_CC = $(shell \
    2066    if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
     2066   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -xc /dev/null > /dev/null 2>&1; \
    20672067   then echo "$(1)"; \
    20682068   else echo "$(2)"; fi; )
    20692069
    20702070VBOX_GCC_CHECK_CXX = $(shell \
    2071    if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
     2071   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
    20722072   then echo "$(1)"; \
    20732073   else echo "$(2)"; fi; )
    20742074
    20752075VBOX_GCC_CHECK_LD = $(shell \
    2076    if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1 ;\
     2076   if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) -nostdlib -xc /dev/null > /dev/null 2>&1 ;\
    20772077   then echo "-Wl,$(1)"; \
    20782078   else echo "$(2)"; fi; )
    20792079
    20802080VBOX_GCC32_CHECK_CXX = $(shell \
    2081    if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
     2081   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
    20822082   then echo "$(1)"; \
    20832083   else echo "$(2)"; fi; )
    20842084endif
     
    39473947 # be cleaned up properly later some time (not important now).
    39483948 #
    39493949 ifeq ($(VBOX_PATH_QT4),)
    3950   ifeq ($(KBUILD_TARGET),darwin)
    3951    VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3952    ifeq ($(VBOX_PATH_QT4),)
    3953     ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
    3954      # Using the global installation (for OSE).
    3955      VBOX_PATH_QT4 ?= /usr
    3956      VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
    3957     endif
    3958    endif
    3959   else if1of ($(KBUILD_TARGET), win)
    3960    VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3961   else if1of ($(KBUILD_TARGET), solaris)
    3962    VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3963    ifneq ($(VBOX_PATH_QT4),)
    3964     VBOX_WITH_QT4_SUN = 1
    3965    endif
    3966   endif
    3967  endif
    3968  ifeq ($(VBOX_PATH_QT4),)
    39693950  if1of ($(USERNAME), bird)
    39703951   # gentoo (64-bit)
    39713952   VBOX_PATH_QT4          ?= /usr
  • new file LocalConfig.kmk

    - +  
     1VBOX_DEF_MACOSX_VERSION_MIN = @MACOSX_DEPLOYMENT_TARGET@
     2VBOX_DARWIN_NO_COMPACT_LINKEDIT =
     3VBOX_MACOS_10_5_WORKAROUND =
     4VBOX_PATH_APP_DOCS="@APPLICATIONS_DIR@/VirtualBox.app/Contents/MacOS"
     5VBOX_PATH_APP_PRIVATE="@APPLICATIONS_DIR@/VirtualBox.app/Contents/MacOS"
     6VBOX_PATH_APP_PRIVATE_ARCH="@APPLICATIONS_DIR@/VirtualBox.app/Contents/MacOS"
     7VBOX_PATH_SHARED_LIBS="@APPLICATIONS_DIR@/VirtualBox.app/Contents/MacOS"
     8VBOX_WITH_MULTIVERSION_PYTHON = 1
     9VBOX_WITH_TESTSUITE=
     10VBOX_WITH_TESTCASES=
     11kBuildGlobalDefaults_LD_DEBUG=
  • Makefile.kmk

    old new  
    182182# Install our Qt DLLs / Shared Objects / Frameworks.
    183183# Note: The installer fixes the darwin .dylibs when hardening is enabled.
    184184#
    185 ifeq ($(KBUILD_TARGET),darwin)
    186  INSTALLS += qt4-bin
    187  qt4-bin_MODE = 755
    188  qt4-bin_INST = $(INST_VIRTUALBOX)Contents/
    189  qt4-bin_SOURCES = $(foreach qtmod,$(VBOX_QT4_MOD_NAMES) \
    190         ,$(PATH_SDK_QT4_LIB)/$(qtmod).framework/Versions/4/$(qtmod)=>Frameworks/$(qtmod).framework/Versions/4/$(qtmod))
    191  ifdef VBOX_WITH_COCOA_QT
    192   qt4-bin_SOURCES += \
    193         $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
    194         $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
    195         $(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
    196  endif
    197  ifneq ($(wildcard $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib),)
    198   qt4-bin_SOURCES += \
    199         $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib=>MacOS/accessible/libqtaccessiblewidgets.dylib
    200  endif
    201  qt4-bin_SYMLINKS = $(foreach qtmod, $(VBOX_QT4_MOD_NAMES) \
    202                 ,Frameworks/$(qtmod).framework/$(qtmod)=>Versions/4/$(qtmod))
    203  ifdef VBOX_WITH_COCOA_QT
    204   qt4-bin_SYMLINKS += \
    205         Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
    206  endif
    207 else
    208  ifdef VBOX_WITH_QT4_SUN
    209   ifeq ($(KBUILD_TARGET),win)
    210    INSTALLS += qt4-bin
    211    qt4-bin_MODE = 755
    212    qt4-bin_INST = $(INST_BIN)
    213    qt4-bin_SOURCES = \
    214         $(foreach qtmod,$(VBOX_QT4_MOD_NAMES),$(VBOX_PATH_QT4_LIB)/$(qtmod)4$(SUFF_DLL)) \
    215         $(VBOX_PATH_QT4)/plugins/accessible/qtaccessiblewidgets4$(SUFF_DLL)=>accessible/qtaccessiblewidgets4$(SUFF_DLL)
    216   else
    217    INSTALLS += qt4-bin
    218    qt4-bin_MODE = 755
    219    qt4-bin_INST = $(INST_BIN)
    220    qt4-bin_SOURCES = \
    221         $(foreach qtmod,$(VBOX_QT4_MOD_NAMES),$(VBOX_PATH_QT4_LIB)/lib$(qtmod)$(SUFF_DLL).4) \
    222         $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets$(SUFF_DLL)=>accessible/libqtaccessiblewidgets$(SUFF_DLL)
    223   endif
    224  endif # VBOX_WITH_QT4_SUN
    225 endif
    226185
    227186
    228187#
  • configure

    old new  
    11001100check_sdl()
    11011101{
    11021102  test_header SDL
    1103   if [ "$OS" = "darwin" ]; then
    1104     if [ -f "/System/Library/Frameworks/SDL.framework/SDL" ]; then
    1105       PATH_SDK_LIBSDL="/System/Library/Frameworks/SDL.framework"
    1106     elif [ -f "/Library/Frameworks/SDL.framework/SDL" ]; then
    1107       PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
    1108     fi
    1109     if [ -n "$PATH_SDK_LIBSDL" ]; then
    1110       foundsdl=1
    1111       INCSDL="$PATH_SDK_LIBSDL/Headers"
    1112       FLDSDL="-framework SDL"
    1113     else
    1114       log_failure "SDL framework not found"
    1115       fail
    1116     fi
    1117   else
    11181103    if which_wrapper sdl-config > /dev/null; then
    11191104      FLGSDL=`sdl-config --cflags`
    11201105      INCSDL=`strip_I "$FLGSDL"`
     
    11231108      FLDSDL=
    11241109      foundsdl=1
    11251110    fi
    1126   fi
    11271111  [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
    11281112  if [ -n "$foundsdl" ]; then
    11291113    cat > $ODIR.tmp_src.cc << EOF
     
    14711455{
    14721456  foundqt4=
    14731457  test_header Qt4
    1474   if [ "$OS" = "darwin" ]; then
    1475     # First check if there is the internal version of Qt. If yes nothing else
    1476     # has to be done.
    1477     QT_INTERNAL=`/bin/ls -rd1 $PWD/tools/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/qt/* 2> /dev/null`
    1478     for t in $QT_INTERNAL; do
    1479         if [ -f "$t/Frameworks/QtCoreVBox.framework/QtCoreVBox" ]; then
    1480           cnf_append "VBOX_WITH_QT4_SUN" "1"
    1481           log_success "use internal version"
    1482           return
    1483         fi
    1484     done
    1485     # Now try the user provided directory and some of the standard directories.
    1486     QT_TRIES="$QT4DIR /System/Library /Library"
    1487     for t in $QT_TRIES; do
    1488         if [ -f "$t/Frameworks/QtCore.framework/QtCore" ]; then
    1489           PATH_SDK_QT4="$t"
    1490           break
    1491         fi
    1492     done
    1493     # Add the necessary params for building the test application
    1494     if [ -n "$PATH_SDK_QT4" ]; then
    1495       foundqt4=1
    1496       INCQT4=-I$PATH_SDK_QT4/Frameworks/QtCore.framework/Headers
    1497       LIBQT4=-F$PATH_SDK_QT4/Frameworks
    1498       FLGQT4="-framework QtCore"
    1499     else
    1500       log_failure "Qt4 framework not found (can be disabled using --disable-qt4)"
    1501       fail
    1502     fi
    1503   else
    15041458    if [ $QT4DIR_PKGCONFIG -eq 1 ]; then
    15051459      # default is to use pkg-config
    15061460      if which_wrapper pkg-config > /dev/null; then
    15071461        # this braindead path is necessary for mdv2008.1
    15081462        qt4_ver=`\
    1509             PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
    15101463            pkg-config QtCore --modversion 2>> $LOG`
    15111464        if [ $? -ne 0 ]; then
    15121465          log_failure "QtCore not found"
    15131466          fail
    15141467        else
    15151468          FLGQT4=`\
    1516               PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
    15171469              pkg-config QtCore --cflags`
    15181470          INCQT4=`strip_I "$FLGQT4"`
    15191471          LIBQT4=`\
    1520               PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
    15211472              PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
    15221473              pkg-config QtCore --libs`
    15231474          foundqt4=1
     
    15591510        fi
    15601511      done
    15611512    fi
    1562   fi
    15631513  if [ -n "$foundqt4" ]; then
    15641514    cat > $ODIR.tmp_src.cc << EOF
    15651515#include <cstdio>
     
    15791529    [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
    15801530    if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
    15811531      if test_execute_path "`strip_L "$LIBQT4"`"; then
    1582         if [ "$OS" = "darwin" ]; then
    1583           # Successful build & run the test application so add the necessary
    1584           # params to AutoConfig.kmk
    1585           cnf_append "PATH_SDK_QT4_INC" "$PATH_SDK_QT4/Frameworks"
    1586           cnf_append "PATH_SDK_QT4_LIB" "$PATH_SDK_QT4/Frameworks"
    1587           cnf_append "PATH_SDK_QT4" "$PATH_SDK_QT4/Frameworks"
    1588           # Check for the moc tool in the Qt directory found & some standard
    1589           # directories.
    1590           for q in $PATH_SDK_QT4 /usr /Developer/Tools/Qt; do
    1591             if which_wrapper "$q/bin/moc" > /dev/null; then
    1592               cnf_append "PATH_TOOL_QT4" "$q"
    1593               cnf_append "PATH_TOOL_QT4_BIN" "$q/bin"
    1594             fi
    1595           done
    1596         else
    15971532          # strip .../QtCore as we add components ourself
    15981533          INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
    15991534          # store only the first path, remove all other pathes
     
    16391574              fi
    16401575            fi
    16411576          done
    1642         fi
    16431577      fi
    16441578    else
    16451579      log_failure "qt4 not working"
     
    22422176  WITH_PULSE=0
    22432177  WITH_DBUS=0
    22442178  WITH_KMODS=0
    2245   BUILD_LIBXSLT=1
    2246   BUILD_LIBXML2=1
    22472179  [ $OSE -eq 1 ] || BUILD_LIBCURL=1
    22482180  [ $OSE -eq 1 ] || BUILD_LIBSSL=1
    22492181fi
     
    22812213    --with-openssl-dir=*)
    22822214      OPENSSLDIR=`echo $option | cut -d'=' -f2`
    22832215      INCCRYPTO="-I${OPENSSLDIR}/include"
    2284       LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a"
     2216      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.dylib ${OPENSSLDIR}/lib/libssl.dylib"
    22852217      ;;
    22862218    --with-gsoap-dir=*)
    22872219      GSOAP=`echo $option | cut -d'=' -f2`
  • kBuild/units/qt4.kmk

    old new  
    7070 ifeq ($(PATH_SDK_QT4),)
    7171  # If target == host, try look for Qt in the various platform specific places.
    7272  ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
    73    ifeq ($(KBUILD_TARGET),darwin)
    74     PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
    75    else ifeq ($(KBUILD_TARGET),win)
    76     # No idea here yet...
    77    else ifeq ($(KBUILD_TARGET),ose)
    78     # No port...
    79    else
    8073    # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work.
    8174    # Try find the general root of thing by looking for the qt3to4 program, if not found, then look for rcc.
    8275    PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \
     
    169162     endif
    170163
    171164    endif
    172    endif # Unices
    173165  endif
    174166  # Found it?
    175167  ifeq ($(PATH_SDK_QT4),)
     
    184176
    185177# Libraries can be in either Frameworks or lib depending on how you
    186178# build it on the mac. The .dmg installs into Frameworks but builds into lib.
    187 ifeq ($(KBUILD_TARGET),darwin)
    188  ifndef PATH_SDK_QT4_LIB
    189   ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
    190    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
    191   else
    192    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    193   endif
    194  endif
    195 else
    196  PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    197  PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
    198 endif
     179PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
     180PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
    199181
    200182# The bits that kBuild picks up.
    201183#  (nothing here)
     
    959941        $($(target)_QT_INFIX.$(bld_trg_cpu)) \
    960942        $($(target)_QT_INFIX.$(bld_type)) \
    961943        $($(target)_QT_INFIX))
    962 ifeq ($(bld_trg),darwin)
    963  # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
    964  $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    965  $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    966  $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
    967  $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
    968 else
    969  ifeq ($(bld_trg),win)
    970   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )
    971   ifeq ($(tool_do),LINK_PROGRAM)
    972    $(eval $(target)_LIBS   += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )
    973   endif
    974  else
    975   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
    976  endif
    977  $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
    978 endif
     944$(eval $(target)_LIBS      += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
     945$(eval $(target)_INCS      += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
    979946$(eval $(target)_DEFS      += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
    980947
    981948
Note: See TracBrowser for help on using the repository browser.