freebsd-ports/games/doomlegacy/Makefile
Tijl Coosemans 60945f0277 Replace USES=libtool:oldver with USES=libtool or USES=libtool:keepla in
the 32 ports that still use it.  Bump PORTREVISION on their dependent
ports except the ones that depend on these:

audio/libogg
audio/libvorbis
devel/pcre
ftp/curl
graphics/jpeg
graphics/libart_lgpl
graphics/tiff
textproc/expat2
textproc/libxslt

In these cases the same trick as in the recent gettext update is used.
The ports install a symlink with the old library version.  When enough
of their dependent ports have had regular updates the remaining ones can
get a PORTREVISION bump and the links can be removed.

Also remove the devel/pcre dependency from USE_GNOME=glib20.  It causes
over 2200 packages to depend on devel/pcre while less than 200 actually
link with it.  The glib20 package still depends on devel/pcre so this
should not make a difference for ports with USE_GNOME=glib20.  Also,
libdata/pkgconfig/glib-2.0.pc lists pcre as a private library so
USE_GNOME=glib20 should not propagate it.

PR:		195724
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-12-08 16:48:38 +00:00

73 lines
2 KiB
Makefile

# Created by: Alexander G. Chetirbock <bock@bock.nnov.ru>
# $FreeBSD$
PORTNAME= doomlegacy
DISTVERSION= 1.45_beta1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${DISTVERSION:S,_,%20,}/
DISTNAME= ${PORTNAME}_${DISTVERSION}_source
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${PORTNAME}_${DISTVERSION}_common.zip
MAINTAINER= ports@FreeBSD.org
COMMENT= Improved and extended version of Doom
LICENSE= GPLv2
USES= gmake tar:bzip2
USE_GL= glu
USE_SDL= mixer sdl
CFLAGS+= -DSVN_REV=\\\"1107\\\"
WRKSRC= ${WRKDIR}/${DISTNAME:S,_beta1,,}/src
MAKE_JOBS_UNSAFE= yes
PLIST_FILES= bin/${PORTNAME} share/doom/legacy.wad
PORTDOCS= *
OPTIONS_DEFINE= DOCS
OPTIONS_DEFINE_i386= ASM
.if exists(/usr/include/netipx/ipx.h)
OPTIONS_DEFINE+= IPX
IPX_DESC= IPX protocol support
.endif
ASM_BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
ASM_MAKE_ENV= USEASM=1 OLD_DEPENDENCIES=1
.include <bsd.port.options.mk>
post-patch: .SILENT
# Adjust default WAD search path
${REINPLACE_CMD} -e '/DEFWADS1/s|/.*|${DMDIR}"|' ${WRKSRC}/doomdef.h
# Provide better support for relative paths (for `-iwad' switch)
${REINPLACE_CMD} -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
${WRKSRC}/d_main.c
# Unbreak on big-endian architectures
${REINPLACE_CMD} -e '150s|^|#include "m_swap.h"|' \
${WRKSRC}/p_spec.c
${REINPLACE_CMD} -e '60s|^|#include "m_swap.h"|' \
${WRKSRC}/p_switch.c
.if ! ${PORT_OPTIONS:MIPX}
${REINPLACE_CMD} -e '/USE_IPX/s|define|undef|' ${WRKSRC}/doomdef.h
${REINPLACE_CMD} -e 's| -lipx||' ${WRKSRC}/Makefile
.endif
pre-build:
${ECHO_CMD} MAKE_OPTIONS_PRESENT=1 HAVE_MIXER=1 | ${XARGS} -n 1 \
> ${BUILD_WRKSRC}/../make_options
${MAKE_CMD} -C ${BUILD_WRKSRC} dirs
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/../bin/doomlegacy ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DMDIR}
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_1.45/legacy.wad \
${STAGEDIR}${DMDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/../docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
.include "${.CURDIR}/../doom-data/Makefile.include"
.include <bsd.port.mk>