summaryrefslogtreecommitdiffstats
path: root/testing/xf86-video-virtualbox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-09-16 14:01:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-09-16 14:20:57 +0000
commit133362eb053d4b7b9e95a2878518bb8c83e0c87a (patch)
tree170eb021c841da4f989b5018a4bac3134ef8ca64 /testing/xf86-video-virtualbox
parent468668c8211152668d2246f4c165afbba9d66640 (diff)
downloadaports-133362eb053d4b7b9e95a2878518bb8c83e0c87a.tar.bz2
aports-133362eb053d4b7b9e95a2878518bb8c83e0c87a.tar.xz
testing/xf86-video-virtualbox: new aport
Xorg Virtual box video driver http://virtualbox.org ref #1349
Diffstat (limited to 'testing/xf86-video-virtualbox')
-rw-r--r--testing/xf86-video-virtualbox/APKBUILD73
-rw-r--r--testing/xf86-video-virtualbox/LocalConfig.kmk13
-rw-r--r--testing/xf86-video-virtualbox/futimens.patch16
-rw-r--r--testing/xf86-video-virtualbox/uclibc-gnu_linux.patch11
-rw-r--r--testing/xf86-video-virtualbox/uclibc-spawn.patch26
-rw-r--r--testing/xf86-video-virtualbox/virtualbox-4-makeself-check.patch10
-rw-r--r--testing/xf86-video-virtualbox/xf86-video-virtualbox-4-makeself-check.patch10
-rw-r--r--testing/xf86-video-virtualbox/xf86-video-virtualbox-link-lazy.patch16
8 files changed, 175 insertions, 0 deletions
diff --git a/testing/xf86-video-virtualbox/APKBUILD b/testing/xf86-video-virtualbox/APKBUILD
new file mode 100644
index 000000000..9821c404c
--- /dev/null
+++ b/testing/xf86-video-virtualbox/APKBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xf86-video-virtualbox
+pkgdesc="Xorg Virtual box video driver"
+pkgver=4.2.0
+_ver=${pkgver/_rc/_RC}
+pkgrel=0
+arch="all"
+url='http://virtualbox.org'
+license="GPL custom"
+makedepends="
+ dev86 iasl kbuild yasm
+ libxinerama-dev libxrandr-dev libxmu-dev libxdmcp-dev libxau-dev
+ libxext-dev libxfixes-dev libiconv-dev libx11-dev xorg-server-dev"
+source="http://download.virtualbox.org/virtualbox/$_ver/VirtualBox-$_ver.tar.bz2
+ uclibc-gnu_linux.patch
+ futimens.patch
+ uclibc-spawn.patch
+ xf86-video-virtualbox-4-makeself-check.patch
+ xf86-video-virtualbox-link-lazy.patch
+ LocalConfig.kmk
+ "
+
+_builddir="$srcdir/VirtualBox-${_ver}"
+
+prepare() {
+ cd "$_builddir"
+ local i
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ # the kmk_sed they ship and use is linked to glibc...
+ sed -i -e 's:KBUILD_SED=.*:KBUILD_SED="busybox sed":' configure
+ rm -r kBuild/bin tools
+ cp "$srcdir"/LocalConfig.kmk .
+}
+
+build() {
+ cd "$_builddir"
+ cp "$srcdir/LocalConfig.kmk" .
+ ./configure --disable-docs \
+ --nofatal \
+ --disable-java \
+ --disable-pulse \
+ --disable-opengl \
+ --disable-kmods \
+ --disable-xpcom \
+ --disable-sdl-ttf \
+ --build-headless \
+ || return 1
+ . ./env.sh
+ for i in Runtime Additions/common/VBoxGuestLib \
+ Additions/x11/x11stubs Additions/x11/vboxvideo; do
+ cd "$_builddir"/src/VBox/$i
+ kmk TOOL_YASM_AS=yasm || return 1
+ done
+}
+
+package() {
+ cd "$_builddir"/out/linux.*/release/bin/additions
+ install -Dm755 vboxvideo_drv_112.so \
+ "$pkgdir"/usr/lib/xorg/modules/drivers/vboxvideo_drv.so
+}
+
+md5sums="691b4134983ce7d89b9fb683305cb647 VirtualBox-4.2.0.tar.bz2
+072ee2114b3771e7bdbff5211f342755 uclibc-gnu_linux.patch
+10f65154d3ff17d88fad5ed384e20276 futimens.patch
+cbf8efac5a1bfc3ac7c97f875b03e678 uclibc-spawn.patch
+44efb3c4be214daa453a317d527f1f30 xf86-video-virtualbox-4-makeself-check.patch
+383ef2c2f6cc6fcbbf4eba8391e4fa89 xf86-video-virtualbox-link-lazy.patch
+c9eeb26fa65a0cf2c086a724cded4932 LocalConfig.kmk"
diff --git a/testing/xf86-video-virtualbox/LocalConfig.kmk b/testing/xf86-video-virtualbox/LocalConfig.kmk
new file mode 100644
index 000000000..788faa240
--- /dev/null
+++ b/testing/xf86-video-virtualbox/LocalConfig.kmk
@@ -0,0 +1,13 @@
+VBOX_WITH_TESTCASES :=
+VBOX_WITH_TESTSUITE :=
+
+KBUILD_MSG_STYLE := brief
+
+## paths, origin, hardening
+VBOX_WITH_HARDENING := 2
+VBOX_WITH_ORIGIN :=
+VBOX_ONLY_ADDITIONS := 1
+
+TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.release =
+TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS)
+
diff --git a/testing/xf86-video-virtualbox/futimens.patch b/testing/xf86-video-virtualbox/futimens.patch
new file mode 100644
index 000000000..f85e1ae6e
--- /dev/null
+++ b/testing/xf86-video-virtualbox/futimens.patch
@@ -0,0 +1,16 @@
+--- ./src/VBox/Runtime/r3/posix/fileio2-posix.cpp.orig
++++ ./src/VBox/Runtime/r3/posix/fileio2-posix.cpp
+@@ -165,7 +165,12 @@
+
+ /* XXX this falls back to utimes("/proc/self/fd/...",...) for older kernels/glibcs and this
+ * will not work for hardened builds where this directory is owned by root.root and mode 0500 */
+- if (futimes(RTFileToNative(hFile), aTimevals))
++ struct timespec aTimespecs[2] = {
++ { aTimevals[0].tv_sec, aTimevals[0].tv_usec * 1000 },
++ { aTimevals[1].tv_sec, aTimevals[1].tv_usec * 1000 },
++ };
++
++ if (futimens(RTFileToNative(hFile), aTimespecs))
+ {
+ int rc = RTErrConvertFromErrno(errno);
+ Log(("RTFileSetTimes(%RTfile,%p,%p,,): returns %Rrc\n", hFile, pAccessTime, pModificationTime, rc));
diff --git a/testing/xf86-video-virtualbox/uclibc-gnu_linux.patch b/testing/xf86-video-virtualbox/uclibc-gnu_linux.patch
new file mode 100644
index 000000000..b227d55b1
--- /dev/null
+++ b/testing/xf86-video-virtualbox/uclibc-gnu_linux.patch
@@ -0,0 +1,11 @@
+--- ./src/libs/kStuff/kStuff/include/k/kDefs.h.orig
++++ ./src/libs/kStuff/kStuff/include/k/kDefs.h
+@@ -82,7 +82,7 @@
+ # define K_OS K_OS_DRAGONFLY
+ # elif defined(__FreeBSD__) /*??*/
+ # define K_OS K_OS_FREEBSD
+-# elif defined(__gnu_linux__)
++# elif defined(__linux__)
+ # define K_OS K_OS_LINUX
+ # elif defined(__NetBSD__) /*??*/
+ # define K_OS K_OS_NETBSD
diff --git a/testing/xf86-video-virtualbox/uclibc-spawn.patch b/testing/xf86-video-virtualbox/uclibc-spawn.patch
new file mode 100644
index 000000000..98b4e8ad6
--- /dev/null
+++ b/testing/xf86-video-virtualbox/uclibc-spawn.patch
@@ -0,0 +1,26 @@
+--- ./src/VBox/Runtime/r3/posix/process-creation-posix.cpp.orig
++++ ./src/VBox/Runtime/r3/posix/process-creation-posix.cpp
+@@ -48,6 +48,9 @@
+ * whether it is started detached or not. */
+ # define HAVE_POSIX_SPAWN 1
+ #endif
++#if defined(__UCLIBC__)
++#undef HAVE_POSIX_SPAWN
++#endif
+ #ifdef HAVE_POSIX_SPAWN
+ # include <spawn.h>
+ #endif
+@@ -103,11 +106,9 @@
+ if (spwd)
+ pw->pw_passwd = spwd->sp_pwdp;
+
+- /* be reentrant */
+- struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data));
+- char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data);
++ /* NOT reentrant */
++ char *pszEncPasswd = crypt(pszPasswd, pw->pw_passwd);
+ int fCorrect = !strcmp(pszEncPasswd, pw->pw_passwd);
+- RTMemTmpFree(data);
+ if (!fCorrect)
+ return VERR_PERMISSION_DENIED;
+
diff --git a/testing/xf86-video-virtualbox/virtualbox-4-makeself-check.patch b/testing/xf86-video-virtualbox/virtualbox-4-makeself-check.patch
new file mode 100644
index 000000000..e1fcb8c2f
--- /dev/null
+++ b/testing/xf86-video-virtualbox/virtualbox-4-makeself-check.patch
@@ -0,0 +1,10 @@
+--- VirtualBox-4.0.0_OSE/configure
++++ VirtualBox-4.0.0_OSE/configure
+@@ -2527,7 +2527,6 @@
+ check_compiler_h
+ [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
+ # tools/common/makeself*
+- [ $OSE -ge 1 ] && check_makeself
+ fi
+
+ [ -n "$SETUP_WINE" ] && setup_wine
diff --git a/testing/xf86-video-virtualbox/xf86-video-virtualbox-4-makeself-check.patch b/testing/xf86-video-virtualbox/xf86-video-virtualbox-4-makeself-check.patch
new file mode 100644
index 000000000..e1fcb8c2f
--- /dev/null
+++ b/testing/xf86-video-virtualbox/xf86-video-virtualbox-4-makeself-check.patch
@@ -0,0 +1,10 @@
+--- VirtualBox-4.0.0_OSE/configure
++++ VirtualBox-4.0.0_OSE/configure
+@@ -2527,7 +2527,6 @@
+ check_compiler_h
+ [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
+ # tools/common/makeself*
+- [ $OSE -ge 1 ] && check_makeself
+ fi
+
+ [ -n "$SETUP_WINE" ] && setup_wine
diff --git a/testing/xf86-video-virtualbox/xf86-video-virtualbox-link-lazy.patch b/testing/xf86-video-virtualbox/xf86-video-virtualbox-link-lazy.patch
new file mode 100644
index 000000000..5bb605419
--- /dev/null
+++ b/testing/xf86-video-virtualbox/xf86-video-virtualbox-link-lazy.patch
@@ -0,0 +1,16 @@
+2012-02-26 Magnus Granberg <zorry@gentoo.org>
+
+ #394757
+ * Config.kmk TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux add -Wl,-z,lazy
+
+--- ./Config.kmk 2011-12-19 13:58:30.000000000 +0100
++++ ./Config.kmk 2012-02-26 12:40:07.497810044 +0100
+@@ -4429,7 +4429,7 @@ else # the gcc guys
+ TEMPLATE_VBOXGUESTR3EXE_TOOL := $(subst GXX,GCC,$(TEMPLATE_VBOXR3EXE_TOOL))
+ TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -fno-exceptions
+ TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
+- TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
++ TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) -Wl,-z,lazy
+ endif
+ TEMPLATE_VBOXGUESTR3EXE_INST = $(INST_ADDITIONS)
+ TEMPLATE_VBOXGUESTR3EXE_DEFS := $(filter-out $(ARCH_BITS_DEFS), $(TEMPLATE_VBOXR3EXE_DEFS)) IN_GUEST IN_GUEST_R3 IN_RT_R3 $(VBOX_GC_ARCH_BITS_DEFS)