Saturday, December 28, 2019

Re: update games/eduke32 for ion fury compatibility

On Sat, Dec 28, 2019 at 04:57:37PM +1100, Jonathan Gray wrote:
> That looks better. ok jsg@
>
> BUILDING_STATIC is only relevant to _WIN32 in xmp.h so it shouldn't
> matter for us if it is left defined.
>
> `$(PKG_CONFIG) libxmp --cflags` instead of
> `$(PKG_CONFIG) --cflags libxmp` looks odd but seems to still work.

Woops, here is the same patch again, but with pkg-config flags in
expected order. I am OK with it at this point too.


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/eduke32/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile 14 Jul 2019 02:16:51 -0000 1.22
+++ Makefile 28 Dec 2019 16:50:37 -0000
@@ -1,15 +1,14 @@
# $OpenBSD: Makefile,v 1.22 2019/07/14 02:16:51 naddy Exp $

COMMENT = Enhanced Duke Nukem 3D engine
-RDATE = 20171105
-RTAG = 6496
+RDATE = 20191222
+RTAG = 8494
DISTNAME = eduke32_src_${RDATE}-${RTAG}
PKGNAME = eduke32-2.0.0.${RTAG}
-REVISION = 3
EXTRACT_SUFX = .tar.xz
CATEGORIES = games x11

-HOMEPAGE = http://www.eduke32.com/
+HOMEPAGE = https://www.eduke32.com/

MAINTAINER = Ryan Freeman <ryan@slipgate.org>

@@ -20,14 +19,14 @@ PERMIT_DISTFILES = "BUILD engine licens
BUILD_DEPENDS = archivers/unzip \
graphics/gdk-pixbuf2

-WANTLIB += c m ogg pthread vorbis vorbisfile vpx lz4
-WANTLIB += SDL2 SDL2_mixer FLAC execinfo ${COMPILER_LIBCXX}
+WANTLIB += c m ogg pthread vorbis vorbisfile vpx lz4 xmp
+WANTLIB += SDL2 FLAC execinfo ${COMPILER_LIBCXX}

LIB_DEPENDS = archivers/lz4 \
+ audio/libxmp \
audio/libvorbis \
audio/flac \
devel/sdl2 \
- devel/sdl2-mixer \
devel/libexecinfo \
multimedia/libvpx

@@ -37,7 +36,7 @@ WANTLIB += gtk-x11-2.0

RUN_DEPENDS = games/duke3ddata

-MASTER_SITES = http://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/
+MASTER_SITES = https://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/

COMPILER = base-clang ports-gcc

@@ -47,7 +46,6 @@ MAKE_FLAGS += PRETTY_OUTPUT=0 \
CXX="${CXX}" \
STRIP=true \
PACKAGE_REPOSITORY=1 \
- HAVE_XMP=0 \
NOASM=1
MAKE_FILE = GNUmakefile
USE_GMAKE = Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/eduke32/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 22 Nov 2017 03:43:46 -0000 1.4
+++ distinfo 28 Dec 2019 16:50:37 -0000
@@ -1,2 +1,2 @@
-SHA256 (eduke32_src_20171105-6496.tar.xz) = 1+MCe1npolXkOvGK6Jtk+THxlaIL9kwoTLKYpdkMPrI=
-SIZE (eduke32_src_20171105-6496.tar.xz) = 14351444
+SHA256 (eduke32_src_20191222-8494.tar.xz) = RaI1M725fVdITdOus9lSZQQspn1R/PfxFpUugWTOcww=
+SIZE (eduke32_src_20191222-8494.tar.xz) = 15951736
Index: patches/patch-Common_mak
===================================================================
RCS file: /cvs/ports/games/eduke32/patches/patch-Common_mak,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Common_mak
--- patches/patch-Common_mak 22 Nov 2017 03:43:46 -0000 1.1
+++ patches/patch-Common_mak 28 Dec 2019 16:50:37 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-Common_mak,v 1.1 2017/11
Index: Common.mak
--- Common.mak.orig
+++ Common.mak
-@@ -638,7 +638,7 @@ ifeq (0,$(RELEASE))
+@@ -710,7 +710,7 @@ ifeq (0,$(RELEASE))
F_NO_STACK_PROTECTOR :=
else
ifeq (0,$(CLANG))
@@ -11,4 +11,4 @@ Index: Common.mak
+ #COMMONFLAGS += -funswitch-loops
endif

- ifeq (0,$(DEBUGANYWAY))
+ ifeq (0,$(FORCEDEBUG))
Index: patches/patch-GNUmakefile
===================================================================
RCS file: /cvs/ports/games/eduke32/patches/patch-GNUmakefile,v
retrieving revision 1.2
diff -u -p -r1.2 patch-GNUmakefile
--- patches/patch-GNUmakefile 17 Jul 2018 07:56:44 -0000 1.2
+++ patches/patch-GNUmakefile 28 Dec 2019 16:50:37 -0000
@@ -3,29 +3,55 @@ $OpenBSD: patch-GNUmakefile,v 1.2 2018/0
Index: GNUmakefile
--- GNUmakefile.orig
+++ GNUmakefile
-@@ -161,7 +161,6 @@ engine_objs := \
- textfont.cpp \
- smalltextfont.cpp \
+@@ -240,7 +240,6 @@ engine_objs := \
+ hightile.cpp \
+ klzw.cpp \
kplib.cpp \
- lz4.c \
- osd.cpp \
- pragmas.cpp \
- scriptfile.cpp \
-@@ -581,7 +580,7 @@ ifeq ($(SUBPLATFORM),LINUX)
+ md4.cpp \
+ mhk.cpp \
+ miniz.c \
+@@ -403,8 +402,8 @@ ifeq ($(RENDERTYPE),SDL)
+ endif
+
+ ifneq (0,$(HAVE_XMP))
+- audiolib_cflags += -I$(libxmplite_inc)
+- audiolib_deps += libxmplite
++ audiolib_cflags += `$(PKG_CONFIG) --cflags libxmp`
++ audiolib_deps +=
+ endif
+
+
+@@ -684,7 +683,7 @@ ifeq ($(SUBPLATFORM),LINUX)
endif

ifeq ($(PLATFORM),BSD)
- LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo
-+ LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo -llz4
++ LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo -llz4 -lxmp
endif

ifeq ($(PLATFORM),DARWIN)
-@@ -755,7 +754,7 @@ endif
+@@ -851,13 +850,14 @@ endif

#### Final setup

--COMPILERFLAGS += -I$(engine_inc) -I$(mact_inc) -I$(audiolib_inc) -I$(enet_inc)
-+COMPILERFLAGS := -I$(engine_inc) -I$(mact_inc) -I$(audiolib_inc) -I$(enet_inc) $(COMPILERFLAGS)
-
-
- ##### Recipes
+-COMPILERFLAGS += \
++COMPILERFLAGS := \
+ -I$(engine_inc) \
+ -I$(mact_inc) \
+ -I$(audiolib_inc) \
+ -I$(glad_inc) \
+ -I$(voidwrap_inc) \
+ -MP -MMD \
++ $(COMPILERFLAGS)
+
+ ifneq (0,$(USE_PHYSFS))
+ COMPILERFLAGS += -I$(physfs_inc) -DUSE_PHYSFS
+@@ -875,7 +875,6 @@ libraries := \
+ audiolib \
+ engine \
+ glad \
+- libxmplite \
+ lpeg \
+ mact \
+ voidwrap \
Index: patches/patch-source_audiolib_src_multivoc_cpp
===================================================================
RCS file: patches/patch-source_audiolib_src_multivoc_cpp
diff -N patches/patch-source_audiolib_src_multivoc_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_audiolib_src_multivoc_cpp 28 Dec 2019 16:50:37 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+use packaged libxmp instead of bundled libxmp-lite, works around
+build issue when libxmp package is installed
+
+Index: source/audiolib/src/multivoc.cpp
+--- source/audiolib/src/multivoc.cpp.orig
++++ source/audiolib/src/multivoc.cpp
+@@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Bos
+
+ #ifdef HAVE_XMP
+ # define BUILDING_STATIC
+-# include "libxmp-lite/xmp.h"
++# include <xmp.h>
+
+ int MV_XMPInterpolation = XMP_INTERP_SPLINE;
+

No comments:

Post a Comment