openbsd-ports/games/heroes/Makefile

91 lines
2.4 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.24 2012/03/29 13:38:30 sthen Exp $
COMMENT= graphically improved game of yore
VERSION= 0.21
DATAVERSION= 1.5
SOUNDVERSION= 1.0
MUSICVERSION= 1.0
DISTNAME= heroes-${VERSION}
2010-11-08 10:54:53 -05:00
REVISION = 2
CATEGORIES= games x11
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
heroes-data-${DATAVERSION}${EXTRACT_SUFX} \
heroes-sound-effects-${SOUNDVERSION}${EXTRACT_SUFX} \
heroes-sound-tracks-${MUSICVERSION}${EXTRACT_SUFX}
DIST_SUBDIR= heroes
HOMEPAGE= http://heroes.sourceforge.net/
MAINTAINER= Peter Valchev <pvalchev@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
2004-11-28 17:41:14 -05:00
WANTLIB= c m
2002-05-13 14:50:36 -04:00
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=heroes/}
USE_GMAKE= Yes
2010-10-18 14:00:15 -04:00
USE_GROFF = Yes
2004-08-10 06:36:36 -04:00
MODULES= devel/gettext
FLAVORS= sdl ggi
FLAVOR?= sdl
2011-12-02 09:36:13 -05:00
.if empty(FLAVOR:Msdl) && empty(FLAVOR:Mggi)
ERRORS+= "Fatal: Must choose one flavor: sdl or ggi"
.endif
2011-12-02 09:36:13 -05:00
.if ${FLAVOR:Msdl} && ${FLAVOR:Mggi}
ERRORS+= "Fatal: Choose only one flavor: sdl or ggi"
.endif
2011-12-02 09:36:13 -05:00
.if ${FLAVOR:Msdl}
2010-11-16 06:23:25 -05:00
LIB_DEPENDS += devel/sdl \
devel/sdl-mixer
2010-11-08 10:54:53 -05:00
WANTLIB += SDL SDL_mixer
CONFIGURE_ARGS+= --with-sdl="${LOCALBASE}"
2010-11-08 10:54:53 -05:00
WANTLIB += X11 Xext pthread pthread-stubs usbhid xcb
.else
CONFIGURE_ARGS+= --without-sdl --without-sdl-mixer
2010-11-08 10:54:53 -05:00
WANTLIB += gii
.endif
2011-12-02 09:36:13 -05:00
.if ${FLAVOR:Mggi}
# Sound support is disabled with the ggi flavor since it is dependent
# on sdl-mixer. No alternatives for now.
2010-11-16 06:23:25 -05:00
LIB_DEPENDS += graphics/ggi
WANTLIB += ggi>=2.0
2010-11-08 10:54:53 -05:00
CONFIGURE_ARGS += --with-ggi="${LOCALBASE}"
FULLPKGNAME = heroes-${VERSION}
.else
2010-11-08 10:54:53 -05:00
CONFIGURE_ARGS += --without-ggi
.endif
SEPARATE_BUILD= Yes
CONFIGURE_STYLE= gnu
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/tools
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
2005-01-17 04:01:27 -05:00
LDFLAGS="-L${LOCALBASE}/lib -lm -lintl -liconv" \
ac_cv_header_io_h=no
CONFIGURE_ARGS+= --disable-optimizations \
--disable-debug \
--without-mikmod
post-install:
.for dir in levels pics tilesets
${INSTALL_DATA_DIR} ${PREFIX}/share/heroes/${dir}
${INSTALL_DATA} ${WRKDIR}/heroes-data-${DATAVERSION}/${dir}/* ${PREFIX}/share/heroes/${dir}
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/heroes/sfx
${INSTALL_DATA} ${WRKDIR}/heroes-sound-effects-${SOUNDVERSION}/{*.wav,sfx.conf} ${PREFIX}/share/heroes/sfx
${INSTALL_DATA_DIR} ${PREFIX}/share/heroes/mod
${INSTALL_DATA} ${WRKDIR}/heroes-sound-tracks-${MUSICVERSION}/{*.xm,sound.conf} ${PREFIX}/share/heroes/mod
.include <bsd.port.mk>