aboutsummaryrefslogtreecommitdiffstats
path: root/games/stepmania-devel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'games/stepmania-devel/Makefile')
-rw-r--r--games/stepmania-devel/Makefile120
1 files changed, 69 insertions, 51 deletions
diff --git a/games/stepmania-devel/Makefile b/games/stepmania-devel/Makefile
index 8382d90242b5..951290bbe8f7 100644
--- a/games/stepmania-devel/Makefile
+++ b/games/stepmania-devel/Makefile
@@ -2,76 +2,94 @@
# $FreeBSD$
PORTNAME= stepmania
-PORTVERSION= 20071121
-PORTREVISION= 9
+PORTVERSION= 5.0.a3
+PORTEPOCH= 1
CATEGORIES= games
-MASTER_SITES= SF/${PORTNAME}/OldFiles
+MASTER_SITES= GOOGLE_CODE
PKGNAMESUFFIX= -devel
-DISTNAME= StepMania-CVS-20071121-src
+DISTNAME= ${PORTNAME}-SM5-alpha3-src
MAINTAINER= ports@FreeBSD.org
-COMMENT= Stepmania dance and rhythm game
+COMMENT= Rrhythm game simulator
-LIB_DEPENDS= mad.2:${PORTSDIR}/audio/libmad \
- png15:${PORTSDIR}/graphics/png \
- jpeg.11:${PORTSDIR}/graphics/jpeg \
- m.3:${PORTSDIR}/misc/compat5x
-BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip \
- ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/Docs/Licenses.txt
-CONFLICTS= stepmania-[0-9]*
+BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
+LIB_DEPENDS= mad:${PORTSDIR}/audio/libmad \
+ GLEW:${PORTSDIR}/graphics/glew
-GNU_CONFIGURE= yes
+OPTIONS_DEFINE= PULSEAUDIO VORBIS DOCS
+OPTIONS_DEFAULT=VORBIS
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-SM5-alpha3
+
+PROJECTHOST= sm-ssc
+USE_BZIP2= yes
+USE_XORG= x11 xau xdmcp xext xrandr xrender xtst
USE_GL= gl glu
-USE_XORG= x11 xtst xrandr xau xdmcp xext xrender
+USE_GNOME= gnomehack gtk20
+USE_PERL5_BUILD=yes
USE_ICONV= yes
-USE_GNOME= gtk20
-LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -I${LOCALBASE}/include
-
-# Not yet implemented
-# FFMPEG "Enable ffmpeg support" off \
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --without-ffmpeg
+INSTALLS_ICONS= yes
+MAKE_JOBS_SAFE= yes
-OPTIONS_DEFINE= VORBIS THEORA
-OPTIONS_DEFAULT= VORBIS
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MVORBIS}
-LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis \
- ogg:${PORTSDIR}/audio/libogg
+.if ${PORT_OPTIONS:MPULSEAUDIO}
+LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio
.else
-CONFIGURE_ARGS+=--without-vorbis
+CONFIGURE_ENV+= ac_cv_lib_pulse_pa_stream_new=no
.endif
-.if ${PORT_OPTIONS:MTHEORA}
-LIB_DEPENDS+= theora.0:${PORTSDIR}/multimedia/libtheora
+.if ${PORT_OPTIONS:MVORBIS}
+LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
.else
-CONFIGURE_ARGS+=--without-theora
-.endif
-
-.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 800000
-BROKEN= does not compile
+CONFIGURE_ARGS+=--without-vorbis
.endif
post-patch:
- @${REINPLACE_CMD} -e 's|-lrt|-lrt -liconv|' ${WRKSRC}/src/Makefile.in
- @${REINPLACE_CMD} -e 's|@LINUX_TRUE@am__append_19|@UNIX_TRUE@am__append_19|' ${WRKSRC}/src/Makefile.in
- @${REINPLACE_CMD} -e 's|@LINUX_TRUE@am__objects_16|@UNIX_TRUE@am__objects_16|' ${WRKSRC}/src/Makefile.in
+ @${REINPLACE_CMD} -e \
+ '/^LIBS/s|-lpthread|-liconv|' ${WRKSRC}/src/Makefile.in
+
+pre-build:
+ @${ECHO_CMD} -n > ${WRKDIR}/stepmania.sh
+ @${ECHO_CMD} '#!${SH}' >> ${WRKDIR}/stepmania.sh
+ @${ECHO_CMD} 'cd ${PREFIX}/lib/stepmania; ./stepmania $$@' >> ${WRKDIR}/stepmania.sh
+
+post-build:
+ @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \
+ ${MAKEFILE} ${MAKE_ARGS} SMData)
do-install:
- ${MKDIR} ${PREFIX}/share/games
- ${MKDIR} ${PREFIX}/share/games/stepmania
- ${MKDIR} ${PREFIX}/share/games/stepmania/Announcers
- ${MKDIR} ${PREFIX}/share/games/stepmania/Songs
- (cd ${WRKSRC} && ${UNZIP_CMD} -o Packages/StepMania.smzip)
- (cd ${WRKSRC} && ${COPYTREE_SHARE} "BGAnimations\
- BackgroundEffects BackgroundTransitions Characters Courses\
- Data NoteSkins Themes" ${PREFIX}/share/games/stepmania)
- ${INSTALL_PROGRAM} ${WRKSRC}/src/stepmania \
- ${PREFIX}/share/games/stepmania
- ${INSTALL_DATA} ${WRKSRC}/src/GtkModule.so \
- ${PREFIX}/share/games/stepmania
-
-.include <bsd.port.post.mk>
+ ${INSTALL_SCRIPT} ${WRKDIR}/stepmania.sh ${PREFIX}/bin/stepmania
+ @${MKDIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/stepmania.desktop ${PREFIX}/share/applications
+ @${MKDIR} ${PREFIX}/share/icons/hicolor/scalable/apps
+ cd ${WRKSRC}/icons/hicolor/scalable/apps && ${INSTALL_DATA} \
+ stepmania-ssc.svg ${PREFIX}/share/icons/hicolor/scalable/apps
+.for i in 16 22 24 32 36 48 64 72 96 128 192 256
+ @${MKDIR} ${PREFIX}/share/icons/hicolor/${i}x${i}/apps
+ cd ${WRKSRC}/icons/hicolor/${i}x${i}/apps && ${INSTALL_DATA} \
+ stepmania-ssc.png ${PREFIX}/share/icons/hicolor/${i}x${i}/apps
+.endfor
+ @${MKDIR} ${PREFIX}/lib/stepmania
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/stepmania ${PREFIX}/lib/stepmania
+ ${INSTALL_DATA} ${WRKSRC}/src/GtkModule.so ${PREFIX}/lib/stepmania
+ @${MKDIR} ${PREFIX}/lib/stepmania/Packages
+ ${INSTALL_DATA} ${WRKSRC}/GameData.smzip ${PREFIX}/lib/stepmania/Packages
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ @(${TAR} -C ${WRKSRC}/Docs --exclude "Licenses.txt" -cf - . | \
+ ${TAR} -C ${DOCSDIR} --unlink -xf -)
+ @${FIND} ${DOCSDIR} -print0 | ${XARGS} -0 ${CHOWN} ${SHAREOWN}:${SHAREGRP}
+ @${FIND} ${DOCSDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
+ @${FIND} ${DOCSDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} a+rx
+.endif
+
+.include <bsd.port.mk>