Ticket #28469: patch-build.diff

File patch-build.diff, 15.5 KB (added by carsomyr@…, 13 years ago)

The build patch (revision 3).

  • Config.kmk

    old new  
    10941094# of VirtualBox binaries.  We request though that you always use something that
    10951095# clearly identifies your build and makes it clear that it is not one done by
    10961096# the VirtualBox team.
    1097  VBOX_BUILD_PUBLISHER = _OSE
     1097 VBOX_BUILD_PUBLISHER = _MacPorts
    10981098endif
    10991099
    11001100# Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
     
    20652065VBOX_GCC32_CHECK_CXX = $(2)
    20662066else
    20672067VBOX_GCC_CHECK_CC = $(shell \
    2068    if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
     2068   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -xc /dev/null > /dev/null 2>&1; \
    20692069   then echo "$(1)"; \
    20702070   else echo "$(2)"; fi; )
    20712071
    20722072VBOX_GCC_CHECK_CXX = $(shell \
    2073    if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
     2073   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
    20742074   then echo "$(1)"; \
    20752075   else echo "$(2)"; fi; )
    20762076
    20772077VBOX_GCC_CHECK_LD = $(shell \
    2078    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 ;\
     2078   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 ;\
    20792079   then echo "-Wl,$(1)"; \
    20802080   else echo "$(2)"; fi; )
    20812081
    20822082VBOX_GCC32_CHECK_CXX = $(shell \
    2083    if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
     2083   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
    20842084   then echo "$(1)"; \
    20852085   else echo "$(2)"; fi; )
    20862086endif
     
    39453945 # be cleaned up properly later some time (not important now).
    39463946 #
    39473947 ifeq ($(VBOX_PATH_QT4),)
    3948   ifeq ($(KBUILD_TARGET),darwin)
    3949    VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3950    ifeq ($(VBOX_PATH_QT4),)
    3951     ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
    3952      # Using the global installation (for OSE).
    3953      VBOX_PATH_QT4 ?= /usr
    3954      VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
    3955     endif
    3956    endif
    3957   else if1of ($(KBUILD_TARGET), win)
    3958    VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3959   else if1of ($(KBUILD_TARGET), solaris)
    3960    VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
    3961    ifneq ($(VBOX_PATH_QT4),)
    3962     VBOX_WITH_QT4_SUN = 1
    3963    endif
    3964   endif
    3965  endif
    3966  ifeq ($(VBOX_PATH_QT4),)
    39673948  if1of ($(USERNAME), bird)
    39683949   # gentoo (64-bit)
    39693950   VBOX_PATH_QT4          ?= /usr
  • new file LocalConfig.kmk

    - +  
     1VBOX_DEF_MACOSX_VERSION_MIN = 10.6
     2VBOX_DARWIN_NO_COMPACT_LINKEDIT =
     3VBOX_MACOS_10_5_WORKAROUND =
  • 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  
    9696BUILD_LIBCURL=
    9797BUILD_LIBSSL=
    9898PASSIVE_MESA=0
    99 CC="gcc"
     99CC="@CONFIGURE.CC@"
    100100CC32=""
    101101CC64=""
    102 CXX="g++"
     102CXX="@CONFIGURE.CXX@"
    103103CXX32=""
    104104CXX64=""
    105105BCC="bcc"
     
    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 \
     
    163156     endif
    164157
    165158    endif
    166    endif # Unices
    167159  endif
    168160  # Found it?
    169161  ifeq ($(PATH_SDK_QT4),)
     
    178170
    179171# Libraries can be in either Frameworks or lib depending on how you
    180172# build it on the mac. The .dmg installs into Frameworks but builds into lib.
    181 ifeq ($(KBUILD_TARGET),darwin)
    182  ifndef PATH_SDK_QT4_LIB
    183   ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
    184    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
    185   else
    186    PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    187   endif
    188  endif
    189 else
    190  PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
    191  PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
    192 endif
     173PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
     174PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
    193175
    194176# The bits that kBuild picks up.
    195177#  (nothing here)
     
    953935        $($(target)_QT_INFIX.$(bld_trg_cpu)) \
    954936        $($(target)_QT_INFIX.$(bld_type)) \
    955937        $($(target)_QT_INFIX))
    956 ifeq ($(bld_trg),darwin)
    957  # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
    958  $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    959  $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
    960  $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
    961  $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
    962 else
    963  ifeq ($(bld_trg),win)
    964   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )
    965   ifeq ($(tool_do),LINK_PROGRAM)
    966    $(eval $(target)_LIBS   += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )
    967   endif
    968  else
    969   $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
    970  endif
    971  $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
    972 endif
     938$(eval $(target)_LIBS      += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
     939$(eval $(target)_INCS      += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
    973940$(eval $(target)_DEFS      += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
    974941
    975942
  • src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    old new  
    14541454
    14551455    /* Check for the already registered image */
    14561456    CVirtualBox vbox = vboxGlobal().virtualBox();
    1457     QString name = QString("VBoxGuestAdditions_%1.iso").arg(vbox.GetVersion().remove("_OSE"));
     1457    QString name = QString("VBoxGuestAdditions_%1.iso").arg(vbox.GetVersion().remove("_MacPorts"));
    14581458
    14591459    CMediumVector vec = vbox.GetDVDImages();
    14601460    for (CMediumVector::ConstIterator it = vec.begin(); it != vec.end(); ++ it)
     
    14701470    int result = msgCenter().cannotFindGuestAdditions(QDir::toNativeSeparators(strSrc1), QDir::toNativeSeparators(strSrc2));
    14711471    if (result == QIMessageBox::Yes)
    14721472    {
    1473         QString source = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_OSE")) + name;
     1473        QString source = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_MacPorts")) + name;
    14741474        QString target = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(name);
    14751475
    14761476        UIDownloaderAdditions *pDl = UIDownloaderAdditions::create();
  • src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    old new  
    28332833        UIDownloaderUserManual *pDl = UIDownloaderUserManual::create();
    28342834        /* Configure User Manual downloader: */
    28352835        CVirtualBox vbox = vboxGlobal().virtualBox();
    2836         pDl->addSource(QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_OSE")) + strShortFileName);
     2836        pDl->addSource(QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_MacPorts")) + strShortFileName);
    28372837        pDl->addSource(QString("http://download.virtualbox.org/virtualbox/") + strShortFileName);
    28382838        pDl->setTarget(strUserManualFileName2);
    28392839        pDl->setParentWidget(mainWindowShown());