Patch9: pld-guest.patch
Patch10: 16-no-update.patch
Patch11: 18-system-xorg.patch
-Patch12: x8664-build.patch
-Patch13: %{pname}-all-translations.patch
+Patch12: %{pname}-all-translations.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
%patch9 -p1
%patch10 -p1
%patch11 -p1
-%patch12 -p1
-%patch13 -p0
+%patch12 -p0
%{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
cp -p src/VBox/Frontends/VirtualBox/images/os_{linux26,pld}.png
cp -p src/VBox/Frontends/VirtualBox/images/os_{linux26,pld}_64.png
+# don't force whole userspace to be built with -fPIC
+# see https://www.virtualbox.org/pipermail/vbox-dev/2015-February/012863.html
+%define filterout_c -fPIC
+%define filterout_cxx -fPIC
+
cat <<'EOF'>> LocalConfig.kmk
%{?with_verbose:KBUILD_VERBOSE=3}
USERNAME=%(id -un)
VBOX_WITH_TESTSUITE :=
EOF
+%undefine filterout_c
+%undefine filterout_cxx
+
%build
%if %{with userspace}
./configure \
+++ /dev/null
---- a/src/VBox/Runtime/common/ldr/ldrkStuff.cpp 2014-07-20 17:50:52.918200154 +0200
-+++ b/src/VBox/Runtime/common/ldr/ldrkStuff.cpp 2014-07-20 22:59:50.360692743 +0200
-@@ -368,7 +368,7 @@
- * We provide our own based on IPRT instead of using the kLdr ones.
- */
- extern "C" const KRDROPS g_kLdrRdrFileOps;
--extern "C" const KRDROPS g_kLdrRdrFileOps =
-+const KRDROPS g_kLdrRdrFileOps __attribute__((section(".rodata"))) =
- {
- /* .pszName = */ "IPRT",
- /* .pNext = */ NULL,