Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2012 19:37:01 +0100
From:      Chris Rees <crees@FreeBSD.org>
To:        Jason Helfman <jgh@freebsd.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r305698 - in head/games: . smashbattle smashbattle/files
Message-ID:  <CADLo838T6mAvctML66icyQ%2Bu4QzFbnGpfHhE%2BzAnZfH8h2GokA@mail.gmail.com>
In-Reply-To: <201210110533.q9B5X4iW065476@svn.freebsd.org>
References:  <201210110533.q9B5X4iW065476@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11 October 2012 06:33, Jason Helfman <jgh@freebsd.org> wrote:
> XXX Ports RC script present
> Author: jgh
> Date: Thu Oct 11 05:33:04 2012
> New Revision: 305698
> URL: http://svn.freebsd.org/changeset/ports/305698
>
> Log:
>   add new port: games/smashbattle
>
>   Smash Battle is a cross platform, 8-bit style game where two,
>   three or four player face off against each other.
>   The game was inspired by the mario battle minigame from mario 3
>   when we started developing, but changed a lot over time.
>
>   WWW: http://smashbattle.condor.tv/
>
>   PR:           167855  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=167855
>   Submitted by: nemysis@gmx.ch
>   Feature safe:         yes
>
> Added:
>   head/games/smashbattle/
>   head/games/smashbattle/Makefile   (contents, props changed)
>   head/games/smashbattle/distinfo   (contents, props changed)
>   head/games/smashbattle/files/
>   head/games/smashbattle/files/patch-Makefile   (contents, props changed)
>   head/games/smashbattle/files/smashbattle.in   (contents, props changed)
>   head/games/smashbattle/pkg-descr   (contents, props changed)
> Modified:
>   head/games/Makefile
>
> Modified: head/games/Makefile
> ==============================================================================
> --- head/games/Makefile Thu Oct 11 01:40:59 2012        (r305697)
> +++ head/games/Makefile Thu Oct 11 05:33:04 2012        (r305698)
> @@ -847,6 +847,7 @@
>      SUBDIR += slashem-tty
>      SUBDIR += slump
>      SUBDIR += slune
> +    SUBDIR += smashbattle
>      SUBDIR += smiley
>      SUBDIR += sokoban
>      SUBDIR += sol
>
> Added: head/games/smashbattle/Makefile
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/games/smashbattle/Makefile     Thu Oct 11 05:33:04 2012        (r305698)
> @@ -0,0 +1,54 @@
> +# Created by:          nemysis@gmx.ch
> +#
> +# $FreeBSD$
> +
> +PORTNAME=      smashbattle
> +PORTVERSION=   110224
> +CATEGORIES=    games
> +MASTER_SITES=  SF/${PORTNAME}/${PORTNAME}/beta-${PORTVERSION}
> +DISTNAME=      ${PORTNAME}-${DISTVERSION}-src
> +
> +MAINTAINER=    nemysis@gmx.ch
> +COMMENT=       8-bit style platform battle game
> +
> +WRKSRC=                ${WRKDIR}/${DISTNAME}/battle/Battle
> +
> +USE_ZIP=       yes
> +EXTRACT_AFTER_ARGS=    -d ${WRKDIR}/${DISTNAME}
> +USE_GMAKE=     yes
> +USE_DOS2UNIX=  *.cpp *.h *.ini Makefile
> +ALL_TARGET=    battle
> +USE_SDL=       sdl image mixer
> +MAKE_JOBS_SAFE=        yes
> +
> +pre-extract:
> +       @${MKDIR} ${WRKDIR}/${DISTNAME}
> +
> +PLIST_FILES=   bin/${PORTNAME} \
> +               share/applications/${PORTNAME}.desktop \
> +               share/applications/${PORTNAME}fs.desktop \
> +               share/pixmaps/${PORTNAME}.png
> +PLIST_DIRSTRY= share/applications
> +
> +PORTDATA=      *
> +
> +SUB_FILES=     ${PORTNAME}
> +
> +.include <bsd.port.options.mk>
> +
> +post-patch:
> +       @${REINPLACE_CMD} -e 's|/usr/share/games/smashbattle/gfx/SB.png|${PORTNAME}|' \
> +               -e 's|/usr/local/bin/smashbattle|${PORTNAME}|' \
> +               ${WRKSRC}/linux/${PORTNAME}.desktop ${WRKSRC}/linux/${PORTNAME}fs.desktop
> +
> +do-install:
> +       ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
> +       ${MKDIR} ${DATADIR}
> +       ${INSTALL_PROGRAM} ${WRKSRC}/battle ${DATADIR}/${PORTNAME}
> +       @(cd ${WRKSRC} && ${COPYTREE_SHARE} "gfx music sfx stage" ${DATADIR})
> +       ${INSTALL_DATA} ${WRKSRC}/gfx/SB.png ${PREFIX}/share/pixmaps/${PORTNAME}.png
> +       ${MKDIR} ${PREFIX}/share/applications
> +       ${INSTALL_DATA} ${WRKSRC}/linux/${PORTNAME}.desktop ${PREFIX}/share/applications/
> +       ${INSTALL_DATA} ${WRKSRC}/linux/${PORTNAME}fs.desktop ${PREFIX}/share/applications/
> +
> +.include <bsd.port.mk>
>
> Added: head/games/smashbattle/distinfo
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/games/smashbattle/distinfo     Thu Oct 11 05:33:04 2012        (r305698)
> @@ -0,0 +1,2 @@
> +SHA256 (smashbattle-110224-src.zip) = 3856d97bf09e63b203c997190299e0aacfb9f947e9529e634046e7596e1e8ad1
> +SIZE (smashbattle-110224-src.zip) = 12238568
>
> Added: head/games/smashbattle/files/patch-Makefile
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/games/smashbattle/files/patch-Makefile Thu Oct 11 05:33:04 2012        (r305698)
> @@ -0,0 +1,11 @@
> +--- Makefile.orig      2012-05-11 15:51:06.000000000 +0200
> ++++ Makefile   2012-05-11 16:34:16.000000000 +0200
> +@@ -1,6 +1,6 @@
> + CC=g++
> +-CFLAGS=-c -Wall
> +-LDFLAGS=-lSDL -lSDL_mixer -lz -lstdc++
> ++CFLAGS += $(shell sdl-config --cflags) -c -Wall
> ++LDFLAGS += $(shell sdl-config --libs) -lSDL -lSDL_mixer -lz -lstdc++ -lm
> + SRCS=Airstrike.cpp\
> +       AirstrikePowerUp.cpp\
> +       AmmoPowerUp.cpp\
>
> Added: head/games/smashbattle/files/smashbattle.in
> ==============================================================================
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/games/smashbattle/files/smashbattle.in Thu Oct 11 05:33:04 2012        (r305698)
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +#
> +# $FreeBSD$
> +
> +cd "%%DATADIR%%"
> +exec ./smashbattle "${@}"

The idiomatic way to do this is ${1+"$@"}.  Otherwise with no
arguments you end up with "", which is probably not desirable.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo838T6mAvctML66icyQ%2Bu4QzFbnGpfHhE%2BzAnZfH8h2GokA>