freebsd-ports/games/wesnoth-devel/Makefile
Jeremy Messenger 6f7b0b4124 -Update to 0.8.5.
-Add a new knob, WITH_CAMPAIGN (a new campaign server).
-GCC 3.4 is now required, any patch(es) to remove USE_GCC=3.4 is welcome.
-files/patch-configure was created by Ulrich Spoerlein <q@uni.de>. [1]

PR:		ports/71111 [1]
Submitted by:	Ulrich Spoerlein <q@uni.de>
2004-10-11 22:42:04 +00:00

124 lines
3.0 KiB
Makefile

# New ports collection makefile for: wesnoth
# Date created: 22 December 2003
# Whom: Mezz <mezz7@cox.net>
#
# $FreeBSD$
#
PORTNAME= wesnoth
PORTVERSION= 0.8.5
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= wesnoth
.if defined(LITE)
PKGNAMESUFFIX= -lite
DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
.endif
MAINTAINER= mezz@FreeBSD.org
COMMENT= A fantasy turn-based strategy game
USE_GCC= 3.4
USE_SDL= image mixer net ttf
USE_GNOME= gnometarget
USE_GMAKE= yes
WANT_GNOME= yes
USE_GETTEXT= yes
USE_X_PREFIX= yes
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-sdltest \
--with-libiconv-prefix=${LOCALBASE} \
--with-libintl-prefix=${LOCALBASE} \
--with-localedir=${PREFIX}/share/locale
CONFIGURE_ENV= CPPFLAGS="-ftemplate-depth-45" \
LDFLAGS="-L${LOCALBASE}/lib -lintl"
MAN6= wesnoth.6 wesnoth_editor.6 wesnothd.6
.if defined(LITE)
CONFIGURE_ARGS+= --enable-lite
PLIST_SUB+= LITE:="@comment "
.else
PLIST_SUB+= LITE:=""
.endif
.if defined(WITH_CAMPAIGN) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+= --enable-campaign-server
PLIST_SUB+= CAMPAIGN:=""
.else
PLIST_SUB+= CAMPAIGN:="@comment "
.endif
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
.endif
.if defined(WITH_EDITOR) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+= --enable-editor
PLIST_SUB+= EDITOR:=""
.else
PLIST_SUB+= EDITOR:="@comment "
.endif
.if defined(WITH_SERVER) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+= --enable-server
PLIST_SUB+= SERVER:=""
.else
PLIST_SUB+= SERVER:="@comment "
.endif
.if defined(WITH_TOOLS) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+= --enable-tools
PLIST_SUB+= TOOLS:=""
.else
PLIST_SUB+= TOOLS:="@comment "
.endif
.include <bsd.port.pre.mk>
.if ${HAVE_GNOME:Mgnomehier}!=""
CONFIGURE_ARGS+= --with-gnome
PLIST_SUB+= GNOME:=""
.else
PLIST_SUB+= GNOME:="@comment "
.endif
.if exists(${LOCALBASE}/bin/kde-config)
CONFIGURE_ARGS+= --with-kde
PLIST_SUB+= KDE:=""
.else
PLIST_SUB+= KDE:="@comment "
.endif
pre-everything::
.if !defined(LITE) || !defined(WITH_CAMPAIGN) || !defined(WITH_DEBUG) || !defined(WITH_EDITOR) || !defined(WITH_SERVER) || !defined(WITH_TOOLS)
@${ECHO_MSG} "You may specify the following on the command line:"
@${ECHO_MSG} " "
.endif
.if !defined(LITE)
@${ECHO_MSG} "LITE=yes for lite version of Wesnoth (without music)."
.endif
.if !defined(WITH_CAMPAIGN)
@${ECHO_MSG} "WITH_CAMPAIGN=yes to enable compilation of campaign server."
.endif
.if !defined(WITH_DEBUG)
@${ECHO_MSG} "WITH_DEBUG=yes to enable debugging in Wesnoth."
.endif
.if !defined(WITH_EDITOR)
@${ECHO_MSG} "WITH_EDITOR=yes to enable compilation of map editor."
.endif
.if !defined(WITH_SERVER)
@${ECHO_MSG} "WITH_SERVER=yes to enable compilation of server."
.endif
.if !defined(WITH_TOOLS)
@${ECHO_MSG} "WITH_TOOLS=yes to enable compilation of tools for translators and artists."
.endif
post-patch:
@${REINPLACE_CMD} -e 's|[$$][(]datadir[)]/applications|${X11BASE}/share/gnome/apps/Games|g ; \
s|[$$][(]datadir[)]/icons|${X11BASE}/share/gnome/pixmaps|g' \
${WRKSRC}/icons/Makefile.in
.include <bsd.port.post.mk>