aboutsummaryrefslogtreecommitdiffstats
path: root/games/xblast/Makefile
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2009-03-01 04:18:14 +0800
committermiwi <miwi@FreeBSD.org>2009-03-01 04:18:14 +0800
commit6fb12d887c656bcee322259eb9137e700c7c9003 (patch)
treef14e33ff000195ac406220bf9f71635b22ca03af /games/xblast/Makefile
parent70b277f4a881a651dd65f5bfb9d1b87a4ac8f275 (diff)
downloadfreebsd-ports-gnome-6fb12d887c656bcee322259eb9137e700c7c9003.tar.gz
freebsd-ports-gnome-6fb12d887c656bcee322259eb9137e700c7c9003.tar.zst
freebsd-ports-gnome-6fb12d887c656bcee322259eb9137e700c7c9003.zip
- Update to 2.10.4
PR: 131837 Submitted by: Ports Fury
Diffstat (limited to 'games/xblast/Makefile')
-rw-r--r--games/xblast/Makefile130
1 files changed, 96 insertions, 34 deletions
diff --git a/games/xblast/Makefile b/games/xblast/Makefile
index 8ceba34f7014..40db514e68bf 100644
--- a/games/xblast/Makefile
+++ b/games/xblast/Makefile
@@ -6,56 +6,118 @@
#
PORTNAME= xblast
-PORTVERSION= 2.9.22
-PORTREVISION= 1
+PORTVERSION= 2.10.4
CATEGORIES= games
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= xblast
-.ifdef (WITHOUT_SOUND)
-PKGNAMESUFFIX= -nosound
-.endif
+MASTER_SITES= SF
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
-DISTFILES+= image.tar.gz
-DISTFILES+= level.tar.gz
-.ifndef (WITHOUT_SOUND)
-DISTFILES+= sounds.tar.gz
+DISTFILES+= ${IMAGES_DISTNAME}${EXTRACT_SUFX}
+DISTFILES+= ${LEVELS_DISTNAME}${EXTRACT_SUFX}
+DISTFILES+= ${MODELS_DISTNAME}${EXTRACT_SUFX}
+.if !defined(WITHOUT_SOUND)
+DISTFILES+= ${MUSICS_DISTNAME}${EXTRACT_SUFX}
+DISTFILES+= ${SOUNDS_DISTNAME}${EXTRACT_SUFX}
.endif
DIST_SUBDIR= xblast
MAINTAINER= ports@FreeBSD.org
COMMENT= Multi-player real-time strategy game for X11
-CFLAGS+= -DGAME_DATADIR='\"${DATADIR}\"'
-.ifndef (WITHOUT_SOUND)
-CFLAGS+= -DXBLAST_SOUND
+WANT_SDL= yes
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ARGS= --enable-admin
+MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOHEADER="${TRUE}" \
+ AUTOMAKE="${TRUE}"
+
+MAN6= xblast.6
+
+DATADIR= ${PREFIX}/share/XBlast-TNT
+
+CPPFLAGS= -I${LOCALBASE}/include
+LDFLAGS= -L${LOCALBASE}/lib
+
+FONTSDIR= ${LOCALBASE}/lib/X11/fonts/bitstream-vera
+
+IMAGES_DISTNAME=images-2005-01-06
+LEVELS_DISTNAME=levels-2005-01-06
+MODELS_DISTNAME=models-2005-01-06
+MUSICS_DISTNAME=musics-2005-01-06
+SOUNDS_DISTNAME=sounds
+
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS+= --disable-nls
+PLIST_SUB+= NLS="@comment "
+.else
+USE_GETTEXT= yes
+PLIST_SUB+= NLS=""
.endif
-USE_IMAKE= yes
-.ifndef (WITHOUT_SOUND)
-ALL_TARGET= all xbsndsrv
+
+.if defined(WITHOUT_SDL)
+USE_XORG= ice x11
+CONFIGURE_ARGS+= --disable-sdl
+PLIST_SUB+= NOSDL=""
+.else
+RUN_DEPENDS+= ${FONTSDIR}/Vera.ttf:${PORTSDIR}/x11-fonts/bitstream-vera
+USE_SDL+= gfx image mixer net ttf sdl
+CONFIGURE_ARGS+= --enable-sdl
+PLIST_SUB+= NOSDL="@comment "
.endif
-MAN1= xblast.1
-.ifndef (WITHOUT_SOUND)
-PLIST_SUB+= WITH_SOUND=""
+
+.if defined(WITHOUT_SOUND) && defined(WITHOUT_SDL)
+PKGNAMESUFFIX= -nosound
+CONFIGURE_ARGS+= --disable-sound
+PLIST_SUB+= SOUND="@comment "
.else
-PLIST_SUB+= WITH_SOUND="@comment "
+CONFIGURE_ARGS+= --enable-sound
+PLIST_SUB+= SOUND=""
.endif
-.ifndef (WITHOUT_SOUND)
-SOUNDS= sounds
+.if defined(WITH_SMPF)
+CONFIGURE_ARGS+= --enable-SMPF
.endif
-post-install:
-.ifndef (WITHOUT_SOUND)
- ${INSTALL_PROGRAM} ${WRKSRC}/xbsndsrv ${PREFIX}/bin
+post-patch:
+ @${REINPLACE_CMD} -e 's|/games/|/|g ; \
+ /-ggdb/d' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e \
+ 's|$$(game_datadir)/locale|$$(prefix)/share/locale|g ; \
+ s|^xblast_LDADD =.*$$|xblast_LDADD = $$(LIBINTL)|g' \
+ ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e \
+ 's|"Vera.ttf"|"${FONTSDIR}/Vera.ttf"|g' ${WRKSRC}/sdl_text.c
+
+do-install:
+ cd ${WRKSRC} && ${INSTALL_PROGRAM} xblast ${PREFIX}/bin/xblast
+.if defined(WITHOUT_SDL) && !defined(WITHOUT_SOUND)
+ cd ${WRKSRC} && ${INSTALL_PROGRAM} xbsndsrv ${PREFIX}/bin/xbsndsrv
.endif
- ${MKDIR} ${DATADIR}
-.for d in image level ${SOUNDS}
- cd ${WRKDIR}; \
- ${FIND} $d -type d | (cd ${DATADIR}; ${XARGS} ${MKDIR}); \
- ${FIND} $d -type f | ${EGREP} -f ${FILESDIR}/re-${d} | \
- while read f; do \
- ${INSTALL_DATA} $$f ${DATADIR}/$$f; \
- done
+ cd ${WRKSRC} && ${INSTALL_MAN} xblast.man ${MAN6PREFIX}/man/man6/xblast.6
+.if !defined(WITHOUT_NLS)
+.for lang in de fr
+ @${MKDIR} ${PREFIX}/share/locale/${lang}/LC_MESSAGES
+ cd ${WRKSRC}/po && ${INSTALL_DATA} ${lang}.gmo \
+ ${PREFIX}/share/locale/${lang}/LC_MESSAGES/xblast.mo
.endfor
+.endif
+ @${MKDIR} ${DATADIR}/image
+ @(${TAR} -C ${WRKDIR}/${IMAGES_DISTNAME} --exclude "Imakefile" \
+ -cf - . | ${TAR} -C ${DATADIR}/image --unlink -xf -)
+ @${MKDIR} ${DATADIR}/level
+ @(${TAR} -C ${WRKDIR}/${LEVELS_DISTNAME} --exclude "Imakefile" \
+ -cf - . | ${TAR} -C ${DATADIR}/level --unlink -xf -)
+ @${MKDIR} ${DATADIR}/image/sprite
+ @(${TAR} -C ${WRKDIR}/${MODELS_DISTNAME} --exclude "Imakefile" \
+ -cf - . | ${TAR} -C ${DATADIR}/image/sprite --unlink -xf -)
+.if !defined(WITHOUT_SOUND)
+ @${MKDIR} ${DATADIR}/sounds
+ @(${TAR} -C ${WRKDIR}/${MUSICS_DISTNAME} --exclude "Imakefile" \
+ -cf - . | ${TAR} -C ${DATADIR}/sounds --unlink -xf -)
+ @(${TAR} -C ${WRKDIR}/${SOUNDS_DISTNAME} --exclude "Imakefile" \
+ -cf - . | ${TAR} -C ${DATADIR}/sounds --unlink -xf -)
+.endif
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
+ @${FIND} ${DATADIR} -type d -exec ${CHMOD} 755 {} \;
+ @${FIND} ${DATADIR} -type f -exec ${CHMOD} ${SHAREMODE} {} \;
.include <bsd.port.mk>