[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / doomlegacy

File: [cvs.NetBSD.org] / pkgsrc / games / doomlegacy / Makefile (download)

Revision 1.15, Mon Dec 19 11:53:59 2022 UTC (16 months ago) by micha
Branch: MAIN
CVS Tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4
Changes since 1.14: +14 -9 lines

games/doomlegacy: Update to 1.48.12

Updated man page for pkgsrc.
Disabled SVN usage for build.

FEATURES 1.48.12

  * Added SDL2 support, as a compile option. This provides video, sound, and
    keyboard alterations for the SDL2 library calls.
    The source code still supports SDL1. This supports target machines that are
    not supported by SDL2. At this point, for some things like MIDI music, we
    have not yet found optimal SDL2 solutions.
  * Add a control to select music type, with an automatic mode. Add automatic
    music type selection and playing. This works better with SDL1 than SDL2.
    SDL2 will always use Fluidsynth for MIDI. It even builds a copy of
    Fluidsynth into SDL2.
  * Added controls to adjust monster health, health pickup, armor pickup, and
    ammo pickup. This allows adjusting play of an overly difficult map such as
    one with multiple cyberdemons, such as when you have only three players on
    your coop team and one is a newbie, or just adjusting a map weak in ammo.
    The user can also increase difficulty when feeling cocky.

BUG FIXES 1.48.12

  * Mingw32 does not have strcasestr. Had to write one for Mingw32 and Watcom.
  * Fixed a segfault in biowar.wad Map08 with OpenGL. It would segfault when a
    texture being drawn in cache, had one patch extending lower than the
    texture bottom. The cache write now tests against the cache limits, and not
    the source.
  * Fixed X11 musserver quitting whenever trying any device other than TiMidity.
    Made the FluidSynth MIDI detection work. Included the DEBUG options.
    Fixed a HAVE_ZLIB test that would error when compiling for X11.
  * Fixed where Player picks up clip when already has full ammo. A bug was
    introduced in patch w105_22_playermsg, svn 1225. This resulted in the clip
    being used up, even when the player already has max ammo.
  * Rewrote the flat animation, to load all flats of an animation. A long time
    ago the flats were optimized by only loading the flats that appeared in the
    level map. This is incompatible with flat animation, as the animation
    requires flats that may not have appeared otherwise. This results in the
    animation not working for some flats that should be animated (doom2 map17).
    Updates the flat animation again when levelflats has moved during the
    update. Removed the old animation code that checked all flats in the wad.
  * Fix the existing MIDI, MP3, and OGG music playing. Fix MP3 music playing,
    so that it does not try to play it as MUS. Detect the music type upon
    replay too.
  * VISPLANE_DYNAMIC_COVER. Replaced arrays of [MAXVIDWIDTH] in visplane with
    dynamically allocated arrays of the current video width. This reduces each
    visplane from 6464 bytes to 3268 bytes. This will allow MAXVIDWIDTH to be
    increased, to allow larger screen sizes, without affecting the memory usage
    for everybody.
  * Transition to new software renderer, to fix sprites that are drawn in
    conflict with 3d floors.
  * Removed drawnodes code. Sprites could not be sorted into the drawnodes to
    satify all the conflicts that occur. Instead of trying to save all the
    sprite conflicts in one sprite structure (like a drawnode), the sprite is
    split and clipped until all parts of it have been drawn (or masked).
  * Replaced openings code (from PrBoom) with pool16 code, which does not have
    to adjust existing pointers when expanding the pool.
  * Fix to sprite draw, so that flipped sprites drawing is independent of the
    sprite x1 position. This fixes draw errors of some flipped sprites.
  * Fixed the OpenGL dynamic lights, where wall textures would distort when a
    fireball or rocket would pass by. This affected walls under a 3d floor,
    when it experienced a dynamic light.
  * Fixed a zip seek error that only affected some zip files. Opening a zip
    archive when there already was a zip file open, required that the zip file
    be closed, or its file position will be different than our recorded
    position. This fixes bug when loading cyberarena3.zip.
  * Protect against NULL line ptr in some light functions. This mitigates a
    segfault in cyberarena3.zip, that was not reproducible.
  * Fixed compile errors in dynamic load of zlib, and libzip. Detect version
    of libzip from header file. Remove version of libzip from make_options.
  * Add SDL_DIR to the compile make_options, because compile on win/mingw32
    cannot reliabily find SDL/include otherwise, and it is better than having
    end users editing the Makefile. SDL installs with sdl-config are not
    affected, and most users do not need to specify it.
  * Fixed the new SDL sound code to compile with SDL Mixer 1.2.8, SDL Mixer
    1.2.10, SDL Mixer 1.2.12, and SDL2 Mixer. This is detected at compile.
    The SDL Mixer 1.2.8 does NOT have MIX_INIT, but the SDL Mixer 1.2.10 does,
    and SDL2 does too. The MIX_INIT provides some device detection and
    reporting to the user what was found.
  * Still supports compiling for SDL Mixer older than 1.2.8, but those do not
    have RWOPS, and thus music playing with that Mixer will then use the
    hard-drive. This is detected and determined at compile-time, and running
    with a newer SDL Mixer will not affect that compile decision.
  * The user must have a compatible SDL Mixer installed (same or better).
    Newer SDL installs have bug fixes (especially on win), and may be
    customized to the users machine, so this is up to the user.
  * Changes to support compiling on Mac OS X (Darwin). Uses App folder.
    Based on support from Gibbon.

# $NetBSD: Makefile,v 1.15 2022/12/19 11:53:59 micha Exp $

VERS=			1.48.12
PKGNAME=		doomlegacy-${VERS}
CATEGORIES=		games
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=doomlegacy/}
DISTNAME=		${PKGNAME_NOREV:S/-/_/}_source
DISTFILES=		${DEFAULT_DISTFILES} doomlegacy_${VERS}_common.zip
EXTRACT_SUFX=		.tar.bz2

MAINTAINER=		micha@NetBSD.org
HOMEPAGE=		http://doomlegacy.sourceforge.net/
COMMENT=		The legacy of Doom
LICENSE=		gnu-gpl-v2

# Tested on Linux/ppc (32bit Big Endian) and NetBSD/amd64 (64bit Little Endian)
# Untested: In general the source code has support for the other listed OS too
ONLY_FOR_PLATFORM=	Darwin-*-* DragonFly-*-* FreeBSD-*-* Linux-*-* \
			NetBSD-*-* OpenBSD-*-* SunOS-*-*

USE_LANGUAGES+=		c99
USE_TOOLS+=		gmake
# Dependency generation fails with parallel build
MAKE_JOBS_SAFE=		no

.include "../../mk/bsd.prefs.mk"
.include "../../mk/endian.mk"

.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
MAKE_FLAGS+=		OS=FREEBSD
.elif ${OPSYS} == "NetBSD"
MAKE_FLAGS+=		OS=NETBSD
.elif ${OPSYS} == "Darwin"
MAKE_FLAGS+=		OS=MAC
.else
# Other Unix (should work for GNU/Linux, OpenBSD and SunOS)
MAKE_FLAGS+=		OS=LINUX
CFLAGS.SunOS+=		-DSOLARIS
LDFLAGS.SunOS+=		-lresolv -lsocket -lnsl
.endif

.if ${MACHINE_ENDIAN} == "big"
# Some compilers define this themselves (but maybe not all)
CFLAGS+=		-D__BIG_ENDIAN__
.endif

# Required for compressed ZDoom extended node format ("ZNOD" signature)
CFLAGS+=		-DHAVE_ZLIB
LDFLAGS+=		-lz

BUILDLINK_TRANSFORM.SunOS+=	rm:-Wl,--warn-common

# DOOMWADDIR is intentionally shared with other Doom packages
DOOMWADDIR=		share/doom
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man6 share/doc/doomlegacy ${DOOMWADDIR}

# Honor environment
SUBST_CLASSES+=		makeopt
SUBST_STAGE.makeopt=	do-configure
SUBST_MESSAGE.makeopt=	Preparing make_options file ...
SUBST_FILES.makeopt=	make_options
SUBST_SED.makeopt=	-e 's,\#[ ]*COMP_ENVIRONMENT,COMP_ENVIRONMENT,'
SUBST_SED.makeopt+=	-e 's,HAVE_LIBZIP,\# HAVE_LIBZIP,'
SUBST_SED.makeopt+=	-e 's,HAVE_DLOPEN,\# HAVE_DLOPEN,'
SUBST_SED.makeopt+=	-e 's,ARCH=-march=i686,\# ARCH=-march=i686,'

# Configure defaults for LEGACYWADDIR and DOOMWADDIR
SUBST_CLASSES+=		doomdef
SUBST_STAGE.doomdef=	do-configure
SUBST_MESSAGE.doomdef=	Preparing doomdef.h file ...
SUBST_FILES.doomdef=	src/doomdef.h
SUBST_SED.doomdef=	-e 's,LEGACYWADDIR  "/usr/local/share/games/doomlegacy",LEGACYWADDIR  "${PREFIX}/${DOOMWADDIR}",g'
SUBST_SED.doomdef+=	-e 's,DEFWADS01  "~/games/doomlegacy/wads",DEFWADS01  "${PREFIX}/${DOOMWADDIR}",'

# Disable SVN usage for build
SUBST_CLASSES+=		svn
SUBST_STAGE.svn=	do-configure
SUBST_MESSAGE.svn=	Disable SVN usage ...
SUBST_FILES.svn=	Makefile src/Makefile
SUBST_SED.svn=		-e 's,SVN_ENABLE=1,,g'

# Process INSTALL.pkgsrc
SUBST_CLASSES+=		install
SUBST_STAGE.install=	do-configure
SUBST_MESSAGE.install=	Preparing INSTALL.pkgsrc file ...
SUBST_FILES.install=	${WRKDIR}/INSTALL.pkgsrc
SUBST_SED.install=	-e 's,DOOMWADDIR,${PREFIX}/${DOOMWADDIR},'

pre-configure:
	${CP} ${FILESDIR}/INSTALL.pkgsrc ${WRKDIR}
	${CP} ${FILESDIR}/doomlegacy.sh ${WRKDIR}
	${CP} ${FILESDIR}/doomlegacy.6.in ${WRKDIR}
	cd ${WRKSRC} && ${CP} make_options_nix make_options

# Process start script and manpage templates
do-configure:
	cd ${WRKDIR} &&							\
		${SED} -e 's,$$PREFIX,${PREFIX},'			\
			doomlegacy.sh >doomlegacy
	cd ${WRKDIR} &&							\
		 ${SED} -e 's,$$NAME,doomlegacy,g'			\
			-e 's,$$VERSION,${VERS},g'			\
			-e 's,$$WADDIR,${PREFIX}/${DOOMWADDIR},g'	\
			doomlegacy.6.in >doomlegacy.6

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/doomlegacy			\
		${DESTDIR}${PREFIX}/bin/doomlegacy.bin
	${INSTALL_SCRIPT} ${WRKDIR}/doomlegacy				\
		${DESTDIR}${PREFIX}/bin/doomlegacy
	${INSTALL_DATA} ${WRKDIR}/doomlegacy_${VERS}_common/dogs.wad	\
		${DESTDIR}${PREFIX}/${DOOMWADDIR}/dogs.wad
	${INSTALL_DATA} ${WRKDIR}/doomlegacy_${VERS}_common/legacy.wad	\
		${DESTDIR}${PREFIX}/${DOOMWADDIR}/legacy.wad
	cd ${WRKSRC} &&							\
		${INSTALL_DATA} docs/legacy.css docs/whatsnew.html	\
			${DESTDIR}${PREFIX}/share/doc/doomlegacy
	${INSTALL_DATA} ${WRKDIR}/INSTALL.pkgsrc			\
		${DESTDIR}${PREFIX}/share/doc/doomlegacy/INSTALL.pkgsrc
	${INSTALL_MAN} ${WRKDIR}/doomlegacy.6				\
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man6

# Ensure that at least the shareware Episode 1 of Doom is available
DEPENDS+=		doom1-[0-9]*:../../games/doom1

BUILDLINK_API_DEPENDS.zlib+=		zlib>=1.2.3
.include "../../devel/zlib/buildlink3.mk"
BUILDLINK_API_DEPENDS.SDL_mixer+=	SDL_mixer>=1.2.7
.include "../../audio/SDL_mixer/buildlink3.mk"
BUILDLINK_API_DEPENDS.SDL+=		SDL>=1.2.10
.include "../../devel/SDL/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"