[vbox-dev] my patches for VirtualBox-4.2.0 on Fedora 17+
Michael Thayer
michael.thayer at oracle.com
Thu Sep 27 05:52:40 PDT 2012
Hello Sérgio, Felix,
On 09/26/2012 10:02 AM, Michael Thayer wrote:
[...]
> On 09/26/2012 05:13 AM, Sérgio Basto wrote:
>> As you may know, when we packaging rpms in Fedora, we try remove
>> sources bundle.
>> I done with X11, removing src/VBox/Additions/x11/x11include and
>> src/VBox/Additions/x11/x11stubs
>> I don't want that you do that upstream, but I had to modify some source
>> vboxmouse.c, fakedri_drv.c and VBoxGuestR3LibRuntimeXF86.cpp
> Wouldn't it be more sensible just to include a build option upstream to
> only build one module against the system headers? I'm not a fan of
> downstream patches either, so I'm all for finding a way to make the
> upstream code usable for you. I'll give it a bit of a think and post a
> patch suggestion.
Here it is. Comments welcome!
Regards,
Michael
$ svn di src/VBox/Additions/x11/vboxvideo/Makefile.kmk
src/VBox/Additions/x11/vboxmouse/Makefile.kmk
Index: src/VBox/Additions/x11/vboxvideo/Makefile.kmk
===================================================================
--- src/VBox/Additions/x11/vboxvideo/Makefile.kmk (revision 80959)
+++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk (working copy)
@@ -21,7 +21,9 @@
#
# Include sub-makefile(s).
#
-include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+ifndef VBOX_USE_SYSTEM_XORG_HEADERS
+ include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
+endif
vboxvideo_70_DEFS := \
IN_MODULE XORG_7X RENDER=1 IN_RT_STATIC
@@ -320,10 +322,30 @@
vboxvideo_drv_113_SOURCES := $(vboxvideo_drv_15_SOURCES)
+ifdef VBOX_USE_SYSTEM_XORG_HEADERS
+ # Build using local X.Org headers. We assume X.Org Server 1.7 or later.
+ DLLS := $(filter-out vboxvideo_drv_%,$(DLLS)) vboxvideo_drv_system
+ SYSMODS := $(filter-out vboxvideo_drv%,$(SYSMODS))
+ vboxvideo_drv_system_TEMPLATE = VBOXGUESTR3XORGMOD
+ vboxvideo_drv_system_CFLAGS := \
+ $(vboxvideo_drv_70_CFLAGS) -include xorg-server.h
+ vboxvideo_drv_system_DEFS := $(vboxvideo_15_DEFS)
+ vboxvideo_drv_system_INCS += \
+ $(PATH_ROOT)/src/VBox/Runtime/include \
+ /usr/include/x11 \
+ /usr/include/X11/dri \
+ /usr/include/libdrm \
+ /usr/include/xorg \
+ /usr/include/pixman-1
+ vboxvideo_drv_system_SOURCES := $(vboxvideo_drv_15_SOURCES)
+endif
+
+
# Check the undefined symbols in the X.Org modules against lists of
allowed
# symbols. Not very elegant, but it will catch problems early.
ifdef VBOX_WITH_TESTCASES
# ifndef VBOX_ONLY_ADDITIONS
+ ifndef VBOX_USE_SYSTEM_XORG_HEADERS
if1of ($(KBUILD_TARGET),linux solaris)
ifeq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
ifndef VBOX_ONLY_SDK
@@ -446,6 +468,7 @@
endif # ! VBOX_ONLY_SDK
endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
endif # eq ($(KBUILD_TARGET),linux)
+ endif # ! VBOX_USE_SYSTEM_XORG_HEADERS
# endif # ! VBOX_ONLY_ADDITIONS
endif # VBOX_WITH_TESTCASES
Index: src/VBox/Additions/x11/vboxmouse/Makefile.kmk
===================================================================
--- src/VBox/Additions/x11/vboxmouse/Makefile.kmk (revision 80959)
+++ src/VBox/Additions/x11/vboxmouse/Makefile.kmk (working copy)
@@ -238,10 +238,20 @@
endif # neq ($(KBUILD_TARGET),linux)
+
+ifdef VBOX_USE_SYSTEM_XORG_HEADERS
+ # As vboxmouse_drv is not needed at all for X.Org Server 1.7 and later
do not
+ # build it in this case.
+ DLLS := $(filter-out vboxmouse_drv_%,$(DLLS))
+ SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS))
+endif
+
+
# Check the undefined symbols in the X.Org modules against lists of
allowed
# symbols. Not very elegant, but it will catch problems early.
ifdef VBOX_WITH_TESTCASES
# ifndef VBOX_ONLY_ADDITIONS
+ ifndef VBOX_USE_SYSTEM_XORG_HEADERS
ifeq ($(KBUILD_TARGET),linux)
ifeq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
ifndef VBOX_ONLY_SDK
@@ -360,6 +370,7 @@
endif # ! VBOX_ONLY_SDK
endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
endif # eq ($(KBUILD_TARGET),linux)
+ endif # ! VBOX_USE_SYSTEM_XORG_HEADERS
# endif # ! VBOX_ONLY_ADDITIONS
endif # VBOX_WITH_TESTCASES
--
ORACLE Deutschland B.V. & Co. KG Michael Thayer
Werkstrasse 24 VirtualBox engineering
71384 Weinstadt, Germany mailto:michael.thayer at oracle.com
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher
More information about the vbox-dev
mailing list