diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-12-02 23:29:20 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-12-02 23:29:20 +0000 |
commit | 60ea7a7760d6bb1ad4537bd20bccbe0de007b03b (patch) | |
tree | 5b93a51225f2a505b4b53d0766ad93d1a8d35474 /games/blockout | |
parent | b5f550035511688cfd00f1e62d0cec64e0688a27 (diff) |
- Add LICENSE
- Fix patch line endings
- Simplify installation
- Don't require user to manually specify path to datadir
- Don't install needless static library
- Drop @dirrm* from plist
Notes
Notes:
svn path=/head/; revision=373796
Diffstat (limited to 'games/blockout')
-rw-r--r-- | games/blockout/Makefile | 25 | ||||
-rw-r--r-- | games/blockout/files/patch-BlockOut__Utils.cpp | 16 | ||||
-rw-r--r-- | games/blockout/files/patch-gif.c | 16 | ||||
-rw-r--r-- | games/blockout/files/pkg-message.in | 8 | ||||
-rw-r--r-- | games/blockout/pkg-plist | 4 |
5 files changed, 33 insertions, 36 deletions
diff --git a/games/blockout/Makefile b/games/blockout/Makefile index 2736ef6ac827..4fe460794633 100644 --- a/games/blockout/Makefile +++ b/games/blockout/Makefile @@ -12,33 +12,26 @@ DISTNAME= bl24-src-linux-i586 MAINTAINER= ports@FreeBSD.org COMMENT= BlockOut II is an adaptation of the original Blockout DOS game +LICENSE= GPLv2 # or later + ONLY_FOR_ARCHS= i386 USE_SDL= mixer sdl -USES= gmake +USES= gmake dos2unix +DOS2UNIX_FILES= ${WRKSRC}/ImageLib/src/gif/gif.c USE_GL= gl glu WRKSRC= ${WRKDIR}/bl24_lin_src BUILD_WRKSRC= ${WRKSRC}/BlockOut -SUB_FILES= pkg-message +post-patch: + @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/BlockOut/Utils.cpp pre-build: - cd ${WRKSRC}/ImageLib/src && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} + cd ${WRKSRC}/ImageLib/src && ${DO_MAKE_BUILD} do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/BlockOut/blockout ${STAGEDIR}${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/ImageLib/src/libimagelib.a ${STAGEDIR}${PREFIX}/lib - @${MKDIR} ${STAGEDIR}${DATADIR} - @${MKDIR} ${STAGEDIR}${DATADIR}/sounds - @${MKDIR} ${STAGEDIR}${DATADIR}/images -. for i in allPieces background background2 background3 font gameover gameovera marble \ -marbleg menuback menucredits menufont menufont2 menupit online onlinea spark sparka sprites spritesa star_crystal_grid - ${INSTALL_DATA} ${WRKSRC}/BlockOut/images/${i}.png ${STAGEDIR}${DATADIR}/images -. endfor -. for s in blub empty empty2 hit level level2 line line2 tchh welldone welldone2 wozz - ${INSTALL_DATA} ${WRKSRC}/BlockOut/sounds/${s}.wav ${STAGEDIR}${DATADIR}/sounds -. endfor - ${INSTALL_DATA} ${WRKSRC}/BlockOut/sounds/music.mp3 ${STAGEDIR}${DATADIR}/sounds + ${INSTALL_PROGRAM} ${WRKSRC}/BlockOut/blockout ${STAGEDIR}${PREFIX}/bin + cd ${WRKSRC}/BlockOut && ${COPYTREE_SHARE} "images sounds" ${STAGEDIR}${DATADIR} .include <bsd.port.mk> diff --git a/games/blockout/files/patch-BlockOut__Utils.cpp b/games/blockout/files/patch-BlockOut__Utils.cpp new file mode 100644 index 000000000000..698ccfc2a82c --- /dev/null +++ b/games/blockout/files/patch-BlockOut__Utils.cpp @@ -0,0 +1,16 @@ +--- BlockOut/Utils.cpp.orig 2008-01-09 21:29:06.000000000 +0300 ++++ BlockOut/Utils.cpp 2014-12-02 07:58:58.452013513 +0300 +@@ -162,11 +162,9 @@ + return FALSE; + } + +- char *blockoutHome = getenv("BL2_HOME"); ++ const char *blockoutHome = getenv("BL2_HOME"); + if( blockoutHome==NULL ) { +- printf("BL2_HOME environement variable if not defined !\n"); +- printf("Please set the BL2_HOME to the BlockOut II installation directory (ex: BL2_HOME=/usr/local/bl2).\n"); +- return FALSE; ++ blockoutHome="%%DATADIR%%"; + } + strcpy( bl2Home , blockoutHome ); + diff --git a/games/blockout/files/patch-gif.c b/games/blockout/files/patch-gif.c index 81f295f78657..896fd98f820d 100644 --- a/games/blockout/files/patch-gif.c +++ b/games/blockout/files/patch-gif.c @@ -1,11 +1,11 @@ --- ImageLib/src/gif/gif.c.orig 2009-08-07 15:16:48.000000000 -0400 +++ ImageLib/src/gif/gif.c 2009-08-07 15:19:01.000000000 -0400 @@ -4,7 +4,7 @@ - /* Use an ultra fast compression method */
- /***************************************************/
- #include <stdio.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include <memory.h>
- #include "gif.h"
-
+ /* Use an ultra fast compression method */ + /***************************************************/ + #include <stdio.h> +-#include <malloc.h> ++#include <stdlib.h> + #include <memory.h> + #include "gif.h" + diff --git a/games/blockout/files/pkg-message.in b/games/blockout/files/pkg-message.in deleted file mode 100644 index c1a8d90c0d8f..000000000000 --- a/games/blockout/files/pkg-message.in +++ /dev/null @@ -1,8 +0,0 @@ - -************************************************************************* - - Set the environment variable: - - BL2_HOME=%%PREFIX%%/share/blockout - -************************************************************************* diff --git a/games/blockout/pkg-plist b/games/blockout/pkg-plist index 53aef418fc87..961f05623886 100644 --- a/games/blockout/pkg-plist +++ b/games/blockout/pkg-plist @@ -1,5 +1,4 @@ bin/blockout -lib/libimagelib.a %%DATADIR%%/images/allPieces.png %%DATADIR%%/images/background.png %%DATADIR%%/images/background2.png @@ -34,6 +33,3 @@ lib/libimagelib.a %%DATADIR%%/sounds/welldone.wav %%DATADIR%%/sounds/welldone2.wav %%DATADIR%%/sounds/wozz.wav -@dirrm %%DATADIR%%/sounds -@dirrm %%DATADIR%%/images -@dirrm %%DATADIR%% |