diff options
author | Lucas Canonaco | 2021-09-05 04:42:32 -0300 |
---|---|---|
committer | Lucas Canonaco | 2021-09-05 04:42:32 -0300 |
commit | 0d9c88482cfb2575e12f62ec1f19089e11988ce5 (patch) | |
tree | 3f8103c582c29d59a4346b669d2242b86fa6ea98 | |
download | aur-0d9c88482cfb2575e12f62ec1f19089e11988ce5.tar.gz |
there are no packages related to nvidia 430xx legacy branch. first commit intended for making this version available for download in the AUR
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | 0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch | 111 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | libxnvctrl_so.patch | 67 |
4 files changed, 287 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..22d4b53f5059 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,40 @@ +pkgbase = nvidia-430xx-settings + pkgdesc = Tool for configuring the NVIDIA graphics driver, 430xx legacy branch + pkgver = 430.40 + pkgrel = 1 + url = https://github.com/NVIDIA/nvidia-settings + arch = x86_64 + license = GPL2 + makedepends = git + makedepends = inetutils + makedepends = jansson + makedepends = gtk2 + makedepends = gtk3 + makedepends = libxv + makedepends = libvdpau + makedepends = nvidia-430xx-utils + makedepends = libxext + options = staticlibs + source = nvidia-settings-430.40.tar.gz::https://github.com/NVIDIA/nvidia-settings/archive/430.40.tar.gz + source = libxnvctrl_so.patch + source = 0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch + sha512sums = 7e21282a1d8f0f4096b779fa5d0ac984d5faaf1dc27e30ba65b033ec07490908ece1daf30a113f799979261454cfd57fc87260bddafd9f64df969ab06714f271 + sha512sums = f69f5dc84fe624579a3c9ce877f4ae4e34c2184877576afbea07b8abdd7ff01e470517f2b77cd11a904518cbcb83fb388ca1d08888006f0ef2854723920c9cf8 + sha512sums = 0fd6355a10dfecb3636764f40eb0d4a4625f69e48fb653060f40e2bde8bf51eb04ae08be8751163d94e022c6f595a9756cde9d8404a556a4a83e3b5b74052c53 + +pkgname = nvidia-430xx-settings + depends = jansson + depends = gtk3 + depends = libxv + depends = libvdpau + depends = nvidia-430xx-utils + depends = libxnvctrl-430xx + provides = nvidia-settings + conflicts = nvidia-settings + +pkgname = libxnvctrl-430xx + pkgdesc = NVIDIA NV-CONTROL X extension, 430xx legacy branch + depends = libxext + provides = libxnvctrl + provides = libXNVCtrl.so + conflicts = libxnvctrl diff --git a/0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch b/0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch new file mode 100644 index 000000000000..7c1301fbf22e --- /dev/null +++ b/0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch @@ -0,0 +1,111 @@ +From a7c1f5fce6303a643fadff7d85d59934bd0cf6b6 Mon Sep 17 00:00:00 2001 +From: Aaron Plattner <aplattner@nvidia.com> +Date: Mon, 18 May 2020 15:27:01 -0700 +Subject: [PATCH] nvidia-settings: Make VDPAUDeviceFunctions static to + ctkvdpau.c + +GCC 10 defaults to building with -fno-common, which exposes a bug in +nvidia-settings: The VDPAUDeviceFunctions structure is defined as global in +ctkvdpau.h, so both ctkvdpau.o and ctkwindow.o have it as a global, non-static +"tentative definition" symbol. The GCC 10 man page describes it like this: + + -fcommon + In C code, this option controls the placement of global variables + defined without an initializer, known as tentative definitions in + the C standard. Tentative definitions are distinct from + declarations of a variable with the "extern" keyword, which do not + allocate storage. + + The default is -fno-common, which specifies that the compiler + places uninitialized global variables in the BSS section of the + object file. This inhibits the merging of tentative definitions by + the linker so you get a multiple-definition error if the same + variable is accidentally defined in more than one compilation unit. + + The -fcommon places uninitialized global variables in a common + block. This allows the linker to resolve all tentative definitions + of the same variable in different compilation units to the same + object, or to a non-tentative definition. This behavior is + inconsistent with C++, and on many targets implies a speed and code + size penalty on global variable references. It is mainly useful to + enable legacy code to link without errors. + +Since the copy of VDPAUDeviceFunctions in ctkwindow.o is not used, just remove +it by moving the definition of this structure into ctkvdpau.c. +--- + src/gtk+-2.x/ctkvdpau.c | 23 +++++++++++++++++++++++ + src/gtk+-2.x/ctkvdpau.h | 24 ------------------------ + 2 files changed, 23 insertions(+), 24 deletions(-) + +diff --git a/src/gtk+-2.x/ctkvdpau.c b/src/gtk+-2.x/ctkvdpau.c +index 2f120f0..6149c28 100644 +--- a/src/gtk+-2.x/ctkvdpau.c ++++ b/src/gtk+-2.x/ctkvdpau.c +@@ -103,6 +103,29 @@ const gchar* __video_mixer_parameter_help = + const gchar* __video_mixer_attribute_help = + "This shows the video mixer attributes and any applicable ranges."; + ++static struct VDPAUDeviceImpl { ++ ++ VdpGetErrorString *GetErrorString; ++ VdpGetProcAddress *GetProcAddress; ++ VdpGetApiVersion *GetApiVersion; ++ VdpGetInformationString *GetInformationString; ++ VdpVideoSurfaceQueryCapabilities *VideoSurfaceQueryCapabilities; ++ VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities ++ *VideoSurfaceQueryGetPutBitsYCbCrCapabilities; ++ VdpOutputSurfaceQueryCapabilities *OutputSurfaceQueryCapabilities; ++ VdpOutputSurfaceQueryGetPutBitsNativeCapabilities ++ *OutputSurfaceQueryGetPutBitsNativeCapabilities; ++ VdpOutputSurfaceQueryPutBitsYCbCrCapabilities ++ *OutputSurfaceQueryPutBitsYCbCrCapabilities; ++ VdpBitmapSurfaceQueryCapabilities *BitmapSurfaceQueryCapabilities; ++ VdpDecoderQueryCapabilities *DecoderQueryCapabilities; ++ VdpVideoMixerQueryFeatureSupport *VideoMixerQueryFeatureSupport; ++ VdpVideoMixerQueryParameterSupport *VideoMixerQueryParameterSupport; ++ VdpVideoMixerQueryAttributeSupport *VideoMixerQueryAttributeSupport; ++ VdpVideoMixerQueryParameterValueRange *VideoMixerQueryParameterValueRange; ++ VdpVideoMixerQueryAttributeValueRange *VideoMixerQueryAttributeValueRange; ++} VDPAUDeviceFunctions; ++ + static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device, + VdpGetProcAddress *getProcAddress); + +diff --git a/src/gtk+-2.x/ctkvdpau.h b/src/gtk+-2.x/ctkvdpau.h +index ec58d36..2652f6f 100644 +--- a/src/gtk+-2.x/ctkvdpau.h ++++ b/src/gtk+-2.x/ctkvdpau.h +@@ -45,30 +45,6 @@ G_BEGIN_DECLS + #define CTK_VDPAU_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), CTK_TYPE_VDPAU, CtkVDPAUClass)) + +- +-struct VDPAUDeviceImpl { +- +- VdpGetErrorString *GetErrorString; +- VdpGetProcAddress *GetProcAddress; +- VdpGetApiVersion *GetApiVersion; +- VdpGetInformationString *GetInformationString; +- VdpVideoSurfaceQueryCapabilities *VideoSurfaceQueryCapabilities; +- VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities +- *VideoSurfaceQueryGetPutBitsYCbCrCapabilities; +- VdpOutputSurfaceQueryCapabilities *OutputSurfaceQueryCapabilities; +- VdpOutputSurfaceQueryGetPutBitsNativeCapabilities +- *OutputSurfaceQueryGetPutBitsNativeCapabilities; +- VdpOutputSurfaceQueryPutBitsYCbCrCapabilities +- *OutputSurfaceQueryPutBitsYCbCrCapabilities; +- VdpBitmapSurfaceQueryCapabilities *BitmapSurfaceQueryCapabilities; +- VdpDecoderQueryCapabilities *DecoderQueryCapabilities; +- VdpVideoMixerQueryFeatureSupport *VideoMixerQueryFeatureSupport; +- VdpVideoMixerQueryParameterSupport *VideoMixerQueryParameterSupport; +- VdpVideoMixerQueryAttributeSupport *VideoMixerQueryAttributeSupport; +- VdpVideoMixerQueryParameterValueRange *VideoMixerQueryParameterValueRange; +- VdpVideoMixerQueryAttributeValueRange *VideoMixerQueryAttributeValueRange; +-} VDPAUDeviceFunctions; +- + /* Generic description structure */ + typedef struct + { +-- +2.27.0 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..94959bba977b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Lucas Canonaco <canolucas@gmail.com> + +pkgbase=nvidia-430xx-settings +pkgname=('nvidia-430xx-settings' 'libxnvctrl-430xx') +pkgver=430.40 +pkgrel=1 +pkgdesc='Tool for configuring the NVIDIA graphics driver, 430xx legacy branch' +url='https://github.com/NVIDIA/nvidia-settings' +arch=('x86_64') +license=('GPL2') +makedepends=('git' 'inetutils' 'jansson' 'gtk2' 'gtk3' 'libxv' 'libvdpau' 'nvidia-430xx-utils' 'libxext') +options=('staticlibs') +source=(nvidia-settings-${pkgver}.tar.gz::https://github.com/NVIDIA/nvidia-settings/archive/${pkgver}.tar.gz + libxnvctrl_so.patch + 0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch) +sha512sums=('7e21282a1d8f0f4096b779fa5d0ac984d5faaf1dc27e30ba65b033ec07490908ece1daf30a113f799979261454cfd57fc87260bddafd9f64df969ab06714f271' + 'f69f5dc84fe624579a3c9ce877f4ae4e34c2184877576afbea07b8abdd7ff01e470517f2b77cd11a904518cbcb83fb388ca1d08888006f0ef2854723920c9cf8' + '0fd6355a10dfecb3636764f40eb0d4a4625f69e48fb653060f40e2bde8bf51eb04ae08be8751163d94e022c6f595a9756cde9d8404a556a4a83e3b5b74052c53') + +prepare() { + cd nvidia-settings-${pkgver} + patch -p1 < "${srcdir}/libxnvctrl_so.patch" + patch -p1 < "${srcdir}/0001-nvidia-settings-Make-VDPAUDeviceFunctions-static-to-.patch" +} + +build() { + # Set env variables + export PREFIX=/usr + export NV_USE_BUNDLED_LIBJANSSON=0 + + cd nvidia-settings-${pkgver} + make + make -C src/libXNVCtrl +} + +package_nvidia-430xx-settings() { + depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-430xx-utils' 'libxnvctrl-430xx') + conflicts=('nvidia-settings') + provides=('nvidia-settings') + + cd nvidia-settings-${pkgver} + make DESTDIR="${pkgdir}" install + + install -D -m644 doc/nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop" + install -D -m644 doc/nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png" + sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -e 's/__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__/Settings;HardwareSettings;/' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop" + + rm "$pkgdir/usr/lib/libnvidia-gtk2.so.$pkgver" +} + +package_libxnvctrl-430xx() { + depends=('libxext') + pkgdesc='NVIDIA NV-CONTROL X extension, 430xx legacy branch' + provides=('libxnvctrl' 'libXNVCtrl.so') + conflicts=('libxnvctrl') + + cd nvidia-settings-${pkgver} + install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples" + + cd src/libXNVCtrl + install -Dm 644 *.h -t "${pkgdir}/usr/include/NVCtrl" + install -Dm 644 libXNVCtrl.a -t "${pkgdir}/usr/lib" + install -Dm 755 libXNVCtrl.so.0.0.0 -t "${pkgdir}/usr/lib" + ln -s libXNVCtrl.so.0.0.0 "${pkgdir}/usr/lib/libXNVCtrl.so.0" + ln -s libXNVCtrl.so.0 "${pkgdir}/usr/lib/libXNVCtrl.so" +} + +# vim: ts=2 sw=2 et: diff --git a/libxnvctrl_so.patch b/libxnvctrl_so.patch new file mode 100644 index 000000000000..724064e7ef65 --- /dev/null +++ b/libxnvctrl_so.patch @@ -0,0 +1,67 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -106,6 +106,8 @@ + XNVCTRL_DIR ?= libXNVCtrl + XNVCTRL_MAKEFILE ?= Makefile + XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a ++XNVCTRL_SHARED ?= $(XNVCTRL_DIR)/libXNVCtrl.so.0 ++XNVCTRL_LIB ?= $(XNVCTRL_SHARED) + XCONFIG_PARSER_DIR ?= XF86Config-parser + COMMON_UTILS_DIR ?= common-utils + COMMON_UNIX_DIR ?= common-unix +@@ -280,15 +282,18 @@ + $(MKDIR) $(BINDIR) + $(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<) + ++$(XNVCTRL_ARCHIVE) $(XNVCTRL_SHARED): ++ $(MAKE) -C $(XNVCTRL_DIR) ++ + $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS))) +-$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_ARCHIVE) ++$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_LIB) + $(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- -rdynamic -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) $(LIBS) ++ -rdynamic -o $@ $(OBJS) $(XNVCTRL_LIB) $(LIBS) + + $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB))) + $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK2_LIBS) \ ++ $(XNVCTRL_LIB) $(LIBS) $(GTK2_LIBS) \ + -Wl,--unresolved-symbols=ignore-all -o $@ \ + -Wl,-soname -Wl,$(GTK2LIB_SONAME) \ + $(GTK2_OBJS) $(XCP_OBJS) +@@ -297,7 +302,7 @@ + $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB))) + $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XCP_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK3_LIBS) \ ++ $(XNVCTRL_LIB) $(LIBS) $(GTK3_LIBS) \ + -Wl,--unresolved-symbols=ignore-all -o $@ \ + -Wl,-soname -Wl,$(GTK3LIB_SONAME) \ + $(GTK3_OBJS) $(XCP_OBJS) +--- a/src/libXNVCtrl/Makefile ++++ b/src/libXNVCtrl/Makefile +@@ -55,10 +55,17 @@ + .PHONY: clean + + all: $(LIBXNVCTRL) ++all: libXNVCtrl.so + + $(LIBXNVCTRL) : $(OBJS) + $(AR) ru $@ $(OBJS) + ++libXNVCtrl.so: $(OBJS) ++ $(RM) $@ $@.* ++ $(CC) -shared -Wl,-soname=$@.0 -o $@.0.0.0 $(LDFLAGS) $^ -lXext -lX11 ++ ln -s $@.0.0.0 $@.0 ++ ln -s $@.0 $@ ++ + # define the rule to build each object file + $(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src)))) + +@@ -68,3 +75,4 @@ + clean: + rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \ + $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d ++ rm -f libXNVCtrl.so libXNVCtrl.so.* |