package/nvidia-driver: fix build without X.org drivers
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 19 Aug 2021 17:21:54 +0000 (19:21 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Thu, 19 Aug 2021 19:59:43 +0000 (21:59 +0200)
Fix the following build failure without BR2_PACKAGE_NVIDIA_DRIVER_XORG
raised since commit 9cda982855315d683d4880e6bb2a129133ea7213:

ln: failed to create symbolic link '/tmp/instance-0/output-1/target/usr/lib/xorg/modules/extensions/libglx.so': No such file or directory

Fixes:
 - http://autobuild.buildroot.org/results/c2e7a826c105363309f70a3fcfe28bd53efcb94a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/nvidia-driver/nvidia-driver.mk

index 7e89c1ab017b72dc41419cd4b4a217ad7b8ca2b0..54c2aa46d81c79882a515b70dcf200e5294b4e81 100644 (file)
@@ -96,6 +96,12 @@ NVIDIA_DRIVER_LIBS += \
        nvidia_drv.so:xorg/modules/drivers/ \
        libglx.so.$(NVIDIA_DRIVER_VERSION):xorg/modules/extensions/
 
+# libglx needs a symlink according to the driver README. It has no SONAME
+define NVIDIA_DRIVER_SYMLINK_LIBGLX
+       ln -sf libglx.so.$(NVIDIA_DRIVER_VERSION) \
+               $(TARGET_DIR)/usr/lib/xorg/modules/extensions/libglx.so
+endef
+
 endif # X drivers
 
 ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),y)
@@ -187,12 +193,6 @@ define NVIDIA_DRIVER_INSTALL_STAGING_CMDS
        $(NVIDIA_DRIVER_INSTALL_GL_DEV)
 endef
 
-# libglx needs a symlink according to the driver README. It has no SONAME
-define NVIDIA_DRIVER_SYMLINK_LIBGLX
-       ln -sf libglx.so.$(NVIDIA_DRIVER_VERSION) \
-               $(TARGET_DIR)/usr/lib/xorg/modules/extensions/libglx.so
-endef
-
 # For target, install libraries and X.org modules
 define NVIDIA_DRIVER_INSTALL_TARGET_CMDS
        $(call NVIDIA_DRIVER_INSTALL_LIBS,$(TARGET_DIR))