pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/yquake2



Module Name:    pkgsrc
Committed By:   khorben
Date:           Wed Nov 27 07:04:55 UTC 2024

Modified Files:
        pkgsrc/games/yquake2: Makefile distinfo
        pkgsrc/games/yquake2/patches: patch-Makefile

Log Message:
yquake2: fix the search paths and installation on macOS

On macOS, ld(1) defaults to the output filename for the "install path"
(LC_ID_DYLIB). This is caught by pkgsrc with `otool -L` in order to
determine REQUIRES= in mk/pkgformat/pkg/metadata.mk - but it is wrong
here, since the library is moved to libexec/yquake2 before packaging.
(Error "missing library" when checking for missing run-time search
paths in check-shlibs.mk)

While there, this also fixes the default search path for the quake2
executable.

NFCI anywhere outside macOS.

Tested on NetBSD/amd64 and macOS/amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/games/yquake2/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/games/yquake2/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/games/yquake2/patches/patch-Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/yquake2/Makefile
diff -u pkgsrc/games/yquake2/Makefile:1.32 pkgsrc/games/yquake2/Makefile:1.33
--- pkgsrc/games/yquake2/Makefile:1.32  Thu Nov 14 22:20:00 2024
+++ pkgsrc/games/yquake2/Makefile       Wed Nov 27 07:04:55 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2024/11/14 22:20:00 wiz Exp $
+# $NetBSD: Makefile,v 1.33 2024/11/27 07:04:55 khorben Exp $
 
 DISTNAME=      quake2-8.20
 PKGNAME=       y${DISTNAME}
@@ -15,6 +15,7 @@ LICENSE=      gnu-gpl-v2
 USE_TOOLS+=    gmake
 USE_LANGUAGES= c99
 
+MAKE_FLAGS+=   PREFIX=${PREFIX}
 MAKE_FLAGS+=   WITH_SYSTEMWIDE=yes
 MAKE_FLAGS+=   WITH_SYSTEMDIR=${PREFIX}/share/yquake2
 

Index: pkgsrc/games/yquake2/distinfo
diff -u pkgsrc/games/yquake2/distinfo:1.7 pkgsrc/games/yquake2/distinfo:1.8
--- pkgsrc/games/yquake2/distinfo:1.7   Sun Sep 10 10:18:44 2023
+++ pkgsrc/games/yquake2/distinfo       Wed Nov 27 07:04:55 2024
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.7 2023/09/10 10:18:44 yhardy Exp $
+$NetBSD: distinfo,v 1.8 2024/11/27 07:04:55 khorben Exp $
 
 BLAKE2s (quake2-8.20.tar.xz) = 14be64905a3b8ab705817e35932d585dff284b84c1449ef9f10e8c5cbc59d0d5
 SHA512 (quake2-8.20.tar.xz) = 5dbdbbf582494d16d00b9880ddea6de4b098a307dbe4ddf6bc90aa6b2bd2928c10fab40cf5dd63861e7a37f9c75b9afae6f43f8bfff3ee6704ca94f78ff9b7d2
 Size (quake2-8.20.tar.xz) = 2152184 bytes
-SHA1 (patch-Makefile) = adde4e75f4ac25b92b69260826720a1790e1aafe
+SHA1 (patch-Makefile) = 9f237f72a569e201425438361f44db7b09b590e3

Index: pkgsrc/games/yquake2/patches/patch-Makefile
diff -u pkgsrc/games/yquake2/patches/patch-Makefile:1.2 pkgsrc/games/yquake2/patches/patch-Makefile:1.3
--- pkgsrc/games/yquake2/patches/patch-Makefile:1.2     Sun Sep 10 10:18:44 2023
+++ pkgsrc/games/yquake2/patches/patch-Makefile Wed Nov 27 07:04:55 2024
@@ -1,8 +1,10 @@
-$NetBSD: patch-Makefile,v 1.2 2023/09/10 10:18:44 yhardy Exp $
+$NetBSD: patch-Makefile,v 1.3 2024/11/27 07:04:55 khorben Exp $
 
 Let pkgsrc determine the search paths, instead of forcing
 the prefix.
 
+Set the correct ID for the shared libraries on macOS.
+
 --- Makefile.orig      2022-12-09 11:37:27.000000000 +0000
 +++ Makefile
 @@ -286,7 +286,7 @@ INCLUDE ?= -I/usr/include
@@ -23,3 +25,44 @@ the prefix.
  else ifeq ($(YQ2_OSTYPE),OpenBSD)
  LDFLAGS ?= -L/usr/local/lib
  else ifeq ($(YQ2_OSTYPE),Windows)
+@@ -516,7 +516,7 @@ endif
+ 
+ ifeq ($(WITH_RPATH),yes)
+ ifeq ($(YQ2_OSTYPE), Darwin)
+-release/quake2 : LDFLAGS += -Wl,-rpath,'@executable_path/lib'
++release/quake2 : LDFLAGS += -Wl,-rpath,'$(PREFIX)/lib'
+ else
+ release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
+ endif
+@@ -579,6 +579,7 @@ ref_gl1:
+ 
+ 
+ release/ref_gl1.dylib : LDFLAGS += -shared -framework OpenGL
++release/ref_gl1.dylib : LDFLAGS += -Wl,-install_name,$(PREFIX)/libexec/yquake2/ref_gl1.dylib
+ 
+ else # not Windows or Darwin
+ 
+@@ -619,6 +620,7 @@ ref_gl3:
+ 
+ release/ref_gl3.dylib : GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
+ release/ref_gl3.dylib : LDFLAGS += -shared
++release/ref_gl3.dylib : LDFLAGS += -Wl,-install_name,$(PREFIX)/libexec/yquake2/ref_gl3.dylib
+ 
+ else # not Windows or Darwin
+ 
+@@ -668,6 +670,7 @@ release/ref_gles3.dylib : GLAD_INCLUDE =
+ release/ref_gles3.dylib : CFLAGS += -DYQ2_GL3_GLES3 -DYQ2_GL3_GLES
+ 
+ release/ref_gles3.dylib : LDFLAGS += -shared
++release/ref_gles3.dylib : LDFLAGS += -Wl,-install_name,$(PREFIX)/libexec/yquake2/ref_gles3.dylib
+ 
+ else # not Windows or Darwin
+ 
+@@ -711,6 +714,7 @@ ref_soft:
+       $(MAKE) release/ref_soft.dylib
+ 
+ release/ref_soft.dylib : LDFLAGS += -shared
++release/ref_soft.dylib : LDFLAGS += -Wl,-install_name,$(PREFIX)/libexec/yquake2/ref_soft.dylib
+ 
+ else # not Windows or Darwin
+ 



Home | Main Index | Thread Index | Old Index