git: d1b7aad5f3cc - main - x11-servers/xorg-server: complete libmap.d switch after 50a34a07740e

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 12 Aug 2023 22:59:03 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d1b7aad5f3cc475b86222599d0e9eb8d73b3c841

commit d1b7aad5f3cc475b86222599d0e9eb8d73b3c841
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-05-27 20:44:33 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-08-12 22:58:06 +0000

    x11-servers/xorg-server: complete libmap.d switch after 50a34a07740e
    
    libmap.conf(5) supports dlopen(3) but xorg-server uses absolute paths.
    
    PR:             271686
    Reviewed by:    gallatin
---
 x11-servers/xorg-server/Makefile                    |  9 +--------
 x11-servers/xorg-server/files/pkg-post-deinstall.in |  1 -
 x11-servers/xorg-server/files/pkg-post-install.in   | 11 -----------
 x11-servers/xorg-server/pkg-plist                   |  2 +-
 x11/nvidia-driver-304/Makefile                      |  2 +-
 x11/nvidia-driver-340/Makefile                      |  2 +-
 x11/nvidia-driver-390/Makefile                      |  2 +-
 x11/nvidia-driver/Makefile                          |  3 ---
 x11/nvidia-driver/files/nvidia.conf.in              |  2 ++
 x11/nvidia-driver/files/pkg-deinstall.in            | 12 ------------
 x11/nvidia-driver/files/pkg-install.in              | 10 ----------
 11 files changed, 7 insertions(+), 49 deletions(-)

diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile
index 3489488c8bc4..06ab654918b0 100644
--- a/x11-servers/xorg-server/Makefile
+++ b/x11-servers/xorg-server/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xorg
 PORTVERSION=	21.1.8
-PORTREVISION=	3
+PORTREVISION=	4
 PORTEPOCH=	1
 CATEGORIES=	x11-servers
 MASTER_SITES=	XORG/individual/xserver
@@ -24,9 +24,6 @@ USE_GL=		gl
 PORTNAME=	xephyr
 .elif  ${FLAVOR} == xorg
 PKGNAMESUFFIX=	-server
-SUB_FILES=	pkg-post-deinstall pkg-post-install
-PKGPOSTINSTALL= ${WRKDIR}/pkg-post-install
-PKGPOSTDEINSTALL=	${WRKDIR}/pkg-post-deinstall
 .elif ${FLAVOR} == xnest
 PORTEPOCH=	2
 PKGNAMESUFFIX= -nestserver
@@ -133,10 +130,6 @@ PLIST_SUB+=	SPARC64="@comment "
 
 .if ${FLAVOR} == xorg
 post-install:
-	# Avoid conflict with nvidia-driver, move libglx.so into .xorg directory
-	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
-	${MV} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so \
-		${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
 	@${MKDIR} ${STAGEDIR}${FONTPATHD}
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d
diff --git a/x11-servers/xorg-server/files/pkg-post-deinstall.in b/x11-servers/xorg-server/files/pkg-post-deinstall.in
deleted file mode 100644
index 8d5bca04c35e..000000000000
--- a/x11-servers/xorg-server/files/pkg-post-deinstall.in
+++ /dev/null
@@ -1 +0,0 @@
-rm -f ${PKG_ROOTDIR}${PKG_PREFIX}/lib/xorg/modules/extensions/libglx.so
diff --git a/x11-servers/xorg-server/files/pkg-post-install.in b/x11-servers/xorg-server/files/pkg-post-install.in
deleted file mode 100644
index 17bfe3cda643..000000000000
--- a/x11-servers/xorg-server/files/pkg-post-install.in
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-PREFIX=${PKG_PREFIX-/usr/local}
-
-if [ -e ${PKG_ROOTDIR}${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so ]; then
-install -l rs ${PKG_ROOTDIR}${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so \
-	${PKG_ROOTDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so
-else
-install -l rs ${PKG_ROOTDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
-	${PKG_ROOTDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so
-fi
diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist
index c24eecb4f673..1277ba701dcf 100644
--- a/x11-servers/xorg-server/pkg-plist
+++ b/x11-servers/xorg-server/pkg-plist
@@ -160,7 +160,7 @@ include/xorg/xvdix.h
 include/xorg/xvmcext.h
 include/xorg/xf86-input-inputtest-protocol.h
 lib/xorg/modules/drivers/modesetting_drv.so
-lib/xorg/modules/extensions/.xorg/libglx.so
+lib/xorg/modules/extensions/libglx.so
 lib/xorg/modules/input/inputtest_drv.so
 lib/xorg/modules/libexa.so
 lib/xorg/modules/libglamoregl.so
diff --git a/x11/nvidia-driver-304/Makefile b/x11/nvidia-driver-304/Makefile
index d25e094b8d41..737adc80c52f 100644
--- a/x11/nvidia-driver-304/Makefile
+++ b/x11/nvidia-driver-304/Makefile
@@ -1,6 +1,6 @@
 DISTVERSION=	304.137
 # Explicitly set PORTREVISION as it can be overridden by the master port
-PORTREVISION=	9
+PORTREVISION=	10
 
 MASTERDIR=	${.CURDIR}/../nvidia-driver
 PKGNAMESUFFIX=	-304
diff --git a/x11/nvidia-driver-340/Makefile b/x11/nvidia-driver-340/Makefile
index 5c3345ca2634..adeee49ab528 100644
--- a/x11/nvidia-driver-340/Makefile
+++ b/x11/nvidia-driver-340/Makefile
@@ -1,6 +1,6 @@
 DISTVERSION=	340.108
 # Explicitly set PORTREVISION as it can be overridden by the master port
-PORTREVISION=	3
+PORTREVISION=	4
 
 MASTERDIR=	${.CURDIR}/../nvidia-driver
 PKGNAMESUFFIX=	-340
diff --git a/x11/nvidia-driver-390/Makefile b/x11/nvidia-driver-390/Makefile
index 63220845e3a7..71b473d0b033 100644
--- a/x11/nvidia-driver-390/Makefile
+++ b/x11/nvidia-driver-390/Makefile
@@ -1,6 +1,6 @@
 DISTVERSION=	390.154
 # Explicitly set PORTREVISION as it can be overridden by the master port
-PORTREVISION=	0
+PORTREVISION=	1
 
 MASTERDIR=	${.CURDIR}/../nvidia-driver
 PKGNAMESUFFIX=	-390
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 192af52bc549..a90e005e1252 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -64,9 +64,6 @@ SUB_FILES=	pkg-message
 .if !defined(LIBGLDIR)
 SUB_FILES+=	nvidia.conf
 .endif
-.if ${NVVERSION} < 410.057
-SUB_FILES+=	pkg-deinstall pkg-install
-.endif
 SUB_PATCHES=	extra-patch-src-Makefile \
 		extra-patch-src-nv-freebsd.h
 .if ${NVVERSION} < 510.03901
diff --git a/x11/nvidia-driver/files/nvidia.conf.in b/x11/nvidia-driver/files/nvidia.conf.in
index 29eba5fa0075..d87cdc4d7a27 100644
--- a/x11/nvidia-driver/files/nvidia.conf.in
+++ b/x11/nvidia-driver/files/nvidia.conf.in
@@ -3,6 +3,8 @@
 libGL.so	libGL-NVIDIA.so
 libGL.so.1	libGL-NVIDIA.so.1
 
+%%PREFIX%%/lib/xorg/modules/extensions/libglx.so %%PREFIX%%/lib/xorg/modules/extensions/.nvidia/libglx.so
+
 %%NVGL%%libEGL.so	libEGL-NVIDIA.so
 %%NVGL%%libEGL.so.1	libEGL-NVIDIA.so.1
 
diff --git a/x11/nvidia-driver/files/pkg-deinstall.in b/x11/nvidia-driver/files/pkg-deinstall.in
deleted file mode 100644
index d68b850fa9ea..000000000000
--- a/x11/nvidia-driver/files/pkg-deinstall.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-PREFIX=${PKG_PREFIX-/usr/local}
-
-case $2 in
-DEINSTALL)
-	/bin/rm -f ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
-
-	/bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
-		${PREFIX}/lib/xorg/modules/extensions/libglx.so
-	;;
-esac
diff --git a/x11/nvidia-driver/files/pkg-install.in b/x11/nvidia-driver/files/pkg-install.in
deleted file mode 100644
index 56634602563e..000000000000
--- a/x11/nvidia-driver/files/pkg-install.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-PREFIX=${PKG_PREFIX-/usr/local}
-
-case $2 in
-POST-INSTALL)
-	/bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
-		${PREFIX}/lib/xorg/modules/extensions/libglx.so
-	;;
-esac