summaryrefslogtreecommitdiff
path: root/nvidia-settings
diff options
context:
space:
mode:
authorDanny Rawlins <contact@romster.me>2021-09-19 17:10:00 +1000
committerDanny Rawlins <contact@romster.me>2021-09-19 17:10:00 +1000
commitcc758f06ce602fba9d0cf25af9dbba39843b2869 (patch)
tree8525ba14c9d47e1f3a7bcbfd6545d48456afcf7e /nvidia-settings
parent35bdd9cd1e6940997dc9eb2071d69eaa5d8aef14 (diff)
downloadopt-cc758f06ce602fba9d0cf25af9dbba39843b2869.tar.gz
opt-cc758f06ce602fba9d0cf25af9dbba39843b2869.tar.xz
nvidia-settings: initial import
Diffstat (limited to 'nvidia-settings')
-rw-r--r--nvidia-settings/.footprint12
-rw-r--r--nvidia-settings/.signature6
-rw-r--r--nvidia-settings/Pkgfile41
-rw-r--r--nvidia-settings/libxnvctrl_so.patch36
4 files changed, 95 insertions, 0 deletions
diff --git a/nvidia-settings/.footprint b/nvidia-settings/.footprint
new file mode 100644
index 000000000..35dc7e2ba
--- /dev/null
+++ b/nvidia-settings/.footprint
@@ -0,0 +1,12 @@
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/include/
+drwxr-xr-x root/root usr/include/NVCtrl/
+-rw-r--r-- root/root usr/include/NVCtrl/NVCtrl.h
+-rw-r--r-- root/root usr/include/NVCtrl/NVCtrlLib.h
+-rw-r--r-- root/root usr/include/NVCtrl/nv_control.h
+drwxr-xr-x root/root usr/lib/
+-rw-r--r-- root/root usr/lib/libXNVCtrl.a
+lrwxrwxrwx root/root usr/lib/libXNVCtrl.so -> libXNVCtrl.so.0.0.0
+lrwxrwxrwx root/root usr/lib/libXNVCtrl.so.0 -> libXNVCtrl.so.0.0.0
+-rwxr-xr-x root/root usr/lib/libXNVCtrl.so.0.0.0
+-rw-r--r-- root/root usr/lib/libnvidia-gtk3.so.470.63.01
diff --git a/nvidia-settings/.signature b/nvidia-settings/.signature
new file mode 100644
index 000000000..6054af64c
--- /dev/null
+++ b/nvidia-settings/.signature
@@ -0,0 +1,6 @@
+untrusted comment: verify with /etc/ports/opt.pub
+RWSE3ohX2g5d/Y5Sqwa7tMgVvP9+IhFTfMsa47TkGvR+oyvIGkWm18OyTyLbJlPPs4ZAT297pg8yVqK1tPWHvuiRNwSEilDoYgU=
+SHA256 (Pkgfile) = 132c99c25f39c50cb3e4590b2a7d22d0f1d4bd6f8b189ad2d3003d74e697c5f7
+SHA256 (.footprint) = 5bd1ad4c7517ee85681137ed39f5d5b1535ed086c039356c05533cad020f196a
+SHA256 (nvidia-settings-470.63.01.tar.gz) = 4cca3f3a25e4c84458839337b18b5d41738e87fea58e68936ea7ef43658f7cb9
+SHA256 (libxnvctrl_so.patch) = 6419d83baf102a4a2eaeb95d0c97856bfaf47ceed46e4aa1fc2249913e2f301b
diff --git a/nvidia-settings/Pkgfile b/nvidia-settings/Pkgfile
new file mode 100644
index 000000000..ba65a8425
--- /dev/null
+++ b/nvidia-settings/Pkgfile
@@ -0,0 +1,41 @@
+# Description: Tool for configuring the NVIDIA graphics driver
+# URL: https://github.com/NVIDIA/nvidia-settings
+# Maintainer: CRUX System Team, core-ports at crux dot nu
+# Depends on: brotli gtk3 xorg-libxcomposite xorg-libxcursor xorg-libxinerama
+
+name=nvidia-settings
+version=470.63.01
+release=1
+source=(https://github.com/NVIDIA/nvidia-settings/archive/$version/$name-$version.tar.gz
+ libxnvctrl_so.patch)
+
+build() {
+ export PREFIX=/usr
+ export NV_USE_BUNDLED_LIBJANSSON=0
+ export OUTPUTDIR=out
+ cd $name-$version
+ patch -p0 -i $SRC/libxnvctrl_so.patch
+
+ make
+ make -C src/libXNVCtrl
+ make DESTDIR=$PKG install
+
+ rm $PKG/usr/lib/libnvidia-gtk2.so.$version
+
+# supplied by nvidia
+# install -D -m644 doc/nvidia-settings.desktop $PKG/usr/share/applications/nvidia-settings.desktop
+# install -D -m644 doc/nvidia-settings.png $PKG/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 $PKG/usr/share/applications/nvidia-settings.desktop
+ rm $PKG/usr/bin/nvidia-settings $PKG/usr/share/man/man1/nvidia-settings.1.gz
+ find $PKG -type d -empty -delete
+#
+ cd src/libXNVCtrl
+ install -Dm 644 -t $PKG/usr/include/NVCtrl ./*.h
+ install -d $PKG/usr/lib
+ cp -Pr -t $PKG/usr/lib out/libXNVCtrl.*
+}
diff --git a/nvidia-settings/libxnvctrl_so.patch b/nvidia-settings/libxnvctrl_so.patch
new file mode 100644
index 000000000..664ab9822
--- /dev/null
+++ b/nvidia-settings/libxnvctrl_so.patch
@@ -0,0 +1,36 @@
+--- src/libXNVCtrl/Makefile 2019-07-30 00:26:56.000000000 +0200
++++ src/libXNVCtrl/Makefile 2019-08-02 14:08:56.963744238 +0200
+@@ -50,8 +50,8 @@
+
+ .PHONY: clean
+
+-all: $(LIBXNVCTRL)
++all: $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)
+
+ clean:
+- rm -rf $(LIBXNVCTRL) *~ \
++ rm -rf $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)* *~ \
+ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
+--- src/libXNVCtrl/xnvctrl.mk 2019-08-02 17:04:08.216230565 +0200
++++ src/libXNVCtrl/xnvctrl.mk 2019-08-02 17:08:02.563660632 +0200
+@@ -39,6 +39,11 @@
+
+ LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a
+
++LIBXNVCTRL_SHARED = $(OUTPUTDIR)/libXNVCtrl.so
++LIBXNVCTRL_ABI_VERSION_MAJOR = 0
++LIBXNVCTRL_ABI_VERSION_MINOR = 0
++LIBXNVCTRL_LIBS += -lXext -lX11
++
+ LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c
+
+ LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC))
+@@ -47,3 +52,8 @@
+
+ $(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ)
+ $(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ)
++
++$(LIBXNVCTRL_SHARED) : $(LIBXNVCTRL_OBJ)
++ $(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname=$(notdir $@).${LIBXNVCTRL_ABI_VERSION_MAJOR} -o $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $^ $(LIBXNVCTRL_LIBS)
++ ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@
++ ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR)

Generated by cgit