aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2014-05-12 00:21:04 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2014-05-12 00:21:04 +0800
commitf9012fb132e17a729f1d47e0bda957af8f09668b (patch)
tree1d3002e88bfb997d8917e1529e7d60ca65a7d467 /games
parent4a6fc9800da1a6591888546c2589a88e9c1149f2 (diff)
downloadfreebsd-ports-gnome-f9012fb132e17a729f1d47e0bda957af8f09668b.tar.gz
freebsd-ports-gnome-f9012fb132e17a729f1d47e0bda957af8f09668b.tar.zst
freebsd-ports-gnome-f9012fb132e17a729f1d47e0bda957af8f09668b.zip
- Support staging
- Use new OPTIONS features
Diffstat (limited to 'games')
-rw-r--r--games/blinkensisters/Makefile56
-rw-r--r--games/blinkensisters/files/patch-main.cpp15
-rw-r--r--games/blinkensisters/files/patch-oggplayer.cpp11
-rw-r--r--games/blinkensisters/pkg-plist25
4 files changed, 49 insertions, 58 deletions
diff --git a/games/blinkensisters/Makefile b/games/blinkensisters/Makefile
index f066f1a56eeb..4a2ceab73a88 100644
--- a/games/blinkensisters/Makefile
+++ b/games/blinkensisters/Makefile
@@ -12,7 +12,7 @@ COMMENT= Parallax-style 2D scrolling platform game
USE_SDL= sdl image ttf
USE_PERL5= build
-USES= cmake perl5
+USES= cmake perl5 compiler:c++11-lang # actually, old gcc fails in theora.h
CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include
@@ -20,16 +20,33 @@ CXXFLAGS+= -I${LOCALBASE}/include
WRKSRC= ${WRKDIR}/blinkensisters/lostpixels/game/software
ADDONS_WRKSRC= ${WRKDIR}/blinkensisters/lostpixels/game/addons
+PLIST_FILES= bin/LostPixels \
+ bin/bmfcompress \
+ bin/bmfdecompress
PORTDOCS= *
+PORTDATA= *
+
+OPTIONS_DEFINE= ADDONS SDL_MIXER SDL_NET THEORA DOCS
+OPTIONS_DEFAULT=ADDONS SDL_MIXER SDL_NET THEORA
-OPTIONS_DEFINE= ADDONS SDL_MIXER SDL_NET THEORA
ADDONS_DESC= Install addons (~200 MB download size)
SDL_MIXER_DESC= Build with sound support
SDL_NET_DESC= Build with network support
-OPTIONS_DEFAULT= SDL_MIXER SDL_NET
+SDL_MIXER_USE= SDL=mixer
+SDL_MIXER_CMAKE_OFF= -DUSE_SDL_MIXER:BOOL=OFF
+SDL_MIXER_PLIST_FILES= bin/BlinkenPlayer
+
+SDL_NET_USE= SDL=net
+SDL_NET_CMAKE_OFF= -DUSE_SDL_NET:BOOL=OFF
+SDL_NET_PLIST_FILES= bin/blpmatrix \
+ bin/blpviewer \
+ bin/bxxviewer \
+ bin/mcufviewer
+
+THEORA_CMAKE_ON= -DUSE_THEORA:BOOL=ON
+THEORA_LIB_DEPENDS= libtheora.so:${PORTSDIR}/multimedia/libtheora
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${ARCH} == "sparc64"
@@ -39,38 +56,11 @@ BROKEN= Does not compile on sparc64
.if ${PORT_OPTIONS:MADDONS}
DISTNAME= LostPixels-${PORTVERSION}-source-with-addons
PKGNAMESUFFIX= -with-addons
-PLIST_SUB+= ADDONS=""
.else
DISTNAME= LostPixels-${PORTVERSION}-source
-PLIST_SUB+= ADDONS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MSDL_MIXER}
-USE_SDL+= mixer
-PLIST_SUB+= SDL_MIXER=""
-.else
-CMAKE_ARGS+= -DUSE_SDL_MIXER:BOOL=OFF
-PLIST_SUB+= SDL_MIXER="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MSDL_NET}
-USE_SDL+= net
-PLIST_SUB+= SDL_NET=""
-.else
-CMAKE_ARGS+= -DUSE_SDL_NET:BOOL=OFF
-PLIST_SUB+= SDL_NET="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MTHEORA}
-CMAKE_ARGS+= -DUSE_THEORA:BOOL=ON
-.else
-LIB_DEPENDS+= theora:${PORTSDIR}/multimedia/libtheora
.endif
post-patch:
-.if ! ${PORT_OPTIONS:MDOCS}
- @${REINPLACE_CMD} -e '/^INSTALL.*doc/ d' ${WRKSRC}/CMakeLists.txt
-.endif
@${REINPLACE_CMD} -e 's|share/blinkensisters|${DATADIR:S,${PREFIX}/,,}|; \
s|share/doc/blinkensisters|${DOCSDIR:S,${PREFIX}/,,}|' \
${WRKSRC}/CMakeLists.txt
@@ -84,8 +74,8 @@ post-build:
cd ${ADDONS_WRKSRC} && ${MAKE}
post-install:
- ${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${ADDONS_WRKSRC}/for_upload/*.bmf ${DATADIR}
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${ADDONS_WRKSRC}/for_upload/*.bmf ${STAGEDIR}${DATADIR}/
.endif
.include <bsd.port.mk>
diff --git a/games/blinkensisters/files/patch-main.cpp b/games/blinkensisters/files/patch-main.cpp
new file mode 100644
index 000000000000..2ff4f3461199
--- /dev/null
+++ b/games/blinkensisters/files/patch-main.cpp
@@ -0,0 +1,15 @@
+Game fails to load this file
+--- main.cpp.orig 2008-12-06 23:51:54.000000000 +0300
++++ main.cpp 2014-05-11 20:09:10.346486193 +0400
+@@ -446,11 +446,7 @@
+
+ // Display the Intro sequence
+ #ifdef CAVAC_RELEASEMODE
+-#ifdef HASOGGSUPPORT
+- playogg(configGetPath("startanim_video.ogg"),gScreen); /* play the standard ogg video instead of the BMF showVideo("startanim.bmf", true); */
+-#else // HASOGGSUPPORT
+ showVideo("startanim.bmf", true, true);
+-#endif // NO HASOGGSUPPORT
+ #endif // CAVAC_RELEASEMODE
+ configStartupComplete();
+
diff --git a/games/blinkensisters/files/patch-oggplayer.cpp b/games/blinkensisters/files/patch-oggplayer.cpp
new file mode 100644
index 000000000000..cbb466c8f4c0
--- /dev/null
+++ b/games/blinkensisters/files/patch-oggplayer.cpp
@@ -0,0 +1,11 @@
+--- oggplayer.cpp.orig 2008-12-06 23:51:54.000000000 +0300
++++ oggplayer.cpp 2013-12-20 21:39:40.586265026 +0400
+@@ -68,7 +68,7 @@
+ hard/kernel buffer is going to be most of or > a second, that's
+ just a little bit important */
+ #if defined(__FreeBSD__)
+-#include <machine/soundcard.h>
++#include <sys/soundcard.h>
+ #define AUDIO_DEVICE "/dev/audio"
+ #elif defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <soundcard.h>
diff --git a/games/blinkensisters/pkg-plist b/games/blinkensisters/pkg-plist
deleted file mode 100644
index 2a8d7b047610..000000000000
--- a/games/blinkensisters/pkg-plist
+++ /dev/null
@@ -1,25 +0,0 @@
-%%SDL_MIXER%%bin/BlinkenPlayer
-bin/LostPixels
-%%SDL_NET%%bin/blpmatrix
-%%SDL_NET%%bin/blpviewer
-bin/bmfcompress
-bin/bmfdecompress
-%%SDL_NET%%bin/bxxviewer
-%%SDL_NET%%bin/mcufviewer
-%%DATADIR%%/Gaposis Outline (BRK).ttf
-%%DATADIR%%/Gas Huffer Phat.ttf
-%%DATADIR%%/Georgia.ttf
-%%DATADIR%%/Ghostmeat.ttf
-%%DATADIR%%/basedata.bmf
-%%DATADIR%%/splash.jpg
-%%ADDONS%%%%DATADIR%%/24c3.bmf
-%%ADDONS%%%%DATADIR%%/icy.bmf
-%%ADDONS%%%%DATADIR%%/mz_escape.bmf
-%%ADDONS%%%%DATADIR%%/mz_moviepack.bmf
-%%ADDONS%%%%DATADIR%%/mz_pnog.bmf
-%%ADDONS%%%%DATADIR%%/mz_template.bmf
-%%ADDONS%%%%DATADIR%%/mz_xmas2007.bmf
-%%ADDONS%%%%DATADIR%%/s23_ivorytower.bmf
-%%ADDONS%%%%DATADIR%%/theme_standard.bmf
-%%ADDONS%%%%DATADIR%%/theme_xmas2007.bmf
-@dirrm %%DATADIR%%