diff --git a/games/highmoon/Makefile b/games/highmoon/Makefile index 7e42665e5ffe..73f31203324c 100644 --- a/games/highmoon/Makefile +++ b/games/highmoon/Makefile @@ -3,39 +3,56 @@ PORTNAME= highmoon PORTVERSION= 1.2.4 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= games MASTER_SITES= http://highmoon.gerdsmeier.net/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= games@FreeBSD.org COMMENT= Duel in the universe +LICENSE= GPLv2 + WRKSRC= ${WRKDIR}/HighMoon -USE_SDL= image sdl USES= gmake +USE_SDL= image sdl MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" CXXFLAGS+= `${SDL_CONFIG} --cflags` LDFLAGS+= `${SDL_CONFIG} --libs` -lSDL_image +PORTDOCS= AUTHORS NEWS README OPTIONS_DEFINE= DOCS +SUB_FILES= pkg-message + +DESKTOP_ENTRIES="HighMoon" "" "${PORTNAME}" \ + "${PORTNAME}" "Game;ArcadeGame;" "" + post-patch: @${FIND} ${WRKSRC}/src -type f | ${XARGS} ${REINPLACE_CMD} -e \ - 's|SDL/SDL|SDL|g ; \ - s|^#define __ENV|//#define __ENV|g ; \ - s|"gfx/|"${DATADIR}/gfx/|g ; \ - s|"snd/|"${DATADIR}/snd/|g ; \ - s|-round(|-rint(|g' + 's|SDL/SDL|SDL|; \ + s|^#define __ENV|//#define __ENV|; \ + s|"gfx/|(char\*)"${DATADIR}/gfx/|; \ + s|"snd/|(char\*)"${DATADIR}/snd/|; \ + s|-round(|-rint(|' + ${REINPLACE_CMD} -e \ + 's|planet_filename = ""|planet_filename = (char\*)""|; \ + s|u_filename = ""|u_filename = (char\*)""|; \ + s|c_filename = ""|c_filename = (char\*)""|' \ + ${WRKSRC}/src/galaxy.cpp + ${REINPLACE_CMD} -e 's|"HighMoon -|(char\*)"HighMoon -|; \ + s|"Highmoon -|(char\*)"HighMoon -|' \ + ${WRKSRC}/src/language.cpp do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ufo ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - @${MKDIR} ${STAGEDIR}${DATADIR}/gfx - ${INSTALL_DATA} ${WRKSRC}/gfx/* ${STAGEDIR}${DATADIR}/gfx - @${MKDIR} ${STAGEDIR}${DATADIR}/snd - ${INSTALL_DATA} ${WRKSRC}/snd/* ${STAGEDIR}${DATADIR}/snd + @(cd ${WRKSRC} && ${COPYTREE_SHARE} "gfx snd" ${STAGEDIR}${DATADIR}) + ${INSTALL_DATA} ${WRKSRC}/icon.png ${STAGEDIR}${DATADIR} + ${LN} -sf ${DATADIR}/icon.png \ + ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png + @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/games/highmoon/files/patch-src__sound.cpp b/games/highmoon/files/patch-src__sound.cpp new file mode 100644 index 000000000000..2e215b1d2f96 --- /dev/null +++ b/games/highmoon/files/patch-src__sound.cpp @@ -0,0 +1,13 @@ +--- ./src/sound.cpp.orig 2006-03-25 22:10:32.000000000 +0100 ++++ ./src/sound.cpp 2014-04-15 17:58:18.532919123 +0200 +@@ -27,6 +27,10 @@ + + #include "sound.hpp" + ++#ifdef __clang__ ++#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" ++#endif ++ + Soundset::Sample Soundset::sounds[ NUMBEROFCHANNELS ]; + bool Soundset::soundOn = true; + diff --git a/games/highmoon/files/pkg-message.in b/games/highmoon/files/pkg-message.in new file mode 100644 index 000000000000..f576749f2088 --- /dev/null +++ b/games/highmoon/files/pkg-message.in @@ -0,0 +1,20 @@ +=============================================================================== + +HighMoon has been installed. + +All options are given in the command line or GUI shortcuts + + +You can use executable to start and see shortcuts + + highmoon --help + + +Or can use desktop file with shortcuts + + %%LOCALBASE%%/share/applications/highmoon.desktop + + +Have fun! + +=============================================================================== diff --git a/games/highmoon/pkg-descr b/games/highmoon/pkg-descr index 199e8ee60c66..31db21ff65f0 100644 --- a/games/highmoon/pkg-descr +++ b/games/highmoon/pkg-descr @@ -1,7 +1,7 @@ HighMoon is a game similar to "Artillery" or "Worms" -- but it takes place -in the universe. There is a planet system between two flying saucers. The -gravitational fields of the planets and moons change inevitably each -ballistic curve. It is not easy to eliminate an enemy. If you miss it, +in the universe. There is a planet system between two flying saucers. +The gravitational fields of the planets and moons change inevitably each +ballistic curve. It is not easy to eliminate an enemy. If you miss it, the shoots can change their direction and become dangerous to the attacker. HighMoon can be played against a computer or a human opponent in many diff --git a/games/highmoon/pkg-plist b/games/highmoon/pkg-plist index 5fce3a83ccb9..3d8f1156311c 100644 --- a/games/highmoon/pkg-plist +++ b/games/highmoon/pkg-plist @@ -1,5 +1,4 @@ bin/highmoon -%%PORTDOCS%%%%DOCSDIR%%/README %%DATADIR%%/gfx/c_shooting.gif %%DATADIR%%/gfx/c_thinking.gif %%DATADIR%%/gfx/cpktblue.gif @@ -30,6 +29,7 @@ bin/highmoon %%DATADIR%%/gfx/ufoblue.gif %%DATADIR%%/gfx/ufored.gif %%DATADIR%%/gfx/venus.gif +%%DATADIR%%/icon.png %%DATADIR%%/snd/applause.wav %%DATADIR%%/snd/click.wav %%DATADIR%%/snd/curve.wav @@ -38,7 +38,7 @@ bin/highmoon %%DATADIR%%/snd/laser.wav %%DATADIR%%/snd/pluck.wav %%DATADIR%%/snd/strom.wav +share/pixmaps/highmoon.png @dirrm %%DATADIR%%/snd @dirrm %%DATADIR%%/gfx @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%%