aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/super_methane_brothers/Makefile50
-rw-r--r--games/super_methane_brothers/distinfo4
-rw-r--r--games/super_methane_brothers/files/patch-sources__methane.cpp24
-rw-r--r--games/super_methane_brothers/pkg-install10
-rw-r--r--games/super_methane_brothers/pkg-plist25
-rw-r--r--games/super_methane_brothers/pkg-req16
6 files changed, 72 insertions, 57 deletions
diff --git a/games/super_methane_brothers/Makefile b/games/super_methane_brothers/Makefile
index 0ae51e9dda39..7f6213772464 100644
--- a/games/super_methane_brothers/Makefile
+++ b/games/super_methane_brothers/Makefile
@@ -2,42 +2,52 @@
# $FreeBSD$
PORTNAME= super_methane_brothers
-PORTVERSION= 1.4.8
-PORTREVISION= 5
+PORTVERSION= 1.5.1
CATEGORIES= games
MASTER_SITES= SF/methane/Methane%20Stable/Methane%20V${PORTVERSION}
DISTNAME= methane-${PORTVERSION}
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
-COMMENT= A port of the Amiga platform game of the same name
+COMMENT= Port of the Amiga platform game of the same name
-LIB_DEPENDS= clanCore:${PORTSDIR}/devel/clanlib1 \
- mikmod:${PORTSDIR}/audio/libmikmod
+LICENSE= GPLv2
+LIB_DEPENDS= clan23Core:${PORTSDIR}/devel/clanlib \
+ execinfo:${PORTSDIR}/devel/libexecinfo
+
+USE_GCC= 4.6+
+USE_GL= glu
+USE_PKGCONFIG= build
USE_GMAKE= yes
-MAKEFILE= makefile
-BUILD_WRKSRC= ${WRKSRC}/source/linux
+MAKE_ENV= METHANE_FLAGS="${CPPFLAGS}" METHANE_LIBS="${LDFLAGS}"
+MAKE_JOBS_UNSAFE= yes
+
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lexecinfo
+
+PORTDOCS= *
+PLIST_FILES= bin/methane
+
+.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e \
- 's|g++|${CXX}|; s|gcc|${CXX}|; \
- s|^\(METHANE_FLAGS =\)|\1 ${CPPFLAGS}|; \
- s|^\(METHANE_LIBS =\)|\1 ${LDFLAGS}|; \
- s|0.8|1.0|g' \
- ${BUILD_WRKSRC}/makefile
+ 's|-2.2|-2.3|g ; \
+ s|FLAGS =|FLAGS +=| ; \
+ s|LIBS =|LIBS +=| ; \
+ s|g++|$${CXX}| ; \
+ s|gcc|$${CXX}|' ${WRKSRC}/Makefile
do-install:
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/methane ${PREFIX}/bin
+ (cd ${WRKDIR}/${DISTNAME} && ${INSTALL_PROGRAM} methane ${PREFIX}/bin)
${CHGRP} games ${PREFIX}/bin/methane
${CHMOD} g+s ${PREFIX}/bin/methane
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}/html
- cd ${WRKSRC} && ${INSTALL_DATA} authors history readme todo ${DOCSDIR}
- cd ${WRKSRC}/docs && ${INSTALL_DATA} *.gif *.html ${DOCSDIR}/html
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ @(cd ${WRKDIR}/${DISTNAME}/docs && ${COPYTREE_SHARE} . ${DOCSDIR})
.endif
-
-post-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGREQ} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/games/super_methane_brothers/distinfo b/games/super_methane_brothers/distinfo
index f6b2fde5b227..addab56f83b7 100644
--- a/games/super_methane_brothers/distinfo
+++ b/games/super_methane_brothers/distinfo
@@ -1,2 +1,2 @@
-SHA256 (methane-1.4.8.tgz) = 7e91d0b478b133a74565f0a7a01783cdda20bd555ca92feb4da66e51b51a9289
-SIZE (methane-1.4.8.tgz) = 1063099
+SHA256 (methane-1.5.1.tgz) = ac1de7009e638c784b4d413b56a4387be94a31bd5fe3050db7b51e39ccfdd248
+SIZE (methane-1.5.1.tgz) = 1057881
diff --git a/games/super_methane_brothers/files/patch-sources__methane.cpp b/games/super_methane_brothers/files/patch-sources__methane.cpp
new file mode 100644
index 000000000000..0969aa7e2d63
--- /dev/null
+++ b/games/super_methane_brothers/files/patch-sources__methane.cpp
@@ -0,0 +1,24 @@
+--- sources/methane.cpp.orig 2011-12-11 14:18:38.301132904 +0100
++++ sources/methane.cpp 2011-12-11 14:15:32.669126965 +0100
+@@ -105,15 +105,15 @@
+ return 0;
+ }
+
+- CL_AutoPtr<CL_SetupSound> setup_sound;
+- CL_AutoPtr<CL_SoundOutput> sound_output;
+- CL_AutoPtr<CL_SetupMikMod> setup_mikmod;
++ CL_UniquePtr<CL_SetupSound> setup_sound;
++ CL_UniquePtr<CL_SoundOutput> sound_output;
++ CL_UniquePtr<CL_SetupMikMod> setup_mikmod;
+
+ if (GLOBAL_SoundEnable)
+ {
+- setup_sound = new CL_SetupSound;
+- sound_output = new CL_SoundOutput(44100);
+- setup_mikmod = new CL_SetupMikMod;
++ setup_sound = cl_move(CL_UniquePtr<CL_SetupSound>(new CL_SetupSound));
++ sound_output = cl_move(CL_UniquePtr<CL_SoundOutput>(new CL_SoundOutput(44100)));
++ setup_mikmod = cl_move(CL_UniquePtr<CL_SetupMikMod>(new CL_SetupMikMod));
+ }
+
+ // Set the video mode
diff --git a/games/super_methane_brothers/pkg-install b/games/super_methane_brothers/pkg-install
deleted file mode 100644
index 4a67b59829aa..000000000000
--- a/games/super_methane_brothers/pkg-install
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-SCOREFILE="/var/games/methanescores"
-
-[ "$2" != "POST-INSTALL" -o -f "$SCOREFILE" ] && exit 0
-
-mkdir -p /var/games
-touch $SCOREFILE
-chown root:games $SCOREFILE
-chmod 664 $SCOREFILE
diff --git a/games/super_methane_brothers/pkg-plist b/games/super_methane_brothers/pkg-plist
deleted file mode 100644
index c6cc349544db..000000000000
--- a/games/super_methane_brothers/pkg-plist
+++ /dev/null
@@ -1,25 +0,0 @@
-bin/methane
-%%PORTDOCS%%%%DOCSDIR%%/authors
-%%PORTDOCS%%%%DOCSDIR%%/history
-%%PORTDOCS%%%%DOCSDIR%%/html/backdrop.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/block.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/bug.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/cookie.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/gamepic.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/gen.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/info.html
-%%PORTDOCS%%%%DOCSDIR%%/html/mbug.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/potion.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/puff.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/spike.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/spring.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/sucker.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/title.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/turbo.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/whirly.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/zoom.gif
-%%PORTDOCS%%%%DOCSDIR%%/readme
-%%PORTDOCS%%%%DOCSDIR%%/todo
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@unexec [ -s /var/games/methanescores ] || rm -f /var/games/methanescores
diff --git a/games/super_methane_brothers/pkg-req b/games/super_methane_brothers/pkg-req
new file mode 100644
index 000000000000..639e2ac18456
--- /dev/null
+++ b/games/super_methane_brothers/pkg-req
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+SCOREFILE="/var/games/methane.scores"
+
+if [ "x$2" = "xPOST-INSTALL" ]; then
+ mkdir -p /var/games
+ touch $SCOREFILE
+ chown root:games $SCOREFILE
+ chmod 664 $SCOREFILE
+fi
+
+if [ "x$2" = "xPOST-DEINSTALL" ]; then
+ if [ ! -s $SCOREFILE ]; then
+ rm -f $SCOREFILE
+ fi
+fi