UPDATE: games/eduke32

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: games/eduke32

Ryan Freeman
This updates eduke32 to a current version (20171105 svn tag 6496).

Upstream has moved their buildsystem around a bunch, and added some
small internal implementations to replace libpng and zlib usage:

6365 118d 01h terminx /GNUmakefile
        Drop libpng and zlib in favor of a custom < 100 line .png writer
        and a drop-in zlib replacement called miniz.


I rebuilt patches to let eduke32 use the ports-supplied lz4 package
as before..

I have stripped away COMPILER = gcc as clang seems to build just fine.

Tested on amd64 with the shareware and atomic editios, no regressions
seen.

Okay?
-ryan


? eduke32-6496.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/eduke32/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile 4 Aug 2017 22:33:18 -0000 1.13
+++ Makefile 13 Nov 2017 22:50:42 -0000
@@ -1,13 +1,12 @@
 # $OpenBSD: Makefile,v 1.13 2017/08/04 22:33:18 sthen Exp $
 
 COMMENT = Enhanced Duke Nukem 3D engine
-RDATE = 20160610
-RTAG = 5775
+RDATE = 20171105
+RTAG = 6496
 DISTNAME = eduke32_src_${RDATE}-${RTAG}
 PKGNAME = eduke32-2.0.0.${RTAG}
 EXTRACT_SUFX = .tar.xz
 CATEGORIES = games x11
-REVISION = 1
 
 HOMEPAGE = http://www.eduke32.com/
 
@@ -25,7 +24,7 @@ BUILD_DEPENDS = archivers/unzip \
 BUILD_DEPENDS += devel/nasm
 .endif
 
-WANTLIB += c m ogg png pthread vorbis vorbisfile vpx z lz4
+WANTLIB += c m ogg pthread vorbis vorbisfile vpx lz4
 WANTLIB += SDL2 SDL2_mixer FLAC execinfo ${COMPILER_LIBCXX}
 
 LIB_DEPENDS = archivers/lz4 \
@@ -44,14 +43,13 @@ RUN_DEPENDS = games/duke3ddata
 
 MASTER_SITES = http://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/
 
-COMPILER = gcc
-
 # make sure we can see compilation output, respect CC/CXX, don't strip!
-MAKE_ENV = PRETTY_OUTPUT=0 \
- PACKAGE_REPOSITORY=1
-MAKE_FLAGS += CC="${CC}" \
+MAKE_FLAGS += PRETTY_OUTPUT=0 \
+ CC="${CC}" \
  CXX="${CXX}" \
- STRIP=true
+ STRIP=true \
+ PACKAGE_REPOSITORY=1
+MAKE_FILE = GNUmakefile
 USE_GMAKE = Yes
 NO_TEST = Yes
 
@@ -60,8 +58,8 @@ WRKDIST = ${WRKDIR}/eduke32_${RDATE}-${R
 post-extract:
  # check for data files in correct location
  @sed -i "s,/usr/share/games/eduke32,${TRUEPREFIX}/share/duke3d," \
- ${WRKSRC}/source/common.c
- rm ${WRKSRC}/build/include/lz4.h ${WRKSRC}/build/src/lz4.c
+ ${WRKSRC}/source/duke3d/src/common.cpp
+ rm ${WRKSRC}/source/build/include/lz4.h ${WRKSRC}/source/build/src/lz4.c
 
 do-install:
  ${INSTALL_PROGRAM} ${WRKBUILD}/eduke32 ${PREFIX}/bin
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/eduke32/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo 20 Aug 2016 05:16:01 -0000 1.3
+++ distinfo 13 Nov 2017 22:50:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (eduke32_src_20160610-5775.tar.xz) = znVDHKAUXxw3k01ck0OTmC8ntqpkYZpAI85U5P1QyPk=
-SIZE (eduke32_src_20160610-5775.tar.xz) = 14532340
+SHA256 (eduke32_src_20171105-6496.tar.xz) = 1+MCe1npolXkOvGK6Jtk+THxlaIL9kwoTLKYpdkMPrI=
+SIZE (eduke32_src_20171105-6496.tar.xz) = 14351444
Index: patches/patch-Common_mak
===================================================================
RCS file: patches/patch-Common_mak
diff -N patches/patch-Common_mak
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Common_mak 13 Nov 2017 22:50:42 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Common.mak
+--- Common.mak.orig
++++ Common.mak
+@@ -638,7 +638,7 @@ ifeq (0,$(RELEASE))
+     F_NO_STACK_PROTECTOR :=
+ else
+     ifeq (0,$(CLANG))
+-        COMMONFLAGS += -funswitch-loops
++        #COMMONFLAGS += -funswitch-loops
+     endif
+
+     ifeq (0,$(DEBUGANYWAY))
Index: patches/patch-GNUmakefile
===================================================================
RCS file: patches/patch-GNUmakefile
diff -N patches/patch-GNUmakefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-GNUmakefile 13 Nov 2017 22:50:42 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Index: GNUmakefile
+--- GNUmakefile.orig
++++ GNUmakefile
+@@ -161,7 +161,6 @@ engine_objs := \
+     textfont.cpp \
+     smalltextfont.cpp \
+     kplib.cpp \
+-    lz4.c \
+     osd.cpp \
+     pragmas.cpp \
+     scriptfile.cpp \
+@@ -581,7 +580,7 @@ ifeq ($(SUBPLATFORM),LINUX)
+ endif
+
+ ifeq ($(PLATFORM),BSD)
+-    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo
++    LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo -llz4
+ endif
+
+ ifeq ($(PLATFORM),DARWIN)
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile 31 May 2017 08:10:01 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1 2017/05/31 08:10:01 espie Exp $
-
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -50,7 +50,6 @@ ENGINE_OBJS = \
-     textfont \
-     smalltextfont \
-     kplib \
--    lz4 \
-     osd \
-     pragmas \
-     scriptfile \
-@@ -472,6 +471,8 @@ endif
- ifeq ($(PLATFORM),BSD)
-     LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo
- endif
-+
-+LIBS += -llz4
-
- ifeq ($(PLATFORM),DARWIN)
-     # LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Apple/lib
Index: patches/patch-Makefile_common
===================================================================
RCS file: patches/patch-Makefile_common
diff -N patches/patch-Makefile_common
--- patches/patch-Makefile_common 31 May 2017 08:10:01 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-$OpenBSD: patch-Makefile_common,v 1.3 2017/05/31 08:10:01 espie Exp $
-Index: Makefile.common
---- Makefile.common.orig
-+++ Makefile.common
-@@ -28,14 +28,6 @@ PKG_CONFIG=pkg-config
- DONT_PRINT = > /dev/null 2>&1
- DONT_FAIL = ; exit 0
-
--# Override defaults that absolutely will not work.
--ifeq ($(CC),cc)
--    override CC=gcc
--endif
--ifeq ($(AS),as)
--    override AS=nasm
--endif
--
- COBJC=$(CC) -x objective-c
- COBJCXX=$(CXX) -x objective-c++
- L_CC=$(CC)
-@@ -283,14 +275,9 @@ GUI_LIBS=
- LIBDIRS=
-
- ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
--    F_NO_STACK_PROTECTOR := -fno-stack-protector
--    # there are some link-time issues with stack protectors, so make it possible to override
--    F_STACK_PROTECTOR_ALL ?= -fstack-protector-all
-     ifeq (0,$(CLANG))
-         F_JUMP_TABLES := -fjump-tables
-     endif
--    M_TUNE_GENERIC := -mtune=generic
--    M_STACKREALIGN := -mstackrealign
- endif
-
- W_STRICT_OVERFLOW := -Wno-strict-overflow
-@@ -663,10 +650,6 @@ DLLSUFFIX=.so
-
- SDL_TARGET ?= 2
- SDL_FRAMEWORK ?= 0
--
--ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
--    L_SSP := -lssp
--endif
-
- # ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 5)))
- #     ifneq (0,$(LTO))
Index: patches/patch-Makefile_deps
===================================================================
RCS file: patches/patch-Makefile_deps
diff -N patches/patch-Makefile_deps
--- patches/patch-Makefile_deps 31 May 2017 08:10:01 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Makefile_deps,v 1.1 2017/05/31 08:10:01 espie Exp $
-
-Index: Makefile.deps
---- Makefile.deps.orig
-+++ Makefile.deps
-@@ -84,7 +84,6 @@ $(DUKE3D_OBJ)/astub.$o: $(DUKE3D_SRC)/astub.c \
-     $(ENGINE_INC)/cache1d.h \
-     $(ENGINE_INC)/crc32.h \
-     $(ENGINE_INC)/scriptfile.h \
--    $(ENGINE_INC)/lz4.h \
-     $(DUKE3D_SRC)/macros.h \
-     $(DUKE3D_SRC)/osdfuncs.h \
-     $(DUKE3D_SRC)/names.h \
Index: patches/patch-build_Makefile_deps
===================================================================
RCS file: patches/patch-build_Makefile_deps
diff -N patches/patch-build_Makefile_deps
--- patches/patch-build_Makefile_deps 31 May 2017 08:10:01 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-build_Makefile_deps,v 1.1 2017/05/31 08:10:01 espie Exp $
-
-Index: build/Makefile.deps
---- build/Makefile.deps.orig
-+++ build/Makefile.deps
-@@ -10,7 +10,7 @@ $(ENGINE_OBJ)/config.$o: $(ENGINE_SRC)/config.c $(ENGI
- $(ENGINE_OBJ)/crc32.$o: $(ENGINE_SRC)/crc32.c $(ENGINE_INC)/crc32.h
- $(ENGINE_OBJ)/defs.$o: $(ENGINE_SRC)/defs.c $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/compat.h
- $(ENGINE_OBJ)/engine.$o: $(ENGINE_SRC)/engine.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/a.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/baselayer.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_SRC)/engine_oldmap.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/polymer.h
--$(ENGINE_OBJ)/polymost.$o: $(ENGINE_SRC)/polymost.c $(ENGINE_INC)/lz4.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
-+$(ENGINE_OBJ)/polymost.$o: $(ENGINE_SRC)/polymost.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
- $(ENGINE_OBJ)/texcache.$o: $(ENGINE_SRC)/texcache.c $(ENGINE_INC)/texcache.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/dxtfilter.h $(ENGINE_INC)/kplib.h
- $(ENGINE_OBJ)/dxtfilter.$o: $(ENGINE_SRC)/dxtfilter.c $(ENGINE_INC)/dxtfilter.h $(ENGINE_INC)/texcache.h
- $(ENGINE_OBJ)/hightile.$o: $(ENGINE_SRC)/hightile.c $(ENGINE_INC)/kplib.h $(ENGINE_INC)/hightile.h
-@@ -20,7 +20,6 @@ $(ENGINE_OBJ)/textfont.$o: $(ENGINE_SRC)/textfont.c
- $(ENGINE_OBJ)/smalltextfont.$o: $(ENGINE_SRC)/smalltextfont.c
- $(ENGINE_OBJ)/glbuild.$o: $(ENGINE_SRC)/glbuild.c $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/baselayer.h
- $(ENGINE_OBJ)/kplib.$o: $(ENGINE_SRC)/kplib.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/kplib.h
--$(ENGINE_OBJ)/lz4.$o: $(ENGINE_SRC)/lz4.c $(ENGINE_INC)/lz4.h
- $(ENGINE_OBJ)/md4.$o: $(ENGINE_SRC)/md4.c $(ENGINE_INC)/md4.h
- $(ENGINE_OBJ)/osd.$o: $(ENGINE_SRC)/osd.c $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h
- $(ENGINE_OBJ)/pragmas.$o: $(ENGINE_SRC)/pragmas.c $(ENGINE_INC)/compat.h
Index: patches/patch-source_build_Dependencies_mak
===================================================================
RCS file: patches/patch-source_build_Dependencies_mak
diff -N patches/patch-source_build_Dependencies_mak
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_build_Dependencies_mak 13 Nov 2017 22:50:42 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Index: source/build/Dependencies.mak
+--- source/build/Dependencies.mak.orig
++++ source/build/Dependencies.mak
+@@ -19,7 +19,7 @@ $(ENGINE_OBJ)/hash.$o: $(ENGINE_SRC)/hash.cpp $(ENGINE
+ $(ENGINE_OBJ)/colmatch.$o: $(ENGINE_SRC)/colmatch.cpp
+ $(ENGINE_OBJ)/mhk.$o: $(ENGINE_SRC)/mhk.cpp
+ $(ENGINE_OBJ)/palette.$o: $(ENGINE_SRC)/palette.cpp $(ENGINE_INC)/palette.h
+-$(ENGINE_OBJ)/polymost.$o: $(ENGINE_SRC)/polymost.cpp $(ENGINE_INC)/lz4.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
++$(ENGINE_OBJ)/polymost.$o: $(ENGINE_SRC)/polymost.cpp $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
+ $(ENGINE_OBJ)/texcache.$o: $(ENGINE_SRC)/texcache.cpp $(ENGINE_INC)/texcache.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/dxtfilter.h $(ENGINE_INC)/kplib.h
+ $(ENGINE_OBJ)/dxtfilter.$o: $(ENGINE_SRC)/dxtfilter.cpp $(ENGINE_INC)/dxtfilter.h $(ENGINE_INC)/texcache.h
+ $(ENGINE_OBJ)/hightile.$o: $(ENGINE_SRC)/hightile.cpp $(ENGINE_INC)/kplib.h $(ENGINE_INC)/hightile.h
+@@ -29,7 +29,6 @@ $(ENGINE_OBJ)/textfont.$o: $(ENGINE_SRC)/textfont.cpp
+ $(ENGINE_OBJ)/smalltextfont.$o: $(ENGINE_SRC)/smalltextfont.cpp
+ $(ENGINE_OBJ)/glbuild.$o: $(ENGINE_SRC)/glbuild.cpp $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/baselayer.h
+ $(ENGINE_OBJ)/kplib.$o: $(ENGINE_SRC)/kplib.cpp $(ENGINE_INC)/compat.h $(ENGINE_INC)/kplib.h
+-$(ENGINE_OBJ)/lz4.$o: $(ENGINE_SRC)/lz4.c $(ENGINE_INC)/lz4.h
+ $(ENGINE_OBJ)/md4.$o: $(ENGINE_SRC)/md4.cpp $(ENGINE_INC)/md4.h
+ $(ENGINE_OBJ)/osd.$o: $(ENGINE_SRC)/osd.cpp $(ENGINE_INC)/build.h $(ENGINE_INC)/buildtypes.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h
+ $(ENGINE_OBJ)/pragmas.$o: $(ENGINE_SRC)/pragmas.cpp $(ENGINE_INC)/compat.h
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/eduke32/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 20 Aug 2016 05:16:02 -0000 1.2
+++ pkg/PLIST 13 Nov 2017 22:50:42 -0000
@@ -14,9 +14,7 @@ share/examples/eduke32/
 share/examples/eduke32/_clipshape0.map
 share/examples/eduke32/a.m32
 share/examples/eduke32/aspect.map
-share/examples/eduke32/duke3d.def.sample
 share/examples/eduke32/dump_used_assets.m32
-share/examples/eduke32/enhance.con.sample
 share/examples/eduke32/m32script_ex.map
 share/examples/eduke32/r_usenewshading.map
 share/examples/eduke32/ror.map
@@ -26,4 +24,4 @@ share/examples/eduke32/startpos.m32
 share/examples/eduke32/test_tileoffsets.map
 share/examples/eduke32/tests.m32
 share/examples/eduke32/trueror1.map
-share/examples/eduke32/weapons.con.sample
+share/examples/eduke32/weapons.sample.con