x11-drivers/nvidia-drivers: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 19:48:14 +0000 (20:48 +0100)
committerJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 19:55:43 +0000 (20:55 +0100)
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/706742
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
x11-drivers/nvidia-drivers/files/nvidia-settings-fno-common.patch [new file with mode: 0644]
x11-drivers/nvidia-drivers/nvidia-drivers-340.108.ebuild
x11-drivers/nvidia-drivers/nvidia-drivers-390.132-r1.ebuild
x11-drivers/nvidia-drivers/nvidia-drivers-430.64-r1.ebuild
x11-drivers/nvidia-drivers/nvidia-drivers-435.21-r1.ebuild
x11-drivers/nvidia-drivers/nvidia-drivers-440.44-r1.ebuild

diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings-fno-common.patch b/x11-drivers/nvidia-drivers/files/nvidia-settings-fno-common.patch
new file mode 100644 (file)
index 0000000..06e046f
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/nvidia-settings-@PV@/src/gtk+-2.x/ctkvdpau.c
++++ b/nvidia-settings-@PV@/src/gtk+-2.x/ctkvdpau.c
+@@ -103,6 +103,8 @@
+ const gchar* __video_mixer_attribute_help =
+ "This shows the video mixer attributes and any applicable ranges.";
++struct VDPAUDeviceImpl VDPAUDeviceFunctions;
++
+ static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device,
+                               VdpGetProcAddress *getProcAddress);
+--- a/nvidia-settings-@PV@/src/gtk+-2.x/ctkvdpau.h
++++ b/nvidia-settings-@PV@/src/gtk+-2.x/ctkvdpau.h
+@@ -46,7 +46,7 @@
+     (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_VDPAU, CtkVDPAUClass))
+-struct VDPAUDeviceImpl {
++extern struct VDPAUDeviceImpl {
+     VdpGetErrorString *GetErrorString;
+     VdpGetProcAddress *GetProcAddress;
index eb2eff41ca7431d032d23d2f55bdd4c70f04d5be..103ebfe12f10636727f57f98d234e960b85c9e59 100644 (file)
@@ -142,6 +142,15 @@ src_prepare() {
                gunzip $man_file || die
        done
 
+       if use tools; then
+               cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
+               sed -i \
+                       -e "s:@PV@:${PV}:g" \
+                       "${WORKDIR}"/nvidia-settings-fno-common.patch \
+                       || die
+               eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
+       fi
+
        # Allow user patches so they can support RC kernels and whatever else
        eapply_user
 }
index b47a737853e49b7899df3e9052dffb0aa975dadc..4105f9051740bf1ddeb5d16a17b987e2ff9af42a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -151,10 +151,14 @@ src_prepare() {
        done
 
        if use tools; then
+               cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
                cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
                sed -i \
                        -e "s:@PV@:${PV}:g" \
-                       "${WORKDIR}"/nvidia-settings-linker.patch || die
+                       "${WORKDIR}"/nvidia-settings-fno-common.patch \
+                       "${WORKDIR}"/nvidia-settings-linker.patch \
+                       || die
+               eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
                eapply "${WORKDIR}"/nvidia-settings-linker.patch
        fi
 
index e6e492ff959079c8b3eb0cb5f09b9195ea42df54..3703f7a20d3c79254ae04afeadb9c38a309c56c5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -149,10 +149,14 @@ src_prepare() {
        done
 
        if use tools; then
+               cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
                cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
                sed -i \
                        -e "s:@PV@:${PV}:g" \
-                       "${WORKDIR}"/nvidia-settings-linker.patch || die
+                       "${WORKDIR}"/nvidia-settings-fno-common.patch \
+                       "${WORKDIR}"/nvidia-settings-linker.patch \
+                       || die
+               eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
                eapply "${WORKDIR}"/nvidia-settings-linker.patch
        fi
 
index e8abec24def69af05aa68a641b3defb742b103a3..33342e4c716a5ce6e18aa48b5da854ef53920a1f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -153,10 +153,14 @@ src_prepare() {
        done
 
        if use tools; then
+               cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
                cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
                sed -i \
                        -e "s:@PV@:${PV}:g" \
-                       "${WORKDIR}"/nvidia-settings-linker.patch || die
+                       "${WORKDIR}"/nvidia-settings-fno-common.patch \
+                       "${WORKDIR}"/nvidia-settings-linker.patch \
+                       || die
+               eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
                eapply "${WORKDIR}"/nvidia-settings-linker.patch
        fi
 
index 6be7d51e602c9fba8b235851a6dc0de849e85867..2951a064fcdb4744f340eff1cf5ba71337a586b4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -156,10 +156,14 @@ src_prepare() {
        done
 
        if use tools; then
+               cp "${FILESDIR}"/nvidia-settings-fno-common.patch "${WORKDIR}" || die
                cp "${FILESDIR}"/nvidia-settings-linker.patch "${WORKDIR}" || die
                sed -i \
                        -e "s:@PV@:${PV}:g" \
-                       "${WORKDIR}"/nvidia-settings-linker.patch || die
+                       "${WORKDIR}"/nvidia-settings-fno-common.patch \
+                       "${WORKDIR}"/nvidia-settings-linker.patch \
+                       || die
+               eapply "${WORKDIR}"/nvidia-settings-fno-common.patch
                eapply "${WORKDIR}"/nvidia-settings-linker.patch
        fi