Hi ports@

Upgrading our yquake2 from 7.01 to 7.02

Port changes:
 - bump version
 - everything now lives under /usr/local/share/yquake2
   this has been asked by upstream and outlined in
   their porting guide that was created after
   I started complaining that they want relative
   paths between the binaries:

   
https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md#where-you-should-put-the-executables

 - adding a new wrapper for the quake2 binary
   to cd into the port directory before executing it
   as we provide no way for a binary to get its executable
   directory
 - drop the patch that hardcoded the executable directory
   upstream accounted for us not supporting that feature
   and defaults to returning cwd (./) instead of bailing
   out with an error
 - modified the q2ded rc.d script to account for the need
   of changing the working directory before starting the
   server
 - note I am not providing a separate wrapper for q2ded
   in /usr/bin on purpose - I don't see a need for running
   it outside of the rc.d scripts for any reasons other
   than debugging and that's rare enough that people can
   just cd to the game folder themselves
 - we can drop the Makefile compilation flag diff as
   upstream took our patch

Upstream changelog:

Quake II 7.01 to 7.02:
- Fix several corner cases regarding render library loading. The game
  should now always fall back to the OpenGL 1.4 renderer if the new
  OpenGL 3.2 renderer can't be initialized. Also the game aborts if no
  useable OpenGL implementation exists.
- Refactor the search path code. This should fix several bugs with
  Quake II writing to the wrong directories or being unable to find
  some / all assets.
- Reimplement portable binaries. If called with the -portable command
  line option Quake II saves all data (configs, savegames, screenshorts
  etc.) into it's systemwide installation directory and not users home
  directory. In contrast to the old implementation on Windows stdout.txt
  contains all output, the first lines are no longer missing.
- vid_fullscreen set to 1 now keeps the desktops resolution. Set it to 2
  to change the resolution.
- Instead of a list with precalculated FOV values the video menu now
  shows a slider with possible values from 60 to 120. Horplus is now
  always enabled, set the horplus cvar to 0 to disable it.
- The game is now able to hold the requested framerate (either by the
  vsync or the gl_maxfps cvar) with an accuracy of about +/- 1% as long
  as the hardware is fast enough.  The framecounter was reimplemented
  to be much more precise.
- Fix misspredictions if an original client running on Win32 connects
to a Yamagi Quake II server running on Linux/i386.

Frags? OK's?
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    20 Jul 2017 23:33:46 -0000      1.9
+++ Makefile    9 Nov 2017 09:53:43 -0000
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=       Yamagi Quake II
 N=             yquake2
-V=             7.01
+V=             7.02
 PKGNAME=       ${N}-${V}
 DISTNAME=      quake2-${V}
 CATEGORIES=    games
@@ -31,14 +31,16 @@ MAKE_FLAGS = config WITH_SYSTEMWIDE=yes 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
        ${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-           ${PREFIX}/bin/
+           ${PREFIX}/share/${N}/
        ${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
        ${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
            ${PREFIX}/share/${N}/baseq2/
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/${N}
        ${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl1.so \
-           ${PREFIX}/lib/${N}/
+           ${PREFIX}/share/${N}/
        ${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl3.so \
-           ${PREFIX}/lib/${N}/
+           ${PREFIX}/share/${N}/
+       ${SUBST_CMD} -m 555 -c ${FILESDIR}/quake2.sh ${WRKSRC}/quake2
+       ${INSTALL_SCRIPT} ${WRKSRC}/quake2 ${PREFIX}/bin/
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo    20 Jul 2017 23:33:46 -0000      1.4
+++ distinfo    9 Nov 2017 09:53:43 -0000
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.01.tar.xz) = ly93hnCTs8Fi37KMqTBYXLcdG3sYPWdthlnS/JcTfvc=
-SIZE (quake2-7.01.tar.xz) = 1778212
+SHA256 (quake2-7.02.tar.xz) = qe29vbXRP1abqr4DRtymPcP/pQwk3GeViDnoCuQBwN4=
+SIZE (quake2-7.02.tar.xz) = 1787092
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile      20 Jul 2017 23:33:46 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1 2017/07/20 23:33:46 awolk Exp $
-
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -251,8 +251,8 @@ endif
- CFLAGS += -fvisibility=hidden
- LDFLAGS += -fvisibility=hidden
- 
--ifneq ($(YQ2_OSTYPE), Darwin)
--# for some reason the OSX linker doesn't support this
-+ifneq ($(YQ2_OSTYPE), $(filter $(YQ2_OSTYPE), Darwin, OpenBSD))
-+# for some reason the OSX & OpenBSD linker doesn't support this
- LDFLAGS += -Wl,--no-undefined
- endif
- 
Index: patches/patch-src_backends_generic_vid_c
===================================================================
RCS file: patches/patch-src_backends_generic_vid_c
diff -N patches/patch-src_backends_generic_vid_c
--- patches/patch-src_backends_generic_vid_c    20 Jul 2017 23:33:46 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_backends_generic_vid_c,v 1.1 2017/07/20 23:33:46 awolk Exp 
$
-
-Index: src/backends/generic/vid.c
---- src/backends/generic/vid.c.orig
-+++ src/backends/generic/vid.c
-@@ -342,7 +342,7 @@ VID_LoadRefresh(void)
-       Com_Printf("----- refresher initialization -----\n");
- 
-       snprintf(reflib_name, sizeof(reflib_name), "ref_%s.%s", 
vid_renderer->string, lib_ext);
--      snprintf(reflib_path, sizeof(reflib_path), "%s%s", Sys_GetBinaryDir(), 
reflib_name);
-+      snprintf(reflib_path, sizeof(reflib_path), "/usr/local/lib/yquake2/%s", 
reflib_name);
- 
-       Com_Printf("LoadLibrary(%s)\n", reflib_name);
-       GetRefAPI = Sys_LoadLibrary(reflib_path, "GetRefAPI", &reflib_handle);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   20 Jul 2017 23:33:46 -0000      1.3
+++ pkg/PLIST   9 Nov 2017 09:53:43 -0000
@@ -1,13 +1,13 @@
 @comment $OpenBSD: PLIST,v 1.3 2017/07/20 23:33:46 awolk Exp $
 @newgroup _yquake2:779
 @newuser _yquake2:779:_yquake2:daemon:Yamagi Quake II 
Server:/var/yquake2:/sbin/nologin
-@bin bin/q2ded
-@bin bin/quake2
-lib/yquake2/
-lib/yquake2/ref_gl1.so
-lib/yquake2/ref_gl3.so
+bin/quake2
+@bin share/yquake2/q2ded
+@bin share/yquake2/quake2
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/yquake2/
+share/yquake2/ref_gl1.so
+share/yquake2/ref_gl3.so
 share/yquake2/baseq2/
 share/yquake2/baseq2/game.so
 @mode 750
Index: pkg/q2ded.rc
===================================================================
RCS file: /cvs/ports/games/yquake2/pkg/q2ded.rc,v
retrieving revision 1.3
diff -u -p -r1.3 q2ded.rc
--- pkg/q2ded.rc        27 May 2017 19:57:06 -0000      1.3
+++ pkg/q2ded.rc        9 Nov 2017 09:53:43 -0000
@@ -2,7 +2,7 @@
 #
 # $OpenBSD: q2ded.rc,v 1.3 2017/05/27 19:57:06 ajacoutot Exp $
 
-daemon="${TRUEPREFIX}/bin/q2ded"
+daemon="${TRUEPREFIX}/share/yquake2/q2ded"
 daemon_user="_yquake2"
 
 . /etc/rc.d/rc.subr
@@ -10,5 +10,9 @@ daemon_user="_yquake2"
 pexp="${daemon}.*"
 rc_bg=YES
 rc_reload=NO
+
+rc_start() {
+       ${rcexec} "cd ${TRUEPREFIX}/share/yquake2; ${daemon} ${daemon_flags}"
+}
 
 rc_cmd $1

Reply via email to