[arch-commits] Commit in nvidia-settings/trunk (PKGBUILD libxnvctrl_so.patch)

Levente Polyak anthraxx at archlinux.org
Mon Aug 5 15:05:02 UTC 2019


    Date: Monday, August 5, 2019 @ 15:05:01
  Author: anthraxx
Revision: 359187

upgpkg: nvidia-settings 430.40-2 (add shared libxnvctrl)

Added:
  nvidia-settings/trunk/libxnvctrl_so.patch
Modified:
  nvidia-settings/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   13 ++++++++-----
 libxnvctrl_so.patch |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-05 12:00:43 UTC (rev 359186)
+++ PKGBUILD	2019-08-05 15:05:01 UTC (rev 359187)
@@ -5,7 +5,7 @@
 pkgbase=nvidia-settings
 pkgname=('nvidia-settings' 'libxnvctrl')
 pkgver=430.40
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool for configuring the NVIDIA graphics driver'
 url='https://github.com/NVIDIA/nvidia-settings'
 arch=('x86_64')
@@ -15,12 +15,14 @@
 source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/NVIDIA/nvidia-settings/archive/${pkgver}.tar.gz
         libxnvctrl_so.patch)
 sha512sums=('b45591e2acd0cf35ef96d416727c7fc9c79d02177546084e0e2c939a5f6ad4a3a3c11db45131c2e2ca43c72f13f83c03f03a502a75e07aefaba208c137938c04'
-            'f69f5dc84fe624579a3c9ce877f4ae4e34c2184877576afbea07b8abdd7ff01e470517f2b77cd11a904518cbcb83fb388ca1d08888006f0ef2854723920c9cf8')
+            '51c2d1360ef13758b4196031ac3fcff3a3b328831f32929e26a6ab72e29ebaacc776d23e9f3cc0813160774f6c3ead37950280883c899df24ad0e368fc54e5bc')
 
 prepare() {
   export PREFIX=/usr
   export NV_USE_BUNDLED_LIBJANSSON=0
-  export OUTPUTDIR="out"
+  export OUTPUTDIR=out
+  cd ${pkgbase}-${pkgver}
+  patch -p0 < "${srcdir}/libxnvctrl_so.patch"
 }
 
 build() {
@@ -45,6 +47,7 @@
 package_libxnvctrl() {
   depends=('libxext')
   pkgdesc='NVIDIA NV-CONTROL X extension'
+  provides=('libXNVCtrl.so')
 
   cd ${pkgbase}-${pkgver}
   install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
@@ -51,8 +54,8 @@
   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 out/libXNVCtrl.a -t "${pkgdir}/usr/lib"
+  install -Dm 644 ./*.h -t "${pkgdir}/usr/include/NVCtrl"
+  install -Dm 755 out/libXNVCtrl.* -t "${pkgdir}/usr/lib"
 }
 
 # vim: ts=2 sw=2 et:

Added: libxnvctrl_so.patch
===================================================================
--- libxnvctrl_so.patch	                        (rev 0)
+++ libxnvctrl_so.patch	2019-08-05 15:05:01 UTC (rev 359187)
@@ -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) $(LDFALGS) -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)


More information about the arch-commits mailing list