2012-03-29 09:38:12 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.24 2012/03/29 13:38:30 sthen Exp $
|
2001-08-10 13:00:16 -04:00
|
|
|
|
2007-09-15 14:01:00 -04:00
|
|
|
COMMENT= graphically improved game of yore
|
2001-08-10 13:00:16 -04:00
|
|
|
|
2003-01-21 17:58:03 -05:00
|
|
|
VERSION= 0.21
|
|
|
|
DATAVERSION= 1.5
|
2001-08-10 13:00:16 -04:00
|
|
|
SOUNDVERSION= 1.0
|
|
|
|
MUSICVERSION= 1.0
|
|
|
|
DISTNAME= heroes-${VERSION}
|
2010-11-08 10:54:53 -05:00
|
|
|
REVISION = 2
|
2001-08-10 13:00:16 -04:00
|
|
|
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
|
2001-08-10 13:00:16 -04:00
|
|
|
|
2002-05-13 14:50:36 -04:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=heroes/}
|
2001-08-10 13:00:16 -04:00
|
|
|
|
|
|
|
USE_GMAKE= Yes
|
2010-10-18 14:00:15 -04:00
|
|
|
USE_GROFF = Yes
|
2001-08-10 13:00:16 -04:00
|
|
|
|
2004-08-10 06:36:36 -04:00
|
|
|
MODULES= devel/gettext
|
2001-08-10 13:00:16 -04:00
|
|
|
|
|
|
|
FLAVORS= sdl ggi
|
|
|
|
FLAVOR?= sdl
|
|
|
|
|
2011-12-02 09:36:13 -05:00
|
|
|
.if empty(FLAVOR:Msdl) && empty(FLAVOR:Mggi)
|
2001-08-10 13:00:16 -04:00
|
|
|
ERRORS+= "Fatal: Must choose one flavor: sdl or ggi"
|
|
|
|
.endif
|
|
|
|
|
2011-12-02 09:36:13 -05:00
|
|
|
.if ${FLAVOR:Msdl} && ${FLAVOR:Mggi}
|
2001-08-10 13:00:16 -04:00
|
|
|
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
|
2001-08-10 13:00:16 -04:00
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-sdl="${LOCALBASE}"
|
2010-11-08 10:54:53 -05:00
|
|
|
WANTLIB += X11 Xext pthread pthread-stubs usbhid xcb
|
2001-08-10 13:00:16 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-sdl --without-sdl-mixer
|
2010-11-08 10:54:53 -05:00
|
|
|
WANTLIB += gii
|
2001-08-10 13:00:16 -04:00
|
|
|
.endif
|
|
|
|
|
2011-12-02 09:36:13 -05:00
|
|
|
.if ${FLAVOR:Mggi}
|
2001-08-10 13:00:16 -04:00
|
|
|
# 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}
|
2001-08-10 13:00:16 -04:00
|
|
|
.else
|
2010-11-08 10:54:53 -05:00
|
|
|
CONFIGURE_ARGS += --without-ggi
|
2001-08-10 13:00:16 -04:00
|
|
|
.endif
|
|
|
|
|
2012-03-29 09:38:12 -04:00
|
|
|
SEPARATE_BUILD= Yes
|
2001-08-10 13:00:16 -04:00
|
|
|
CONFIGURE_STYLE= gnu
|
2001-09-28 02:02:12 -04:00
|
|
|
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/tools
|
2001-08-10 13:00:16 -04:00
|
|
|
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
|
2001-08-10 13:00:16 -04:00
|
|
|
CONFIGURE_ARGS+= --disable-optimizations \
|
2001-08-11 16:11:04 -04:00
|
|
|
--disable-debug \
|
2001-08-10 13:00:16 -04:00
|
|
|
--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>
|