On Sat, May 27, 2017 at 01:03:41PM +0200, Marc Espie wrote:
> while checking eduke32 for clang, I ran into a weird compile error.
>
> Turns out eduke32 includes an (old?) version of lz4 that doesn't look quite
> like the one in archivers/lz4.
>
> The following patch makes eduke32 just use archivers/lz4 so it won't miscompile
> if lz4 happens to be installed.
Thanks Marc, OK
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/eduke32/Makefile,v
> retrieving revision 1.9
> diff -u -p -r1.9 Makefile
> --- Makefile 27 May 2017 10:54:47 -0000 1.9
> +++ Makefile 27 May 2017 10:59:43 -0000
> @@ -7,6 +7,7 @@ DISTNAME = eduke32_src_${RDATE}-${RTAG}
> PKGNAME = eduke32-2.0.0.${RTAG}
> EXTRACT_SUFX = .tar.xz
> CATEGORIES = games x11
> +REVISION = 0
>
> HOMEPAGE = http://www.eduke32.com/
>
> @@ -24,10 +25,11 @@ BUILD_DEPENDS = archivers/unzip \
> BUILD_DEPENDS += devel/nasm
> .endif
>
> -WANTLIB += c m ogg png pthread vorbis vorbisfile vpx z
> +WANTLIB += c m ogg png pthread vorbis vorbisfile vpx z lz4
> WANTLIB += SDL2 SDL2_mixer FLAC execinfo ${LIBECXX}
>
> -LIB_DEPENDS = audio/libvorbis \
> +LIB_DEPENDS = archivers/lz4 \
> + audio/libvorbis \
> audio/flac \
> devel/sdl2 \
> devel/sdl2-mixer \
> @@ -59,6 +61,7 @@ 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
>
> do-install:
> ${INSTALL_PROGRAM} ${WRKBUILD}/eduke32 ${PREFIX}/bin
> 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 27 May 2017 10:59:43 -0000
> @@ -0,0 +1,22 @@
> +$OpenBSD$
> +
> +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: /cvs/ports/games/eduke32/patches/patch-Makefile_common,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-Makefile_common
> --- patches/patch-Makefile_common 20 Aug 2016 05:16:02 -0000 1.2
> +++ patches/patch-Makefile_common 27 May 2017 10:59:43 -0000
> @@ -1,7 +1,8 @@
> $OpenBSD: patch-Makefile_common,v 1.2 2016/08/20 05:16:02 bentley Exp $
> ---- Makefile.common.orig Sat Jun 4 22:46:28 2016
> -+++ Makefile.common Fri Aug 19 22:49:13 2016
> -@@ -28,14 +20,6 @@ PKG_CONFIG=pkg-config
> +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
>
> @@ -16,7 +17,7 @@ $OpenBSD: patch-Makefile_common,v 1.2 20
> COBJC=$(CC) -x objective-c
> COBJCXX=$(CXX) -x objective-c++
> L_CC=$(CC)
> -@@ -283,14 +267,9 @@ GUI_LIBS=
> +@@ -283,14 +275,9 @@ GUI_LIBS=
> LIBDIRS=
>
> ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
> @@ -31,7 +32,7 @@ $OpenBSD: patch-Makefile_common,v 1.2 20
> endif
>
> W_STRICT_OVERFLOW := -Wno-strict-overflow
> -@@ -663,10 +642,6 @@ DLLSUFFIX=.so
> +@@ -663,10 +650,6 @@ DLLSUFFIX=.so
>
> SDL_TARGET ?= 2
> SDL_FRAMEWORK ?= 0
> Index: patches/patch-Makefile_deps
> ===================================================================
> RCS file: patches/patch-Makefile_deps
> diff -N patches/patch-Makefile_deps
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-Makefile_deps 27 May 2017 10:59:43 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +
> +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
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-build_Makefile_deps 27 May 2017 10:59:43 -0000
> @@ -0,0 +1,22 @@
> +$OpenBSD$
> +
> +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
>
No comments:
Post a Comment