Hi ports@,

Upgrading our yquake2 from 6.00 to 7.01

Port changes:
 - bump version
 - install new ref_gl1 / ref_gl3 shared libraries into
   /usr/local/lib/yquake2
 - patch the Makefile to not pass -Wl,--no-undefined to
   the linker, change already merged upstream:
     https://github.com/yquake2/yquake2/pull/213
 - patch backends/generic/vid.c to dlopen libraries
   from /usr/local/lib/yquake2 instead of relying
   on Sys_GetBinaryDir() that thinks the OS can tell
   it the executable path

Regarding the .so changes, please see the following 2 github links
 - https://github.com/yquake2/yquake2/pull/213
 - https://github.com/yquake2/yquake2/issues/214
especially the second one. In short, it's possible that upstream will
add a way to define /usr/local/lib/yquake2 as a compile time option
which would make this patch obsolete. Note that I did not move the game.so
file on purpose, as upstream mentioned in 213 that mods expect it to be
in that specific spot.

If you want to test the new renderer just execute the game with:
 $ quake2 +vid_renderer gl3 

after first run it will be added to your config, or you can add it
yourself by adding:

 set vid_renderer "gl3"

to:

/home/mulander/.yq2/baseq2/config.cfg

Upstream changelog:

Quake II 7.00 to 7.01:
- Fix build of GL3 for platforms without SSE.
- Fix Jennel Jaquays name in credits and quit screen.
- Make Quake II high DPI aware on Window Vista and above.
- Fix some problems with loading dependend librarys on Windows.

Quake II 6.00 to 7.00:
- Remove the broken multitexturing render path from the OpenGL 1.4
  renderer. It was switched off by default in 6.00.
- Reimplement the support for shared renderer libraries. Please note
  the this is an incompatible implementation with an custom API. The
  original renderer libraries will not work!
- Implement an OpenGL 3.2 renderer. This renderer has the same look
  and feel as the old OpenGL 1.4 renderer but makes heavy use of
  modern OpenGL and GPU features. An OpenGL 3.2 capable GPU (Intel
  starting with Ivy Bridge on Windows or Sandy Bridge on Linux, Nvidia
  staring with G80 and AMD starting with R600 / HD2000) is required.
- Fix OpenAL compatibility with modern openal-soft versions.
- Several fixes and optimizations to OpenAL, implement support for
  doppler effects. (by xorw)

Frags? OK's?

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile    27 May 2017 19:57:06 -0000      1.8
+++ Makefile    20 Jul 2017 20:44:12 -0000
@@ -4,10 +4,9 @@ ONLY_FOR_ARCHS=        i386 amd64 sparc64
 
 COMMENT=       Yamagi Quake II
 N=             yquake2
-V=             6.00
+V=             7.01
 PKGNAME=       ${N}-${V}
 DISTNAME=      quake2-${V}
-REVISION=      2
 CATEGORIES=    games
 
 HOMEPAGE=      http://www.yamagi.org/quake2/
@@ -36,5 +35,10 @@ do-install:
        ${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}/
+       ${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl3.so \
+           ${PREFIX}/lib/${N}/
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    5 Dec 2016 21:03:33 -0000       1.3
+++ distinfo    20 Jul 2017 20:44:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (quake2-6.00.tar.xz) = N7a7eiHUOxf2bvkIsXKjuRi5Z/r7pZwT7ssUfXXEXUw=
-SIZE (quake2-6.00.tar.xz) = 1705640
+SHA256 (quake2-7.01.tar.xz) = ly93hnCTs8Fi37KMqTBYXLcdG3sYPWdthlnS/JcTfvc=
+SIZE (quake2-7.01.tar.xz) = 1778212
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile      20 Jul 2017 20:44:12 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+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
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_backends_generic_vid_c    20 Jul 2017 20:44:12 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+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.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   28 Jun 2016 20:50:22 -0000      1.2
+++ pkg/PLIST   20 Jul 2017 20:44:12 -0000
@@ -3,6 +3,9 @@
 @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
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/yquake2/
 share/yquake2/baseq2/

Reply via email to