summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-12 23:15:50 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-12 23:15:50 +0100
commitce8456e5bca766a4055e3d9383ae021594dd854d (patch)
treeb85a621bfba8fc5f76ffe4b247bf3d6c374f0668 /app-emulation/virtualbox
parent49f670b86aec162cdc649d2c00b09863e51f7d4e (diff)
app-emulation/virtualbox : rework package
Diffstat (limited to 'app-emulation/virtualbox')
-rw-r--r--app-emulation/virtualbox/Manifest6
-rw-r--r--app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch158
-rw-r--r--app-emulation/virtualbox/files/vboxwebsrv-confd2
-rw-r--r--app-emulation/virtualbox/files/vboxwebsrv-initd4
-rw-r--r--app-emulation/virtualbox/files/virtualbox-3-wrapper (renamed from app-emulation/virtualbox/files/virtualbox-ose-5-wrapper)87
-rw-r--r--app-emulation/virtualbox/files/virtualbox-4-config1
-rw-r--r--app-emulation/virtualbox/files/virtualbox-5-localconfig47
-rw-r--r--app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch59
-rw-r--r--app-emulation/virtualbox/files/virtualbox-config1
-rw-r--r--app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd1
-rw-r--r--app-emulation/virtualbox/files/virtualbox.desktop-2 (renamed from app-emulation/virtualbox/files/virtualbox-ose.desktop-2)0
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.8.121009.ebuild287
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.8.ebuild436
13 files changed, 335 insertions, 754 deletions
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index ae456ecf..7f49022a 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,2 +1,4 @@
-DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
-DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.8-121009.tar.gz 19469421 BLAKE2B 81651876802ad767339f3984a26375118f01e4b99b4247398e0cea8d749905431b40945f8a72d0c7802b2743080f01d3044aafd21600c4927773994c5a114a1f SHA512 2b69e2acab91ce95e9807006c79862fc0d1d10fdd269bd9cdf8f11b6704821823b103c7a4a76ad99c10e0868bd397ffe0e72b2eb2aa4fc2bd81ff968c71c2280
+DIST VirtualBox-5.2.8-121009-Linux_amd64.run 88493520 BLAKE2B 2986918bb2eda12447468fb642d3760d999d3af3e5595bf7260e94572f15a811655cd3f1348e1cf23a827011b1eebf84f07f13185f4eab3c353a957c58c105d4 SHA512 211f94910ef50a00b178482c0600be48ecddb48086846515b7705b111a36f81346efd4cbeb39255d85f3a0e778509e0dd7676e4c9bcbea49014988be8635910f
+DIST VirtualBox-5.2.8-121009-Linux_x86.run 87705037 BLAKE2B 8d6774d0be3a3e12cd258bb6799e6f3eb84a3cff670277c0b910671879014b513d1e2958ebf60f5aaa1ee4ef56be52cc0908b3cb5fa25fa78db77023fbbb3660 SHA512 ee75f64332a8d1df61b60a28661d7b7ef760c789dabca61b749f5cf33ffbe5ef09d64bde6da4255e659b1bf86d947eca8d18d697738e4de9f6b0b423ea647e9b
+DIST VirtualBoxSDK-5.2.8-121009.zip 10153749 BLAKE2B 0534f568f83d73f70f4192389e0f602bc4184d45a4a1aa82983692bf4e35fac0589eef21f5aa561c88c736aaa398986de0077dcdf3aa211df655788f5592b423 SHA512 386e38ee6e584ff8b0444b9285a67d259bb93f53d6e6b6e082cefd4121578da91ea56e2eb329b6848ff5476a14ad3055287b806cd25a21155aa6f708c58244a5
diff --git a/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch b/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch
deleted file mode 100644
index 73c377a6..00000000
--- a/app-emulation/virtualbox/files/050_virtualbox-5.1.24-nopie.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-diff -Naur VirtualBox-5.1.24/Config.kmk VirtualBox-5.1.24/Config.kmk
---- VirtualBox-5.1.24/Config.kmk 2017-07-26 13:55:27.803972185 -0400
-+++ VirtualBox-5.1.24/Config.kmk 2017-07-26 13:53:10.700974328 -0400
-@@ -2601,6 +2601,7 @@
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overlength-strings?= $(call VBOX_GCC_CHECK_CC,-Wno-overlength-strings,)'
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overloaded-virtual?= $(call VBOX_GCC_CHECK_CXX,-Wno-overloaded-virtual,)'
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
-+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_nopie ?= $(call VBOX_GCC_CHECK_CC,-nopie,)'
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)'
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_m64 ?= $(call VBOX_GCC_CHECK_CC,-m64,)'
- $(QUIET)$(APPEND) '$@' 'VBOX_GCC_no-pie ?= $(call VBOX_GCC_CHECK_CC,-no-pie,)'
-@@ -3843,8 +3844,8 @@
-
- ifeq ($(VBOX_LDR_FMT32),elf)
- TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL)
-- TEMPLATE_VBoxRc_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
-- TEMPLATE_VBoxRc_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
-+ TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
-+ TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
- ifeq ($(KBUILD_TARGET),solaris)
- TEMPLATE_VBoxRc_LDFLAGS = -r
- else
-@@ -3864,8 +3865,8 @@
- ifeq ($(VBOX_LDR_FMT32),macho)
- TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC_TOOL)
- TEMPLATE_VBoxRc_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
-- TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
-- TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
-+ TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
-+ TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
- TEMPLATE_VBoxRc_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -m32 -nostdlib
- #TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ???
- endif
-@@ -3903,9 +3904,9 @@
- endif
-
- ifeq ($(VBOX_LDR_FMT32),elf)
-- TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0
-- TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0
-- TEMPLATE_VBoxRcExe_LDFLAGS = -g
-+ TEMPLATE_VBoxRcExe_CFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0 $(VBOX_GCC_nopie)
-+ TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0 $(VBOX_GCC_nopie)
-+ TEMPLATE_VBoxRcExe_LDFLAGS = -g $(VBOX_GCC_nopie)
- TEMPLATE_VBoxRcExe_LDFLAGS.dbgopt = -g
- TEMPLATE_VBoxRcExe_LDFLAGS.strict = -g
- TEMPLATE_VBoxRcExe_LDFLAGS.release = -g
-@@ -3984,8 +3985,8 @@
-
- ifeq ($(VBOX_LDR_FMT),elf)
- TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL)
--TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
--TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
-+TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
-+TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
- TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
- TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
- ifeq ($(KBUILD_TARGET),solaris)
-@@ -4018,12 +4019,12 @@
- TEMPLATE_VBoxR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS)
- TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \
- -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
-- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
-+ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
- TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
- TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32
- TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
- -fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
-- -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
-+ -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
- TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
- TEMPLATE_VBoxR0_CFLAGS.x86 = -m32
- TEMPLATE_VBoxR0_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
-@@ -4259,7 +4260,7 @@
- -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
- -Wimplicit-function-declaration -Werror-implicit-function-declaration \
- -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
-- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
-+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
- -nostdinc -std=c99
- TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
- TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
-@@ -4268,7 +4269,7 @@
- TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
- $(VBOX_GCC_WARN) -Wpointer-arith -Winline \
- -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
-- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
-+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
- -nostdinc
- TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
- TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
-@@ -4341,7 +4342,7 @@
- -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
- -Wimplicit-function-declaration -Werror-implicit-function-declaration \
- -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
-- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
-+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
- -nostdinc -std=c99 -msoft-float
- TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 \
- -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \
-@@ -4353,7 +4354,7 @@
- TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
- $(VBOX_GCC_WARN) -Wpointer-arith -Winline \
- -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
-- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
-+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
- -nostdinc -msoft-float
- TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
- TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
-@@ -4394,7 +4395,7 @@
- TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o
- TEMPLATE_VBOXR0DRV_CFLAGS = -fno-PIC \
- $(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \
-- $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
- TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
- TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
- TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
-@@ -5210,8 +5211,8 @@
- TEMPLATE_VBoxNoCrtGccLib_TOOL = $(VBOX_GCC_TOOL)
- TEMPLATE_VBoxNoCrtGccLib_ASTOOL = $(VBOX_ASTOOL)
- TEMPLATE_VBoxNoCrtGccLib_ASFLAGS = $(VBOX_ASFLAGS)
-- TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector)
-- TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
-+ TEMPLATE_VBoxNoCrtGccLib_CFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
-+ TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
- ifeq ($(KBUILD_TARGET_ARCH),amd64)
- # in 64-bit mode we'll build a sys-module (VBoxREM2).
- if1of ($(KBUILD_TARGET), darwin solaris)
-@@ -6467,8 +6468,8 @@
- TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-pie -fno-merge-constants -std=c99 -ffreestanding
- TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-pie -fno-merge-constants -ffreestanding
- ifndef VBOX_WITH_COMPATIBLE_LINUX_GUEST_PACKAGE
-- TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS += $(VBOX_GCC_fno-stack-protector)
-- TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS += $(VBOX_GCC_fno-stack-protector)
-+ TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
-+ TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
- endif
- TEMPLATE_VBOXGUESTR3XF86MOD_SYSSUFF = .o
- TEMPLATE_VBOXGUESTR3XF86MOD_LIBS = \
-diff -Naur VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk
---- VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:55:27.746972186 -0400
-+++ VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk 2017-07-26 13:53:10.641974329 -0400
-@@ -132,6 +132,7 @@
- -W \
- -Wformat-nonliteral \
- $(VBOX_GCC_fno-stack-protector) \
-+ $(VBOX_GCC_nopie) \
- $(VBOX_GCC_fno-dwarf2-cfi-asm) \
- $(VBOX_GCC_Wno-address)
- TEMPLATE_iPxe_ASFLAGS = \
-@@ -155,6 +156,7 @@
- -W \
- -Wformat-nonliteral \
- $(VBOX_GCC_fno-stack-protector) \
-+ $(VBOX_GCC_nopie) \
- $(VBOX_GCC_fno-dwarf2-cfi-asm) \
- $(VBOX_GCC_Wno-address) \
- -DASSEMBLY
diff --git a/app-emulation/virtualbox/files/vboxwebsrv-confd b/app-emulation/virtualbox/files/vboxwebsrv-confd
index fdcd17e9..9ea37a2f 100644
--- a/app-emulation/virtualbox/files/vboxwebsrv-confd
+++ b/app-emulation/virtualbox/files/vboxwebsrv-confd
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# The host to bind to (defaults to "localhost").
diff --git a/app-emulation/virtualbox/files/vboxwebsrv-initd b/app-emulation/virtualbox/files/vboxwebsrv-initd
index f50c3ec0..e6009970 100644
--- a/app-emulation/virtualbox/files/vboxwebsrv-initd
+++ b/app-emulation/virtualbox/files/vboxwebsrv-initd
@@ -7,9 +7,11 @@ depend() {
}
start() {
+ #checkconfig || return $?
+
ebegin "Starting VirtualBox WebService"
start-stop-daemon --start --quiet --user ${VBOXWEBSRV_USER} --pidfile /var/run/vboxwebsrv.pid \
- --background --make-pidfile --exec /usr/bin/vboxwebsrv \
+ --background --make-pidfile --exec /opt/bin/vboxwebsrv \
-- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL}
eend $?
}
diff --git a/app-emulation/virtualbox/files/virtualbox-ose-5-wrapper b/app-emulation/virtualbox/files/virtualbox-3-wrapper
index e2249b0e..6f2da490 100644
--- a/app-emulation/virtualbox/files/virtualbox-ose-5-wrapper
+++ b/app-emulation/virtualbox/files/virtualbox-3-wrapper
@@ -1,10 +1,8 @@
#!/bin/sh
-## @file
-# Oracle VM VirtualBox startup script, Linux hosts.
#
-
+# Sun VirtualBox
#
-# Copyright (C) 2006-2015 Oracle Corporation
+# Copyright (C) 2006-2009 Sun Microsystems, Inc.
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -14,20 +12,20 @@
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+# Clara, CA 95054 USA or visit http://www.sun.com if you need
+# additional information or have any questions.
+#
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
CONFIG="/etc/vbox/vbox.cfg"
-test -r "${CONFIG}" &&
- . "${CONFIG}"
-test -z "${INSTALL_DIR}" &&
- if test -f /usr/lib/virtualbox/VirtualBox &&
- test -x /usr/lib/virtualbox/VirtualBox; then
- INSTALL_DIR=/usr/lib/virtualbox
- else
- echo "Could not find VirtualBox installation. Please reinstall."
- exit 1
- fi
+if [ ! -r "$CONFIG" ]; then
+ echo "Could not find VirtualBox installation. Please reinstall."
+ exit 1
+fi
+
+. "$CONFIG"
# Note: This script must not fail if the module was not successfully installed
# because the user might not want to run a VM but only change VM params!
@@ -36,9 +34,8 @@ if [ "$1" = "shutdown" ]; then
SHUTDOWN="true"
elif ! lsmod|grep -q vboxdrv; then
cat << EOF
-WARNING: The vboxdrv kernel module is not loaded. Either there is no module
- available for the current kernel (`uname -r`) or it failed to
- load. Please recompile the kernel module and install it by
+WARNING: The VirtualBox kernel modules are not loaded.
+ Please load all the needed kernel modules by:
for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
@@ -56,7 +53,7 @@ WARNING: The character device /dev/vboxdrv does not exist.
emerge -1av app-emulation/virtualbox-modules
- You will not be able to start VMs until this problem is fixed.
+ You will not be able to start VMs until this problem is fixed.
EOF
fi
@@ -79,35 +76,29 @@ if [ "$SHUTDOWN" = "true" ]; then
exit 0
fi
-APP=`basename $0`
+APP=`which $0`
+APP=`basename $APP`
+APP=${APP##/*/}
case "$APP" in
- VirtualBox|virtualbox)
- exec "$INSTALL_DIR/VirtualBox" "$@"
- ;;
- VBoxManage|vboxmanage)
- exec "$INSTALL_DIR/VBoxManage" "$@"
- ;;
- VBoxSDL|vboxsdl)
- exec "$INSTALL_DIR/VBoxSDL" "$@"
- ;;
- VBoxVRDP|VBoxHeadless|vboxheadless)
- exec "$INSTALL_DIR/VBoxHeadless" "$@"
- ;;
- VBoxAutostart|vboxautostart)
- exec "$INSTALL_DIR/VBoxAutostart" "$@"
- ;;
- VBoxBalloonCtrl|vboxballoonctrl)
- exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
- ;;
- VBoxDTrace|vboxdtrace)
- exec "$INSTALL_DIR/VBoxDTrace" "$@"
- ;;
- vboxwebsrv)
- exec "$INSTALL_DIR/vboxwebsrv" "$@"
- ;;
- *)
- echo "Unknown application - $APP"
- exit 1
- ;;
+ VirtualBox)
+ exec "$INSTALL_DIR/VirtualBox" "$@"
+ ;;
+ VBoxManage)
+ exec "$INSTALL_DIR/VBoxManage" "$@"
+ ;;
+ VBoxSDL)
+ exec "$INSTALL_DIR/VBoxSDL" "$@"
+ ;;
+ VBoxVRDP)
+ exec "$INSTALL_DIR/VBoxHeadless" "$@"
+ ;;
+ VBoxHeadless)
+ exec "$INSTALL_DIR/VBoxHeadless" "$@"
+ ;;
+ vboxwebsrv)
+ exec "$INSTALL_DIR/vboxwebsrv" "$@"
+ ;;
+ *)
+ echo "Unknown application - $APP"
+ ;;
esac
-exit 0
diff --git a/app-emulation/virtualbox/files/virtualbox-4-config b/app-emulation/virtualbox/files/virtualbox-4-config
deleted file mode 100644
index af782214..00000000
--- a/app-emulation/virtualbox/files/virtualbox-4-config
+++ /dev/null
@@ -1 +0,0 @@
-INSTALL_DIR=/usr/MY_LIBDIR/virtualbox
diff --git a/app-emulation/virtualbox/files/virtualbox-5-localconfig b/app-emulation/virtualbox/files/virtualbox-5-localconfig
deleted file mode 100644
index 05e7dbab..00000000
--- a/app-emulation/virtualbox/files/virtualbox-5-localconfig
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- Makefile -*-
-#
-# Overwrite some default kBuild settings
-#
-
-#
-# Copyright (C) 2006-2008 Sun Microsystems, Inc.
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License as published by the Free Software Foundation,
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
-# distribution. VirtualBox OSE is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-# shut up wine complaining about unknown locale
-EXEC_X86_WIN32 := wine
-
-# don't build testcases to save time, they are not needed for the package
-VBOX_WITH_TESTCASES :=
-VBOX_WITH_VALIDATIONKIT :=
-VBOX_DOCBOOK_WITH_LATEX := 1
-
-KBUILD_MSG_STYLE := brief
-
-## paths, origin, hardening
-VBOX_WITH_HARDENING := 1
-VBOX_WITH_ORIGIN :=
-VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox
-VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
-VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
-VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
-VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS)
-
-## don't build unwanted/splitted stuff
-VBOX_WITHOUT_ADDITIONS := 1
-VBOX_WITH_VBOXDRV :=
-VBOX_WITH_VBOXBFE :=
-VBOX_WITH_KCHMVIEWER :=
-
-## don't build with -Werror
-VBOX_WITH_WARNINGS_AS_ERRORS :=
-
-## fix compilation with USE="doc" (Gentoo bug #554932)
-VBOX_PATH_DOCBOOK_DTD := /usr/share/sgml/docbook/sgml-dtd-4.4
diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch b/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch
deleted file mode 100644
index 50fa306d..00000000
--- a/app-emulation/virtualbox/files/virtualbox-5.1.4-paxmark-bldprogs.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-2017-02-20 Quentin Minster <quentin@minster.io>
-
- #https://bugs.gentoo.org/show_bug.cgi?id=591582
- * Config.kmk: add paxmark befor VBOX_VBOXTPG get run.
- * src/VBox/VMM/Makefile.kmk: add paxmark befor VBOX_VBOXCPP get run.
- * src/VBox/Main/Makefile.kmk: add paxmark befor USBIdDatabaseGenerator_1_TARGET get run.
-
---- a/Config.kmk
-+++ b/Config.kmk 2016-09-21 02:22:28
-@@ -3719,11 +3719,13 @@
- $(if-expr $(intersects $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES_64)),-64,-32) \
- -h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
- define TOOL_VBoxTpG_DTRACE_HDR_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
- endef
- TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED :=
- TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
- define TOOL_VBoxTpG_DTRACE_OBJ_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) \
- $(if-expr $(intersects $(bld_trg_arch),$(KBUILD_ARCHES_64)),-64,-32) \
- $(flags) \
-@@ -3738,6 +3740,7 @@
- TOOL_VBoxTpG-Disabled_DTRACE_DEPORD = $(VBOX_VBOXTPG)
- TOOL_VBoxTpG-Disabled_DTRACE_HDR_FLAGS := -h
- define TOOL_VBoxTpG-Disabled_DTRACE_HDR_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
- endef
- TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES)
-@@ -3752,6 +3755,7 @@
- TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS =
- define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS
- $(TOOL_StandardDTrace_DTRACE_HDR_CMDS)
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \
- $(filter-out -C, $(filter-out -h,$(flags))) \
- -o "$(out).tmp" -s "$(source)"
---- a/src/VBox/VMM/Makefile.kmk
-+++ b/src/VBox/VMM/Makefile.kmk 2016-09-21 02:26:11
-@@ -795,6 +795,7 @@
- define def_vmm_lib_dtrace_preprocess
- $$$$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
- $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$$<)
-+ $$(QUIET)paxmark.sh -m "$(VBOX_VBOXCPP)"
- $$(QUIET)$(VBOX_VBOXCPP) -d \
- -D VBOX_FOR_DTRACE_LIB \
- -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
---- a/src/VBox/Main/Makefile.kmk
-+++ b/src/VBox/Main/Makefile.kmk 2016-09-21 02:31:23
-@@ -522,6 +522,7 @@
- $$(VBoxSVC_0_OUTDIR)/USBIdDatabase.cpp: $$(USBIdDatabaseGenerator_1_TARGET) \
- $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@)
- $(call MSG_GENERATE,USBIdDatabase,$@,$<)
-+ $(QUIET)paxmark.sh -m "$(USBIdDatabaseGenerator_1_TARGET)"
- $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^)
-
- BLDPROGS += USBIdDatabaseGenerator
diff --git a/app-emulation/virtualbox/files/virtualbox-config b/app-emulation/virtualbox/files/virtualbox-config
new file mode 100644
index 00000000..f69e73e2
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-config
@@ -0,0 +1 @@
+INSTALL_DIR=/opt/VirtualBox
diff --git a/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd b/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd
deleted file mode 100644
index 39378536..00000000
--- a/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd
+++ /dev/null
@@ -1 +0,0 @@
-d /dev/vboxusb 0750 root vboxusers
diff --git a/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 b/app-emulation/virtualbox/files/virtualbox.desktop-2
index ce798dac..ce798dac 100644
--- a/app-emulation/virtualbox/files/virtualbox-ose.desktop-2
+++ b/app-emulation/virtualbox/files/virtualbox.desktop-2
diff --git a/app-emulation/virtualbox/virtualbox-5.2.8.121009.ebuild b/app-emulation/virtualbox/virtualbox-5.2.8.121009.ebuild
new file mode 100644
index 00000000..256314a1
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.8.121009.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+ x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+ https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="mirror"
+
+if [[ "${PV}" != *beta* ]] ; then
+ SRC_URI+="
+ sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
+ IUSE+=" sdk"
+fi
+
+DEPEND="app-arch/unzip
+ ${PYTHON_DEPS}"
+
+RDEPEND="!!app-emulation/virtualbox
+ !app-emulation/virtualbox-additions
+ ~app-emulation/virtualbox-modules-${MAIN_PV}
+ !headless? (
+ dev-libs/glib
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/libsdl[X]
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXft
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ chm? ( dev-libs/expat )
+ )
+ dev-libs/libxml2
+ sys-fs/lvm2
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXdmcp
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S=${WORKDIR}
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+ unpack_makeself ${MY_P}_${ARCH}.run
+ unpack ./VirtualBox.tar.bz2
+
+ mkdir "${S}"/${EXTP_PN} || die
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ unpack ${EXTP_P}.tar.gz
+ popd &>/dev/null || die
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ unpack VirtualBoxSDK-${SDK_PV}.zip
+ fi
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # create virtualbox configurations files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+ if ! use headless ; then
+ newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+ # set up symlinks (bug #572012)
+ dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+ local size ico icofile
+ for size in 16 24 32 48 64 72 96 128 256 ; do
+ pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+ if [[ -f "virtualbox.png" ]] ; then
+ doicon -s ${size} virtualbox.png
+ fi
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="virtualbox-${ico}.png"
+ if [[ -f "${icofile}" ]] ; then
+ doicon -s ${size} ${icofile}
+ fi
+ done
+ popd &>/dev/null || die
+ done
+ doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+ insinto /usr/share/pixmaps
+ newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+ fi
+
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+ popd &>/dev/null || die
+ rm -rf "${S}"/${EXTP_PN}
+
+ insinto /opt/VirtualBox
+ dodir /opt/bin
+
+ doins UserManual.pdf
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ doins -r sdk
+ fi
+
+ if use additions; then
+ doins -r additions
+ fi
+
+ if use vboxwebsrv; then
+ doins vboxwebsrv
+ fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+ fperms 0750 /opt/VirtualBox/vboxwebsrv
+ dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ if use rdesktop-vrdp; then
+ doins rdesktop-vrdp
+ doins -r rdesktop-vrdp-keymaps
+ fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+ dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+ fi
+
+ if ! use headless && use chm; then
+ doins kchmviewer VirtualBox.chm
+ fowners root:vboxusers /opt/VirtualBox/kchmviewer
+ fperms 0750 /opt/VirtualBox/kchmviewer
+ fi
+
+ # This ebuild / package supports only py2.7. When py3 comes is unknown.
+ # The compile phase makes VBoxPython2_7.so.
+ # py3 support would presumably require a binary pre-compiled by py3.
+ use python && doins VBoxPython.so VBoxPython2_7.so
+
+ rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+ vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+ VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+ webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+ 90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+ VBoxPython?_*.so
+
+ if use headless ; then
+ rm -rf VBoxSDL VirtualBox VBoxKeyboard.so
+ fi
+
+ doins -r * || die
+
+ # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+ dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+ dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+ dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+ dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+ dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+ local each
+ for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 0750 /opt/VirtualBox/${each}
+ pax-mark -m "${D}"/opt/VirtualBox/${each}
+ done
+ # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+ fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
+ fperms 4750 /opt/VirtualBox/VBoxNetDHCP
+ fperms 4750 /opt/VirtualBox/VBoxNetNAT
+
+ if ! use headless ; then
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ for each in VBox{SDL,Headless} VirtualBox; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 4510 /opt/VirtualBox/${each}
+ pax-mark -m "${D}"/opt/VirtualBox/${each}
+ done
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+ else
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+ fperms 4510 /opt/VirtualBox/VBoxHeadless
+ pax-mark -m "${D}"/opt/VirtualBox/VBoxHeadless
+ fi
+
+ exeinto /opt/VirtualBox
+ newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+ fowners root:vboxusers /opt/VirtualBox/VBox.sh
+ fperms 0750 /opt/VirtualBox/VBox.sh
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+ dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}/rules.d
+ doins "${FILESDIR}"/10-virtualbox.rules
+ sed "s@%UDEVDIR%@${udevdir}@" \
+ -i "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+ # move udev scripts into ${udevdir} (bug #372491)
+ mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${udevdir} || die
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ gnome2_icon_cache_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+ elog ""
+ if ! use headless ; then
+ elog "To launch VirtualBox just type: \"VirtualBox\""
+ elog ""
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+ elog "an overview about the different features of ${PN}"
+ elog "and virtualbox-ose"
+ if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+ elog ""
+ elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+ elog "or else USB in ${PN} won't work."
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/app-emulation/virtualbox/virtualbox-5.2.8.ebuild b/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
deleted file mode 100644
index 29c95437..00000000
--- a/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
+++ /dev/null
@@ -1,436 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
-
-MY_PV="${PV/beta/BETA}"
-MY_PV="${MY_PV/rc/RC}"
-MY_P=VirtualBox-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/"
-SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
- https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE="alsa debug doc headless java libressl lvm pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
-
-RDEPEND="!app-emulation/virtualbox-bin
- ~app-emulation/virtualbox-modules-${PV}
- dev-libs/libIDL
- >=dev-libs/libxslt-1.1.19
- net-misc/curl
- dev-libs/libxml2
- media-libs/libpng:0=
- media-libs/libvpx:0=
- sys-libs/zlib
- !headless? (
- media-libs/libsdl:0[X,video]
- x11-libs/libX11
- x11-libs/libXcursor
- x11-libs/libXext
- x11-libs/libXmu
- x11-libs/libXt
- opengl? ( virtual/opengl media-libs/freeglut )
- qt5? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtprintsupport:5
- dev-qt/qtwidgets:5
- dev-qt/qtx11extras:5
- opengl? ( dev-qt/qtopengl:5 )
- x11-libs/libXinerama
- )
- )
- libressl? ( dev-libs/libressl:= )
- !libressl? ( dev-libs/openssl:0= )
- lvm? ( sys-fs/lvm2 )
- udev? ( >=virtual/udev-171 )
- vnc? ( >=net-libs/libvncserver-0.9.9 )"
-DEPEND="${RDEPEND}
- >=dev-util/kbuild-0.1.9998.3127
- >=dev-lang/yasm-0.6.2
- sys-devel/bin86
- sys-libs/libcap
- sys-power/iasl
- virtual/pkgconfig
- alsa? ( >=media-libs/alsa-lib-1.0.13 )
- doc? (
- app-text/docbook-sgml-dtd:4.4
- dev-texlive/texlive-basic
- dev-texlive/texlive-latex
- dev-texlive/texlive-latexrecommended
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-fontsextra
- )
- !headless? ( x11-libs/libXinerama )
- java? ( >=virtual/jdk-1.6 )
- pam? ( sys-libs/pam )
- pax_kernel? ( sys-apps/elfix )
- pulseaudio? ( media-sound/pulseaudio )
- qt5? ( dev-qt/linguist-tools:5 )
- vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
- ${PYTHON_DEPS}"
-RDEPEND="${RDEPEND}
- java? ( >=virtual/jre-1.6 )"
-
-QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
- usr/lib/virtualbox/VBoxSDL.so
- usr/lib/virtualbox/VBoxSharedFolders.so
- usr/lib/virtualbox/VBoxDD2.so
- usr/lib/virtualbox/VBoxOGLrenderspu.so
- usr/lib/virtualbox/VBoxPython.so
- usr/lib/virtualbox/VBoxDD.so
- usr/lib/virtualbox/VBoxDDU.so
- usr/lib/virtualbox/VBoxREM64.so
- usr/lib/virtualbox/VBoxSharedClipboard.so
- usr/lib/virtualbox/VBoxHeadless.so
- usr/lib/virtualbox/VBoxRT.so
- usr/lib/virtualbox/VBoxREM.so
- usr/lib/virtualbox/VBoxSettings.so
- usr/lib/virtualbox/VBoxKeyboard.so
- usr/lib/virtualbox/VBoxSharedCrOpenGL.so
- usr/lib/virtualbox/VBoxVMM.so
- usr/lib/virtualbox/VirtualBox.so
- usr/lib/virtualbox/VBoxOGLhosterrorspu.so
- usr/lib/virtualbox/components/VBoxC.so
- usr/lib/virtualbox/components/VBoxSVCM.so
- usr/lib/virtualbox/components/VBoxDDU.so
- usr/lib/virtualbox/components/VBoxRT.so
- usr/lib/virtualbox/components/VBoxREM.so
- usr/lib/virtualbox/components/VBoxVMM.so
- usr/lib/virtualbox/VBoxREM32.so
- usr/lib/virtualbox/VBoxPython2_7.so
- usr/lib/virtualbox/VBoxXPCOMC.so
- usr/lib/virtualbox/VBoxOGLhostcrutil.so
- usr/lib/virtualbox/VBoxNetDHCP.so
- usr/lib/virtualbox/VBoxNetNAT.so"
-
-S="${WORKDIR}/${MY_P}"
-
-REQUIRED_USE="
- java? ( sdk )
- python? ( sdk )
- vboxwebsrv? ( java )
- ${PYTHON_REQUIRED_USE}
-"
-
-pkg_setup() {
- if ! use headless && ! use qt5 ; then
- einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
- elif use headless && use qt5 ; then
- einfo "You selected USE=\"headless qt5\", defaulting to"
- einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
- fi
-
- if ! use opengl ; then
- einfo "No USE=\"opengl\" selected, this build will lack"
- einfo "the OpenGL feature."
- fi
- if ! use python ; then
- einfo "You have disabled the \"python\" USE flag. This will only"
- einfo "disable the python bindings being installed."
- fi
- java-pkg-opt-2_pkg_setup
- python-single-r1_pkg_setup
-
- tc-ld-disable-gold #bug 488176
- tc-export CC CXX LD AR RANLIB
- export HOST_CC="$(tc-getBUILD_CC)"
-}
-
-src_prepare() {
- # Remove shipped binaries (kBuild,yasm), see bug #232775
- rm -r kBuild/bin tools || die
-
- # Replace pointless GCC version check with something less stupid.
- # This is needed for the qt5 version check.
- sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' -i configure || die
-
- # Don't use "echo -n"
- sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die
-
- # Disable things unused or split into separate ebuilds
- sed -e "s@MY_LIBDIR@$(get_libdir)@" \
- "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
-
- # Respect LDFLAGS
- sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
- -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
- # Do not use hard-coded ld (related to bug #488176)
- sed -e '/QUIET)ld /s@ld @$(LD) @' \
- -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
- # Use PAM only when pam USE flag is enbaled (bug #376531)
- if ! use pam ; then
- elog "Disabling PAM removes the possibility to use the VRDP features."
- sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
- sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
- src/VBox/HostServices/Makefile.kmk || die
- fi
-
- # add correct java path
- if use java ; then
- sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
- -i "${S}"/Config.kmk || die
- java-pkg-opt-2_src_prepare
- fi
-
- # Only add nopie patch when we're on hardened
- if gcc-specs-pie ; then
- eapply "${FILESDIR}/050_virtualbox-5.1.24-nopie.patch"
- fi
-
- # Only add paxmark patch when we're on pax_kernel
- if use pax_kernel ; then
- eapply "${FILESDIR}"/virtualbox-5.1.4-paxmark-bldprogs.patch
- fi
-
- eapply "${WORKDIR}/patches"
-
- eapply_user
-}
-
-src_configure() {
- local myconf=(
- --with-gcc="$(tc-getCC)"
- --with-g++="$(tc-getCXX)"
- --disable-dbus
- --disable-kmods
- $(usex alsa '' --disable-alsa)
- $(usex debug --build-debug '')
- $(usex doc '' --disable-docs)
- $(usex java '' --disable-java)
- $(usex lvm '' --disable-devmapper)
- $(usex pulseaudio '' --disable-pulse)
- $(usex python '' --disable-python)
- $(usex vboxwebsrv --enable-webservice '')
- $(usex vnc --enable-vnc '')
- )
- if ! use headless ; then
- myconf+=(
- $(usex opengl '' --disable-opengl)
- $(usex qt5 '' --disable-qt)
- )
- else
- myconf+=(
- --build-headless
- --disable-opengl
- )
- fi
- if use amd64 && ! has_multilib_profile ; then
- myconf+=( --disable-vmmraw )
- fi
- # not an autoconf script
- ./configure ${myconf[@]} || die "configure failed"
-}
-
-src_compile() {
- source ./env.sh || die
-
- # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
- MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
- MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
- MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
- MAKE="kmk" emake \
- VBOX_BUILD_PUBLISHER=_Gentoo \
- TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
- TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
- TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
- TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
- VBOX_GCC_OPT="${CXXFLAGS}" \
- TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
- all
-}
-
-src_install() {
- local binpath="release"
- use debug && binpath="debug"
- cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
-
- local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
-
- vbox_inst() {
- local binary="${1}"
- local perms="${2:-0750}"
- local path="${3:-${vbox_inst_path}}"
-
- [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
- [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
- insinto ${path}
- doins ${binary}
- fowners root:vboxusers ${path}/${binary}
- fperms ${perms} ${path}/${binary}
- }
-
- # Create configuration files
- insinto /etc/vbox
- newins "${FILESDIR}/${PN}-4-config" vbox.cfg
-
- # Set the correct libdir
- sed \
- -e "s@MY_LIBDIR@$(get_libdir)@" \
- -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
- # Install the wrapper script
- exeinto ${vbox_inst_path}
- newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
- fowners root:vboxusers ${vbox_inst_path}/VBox
- fperms 0750 ${vbox_inst_path}/VBox
-
- # Install binaries and libraries
- insinto ${vbox_inst_path}
- doins -r components
-
- # *.rc files for x86_64 are only available on multilib systems
- local rcfiles="*.rc"
- if use amd64 && ! has_multilib_profile ; then
- rcfiles=""
- fi
- for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
- vbox_inst ${each}
- done
-
- # These binaries need to be suid root.
- for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
- vbox_inst ${each} 4750
- done
-
- # Install EFI Firmware files (bug #320757)
- pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
- for fwfile in VBoxEFI{32,64}.fd ; do
- vbox_inst ${fwfile} 0644
- done
- popd &>/dev/null || die
-
- # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
- # VBoxXPCOMIPCD (bug #524202)
- for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
- pax-mark -m "${D}"${vbox_inst_path}/${each}
- done
-
- # Symlink binaries to the shipped wrapper
- for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
- dosym ${vbox_inst_path}/VBox /usr/bin/${each}
- done
- dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
-
- if use pam ; then
- # VRDPAuth only works with this (bug #351949)
- dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
- fi
-
- # set an env-variable for 3rd party tools
- echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
- doenvd "${T}/90virtualbox"
-
- if ! use headless ; then
- vbox_inst VBoxSDL 4750
- pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL
-
- for each in vboxsdl VBoxSDL ; do
- dosym ${vbox_inst_path}/VBox /usr/bin/${each}
- done
-
- if use qt5 ; then
- vbox_inst VirtualBox 4750
- pax-mark -m "${D}"${vbox_inst_path}/VirtualBox
-
- if use opengl ; then
- vbox_inst VBoxTestOGL
- pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL
- fi
-
- for each in virtualbox VirtualBox ; do
- dosym ${vbox_inst_path}/VBox /usr/bin/${each}
- done
-
- insinto /usr/share/${PN}
- doins -r nls
-
- newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
- fi
-
- pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
- for size in 16 32 48 64 128 ; do
- newicon -s ${size} ${PN}-${size}px.png ${PN}.png
- done
- newicon ${PN}-48px.png ${PN}.png
- doicon -s scalable ${PN}.svg
- popd &>/dev/null || die
- pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
- for size in 16 24 32 48 64 72 96 128 256 512 ; do
- for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
- icofile="${PN}-${ico}-${size}px.png"
- if [[ -f "${icofile}" ]] ; then
- newicon -s ${size} ${icofile} ${PN}-${ico}.png
- fi
- done
- done
- popd &>/dev/null || die
- fi
-
- if use lvm ; then
- vbox_inst VBoxVolInfo 4750
- dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
- fi
-
- if use sdk ; then
- insinto ${vbox_inst_path}
- doins -r sdk
-
- if use java ; then
- java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
- java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so"
- fi
- fi
-
- if use udev ; then
- # New way of handling USB device nodes for VBox (bug #356215)
- local udevdir="$(get_udevdir)"
- insinto ${udevdir}
- doins VBoxCreateUSBNode.sh
- fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
- fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
- insinto ${udevdir}/rules.d
- sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
- > "${T}"/10-virtualbox.rules || die
- doins "${T}"/10-virtualbox.rules
- fi
-
- if use vboxwebsrv ; then
- vbox_inst vboxwebsrv
- dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
- newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
- newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
- fi
-
- if use doc ; then
- dodoc UserManual.pdf
- fi
-
- newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
-
- if use udev ; then
- udevadm control --reload-rules \
- && udevadm trigger --subsystem-match=usb
- fi
-
- tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
-}