1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- add new port: games/megamario

Mega Mario is a Super Mario Bros. 1 clone.
It features everything the original features - with better graphics,
higher resolution, smoother movement and new levels.
The story of mario and Luigi continues in old-school style.

WWW: http://www.megamario.de/

PR:		167893
Submitted by:	nemysis@gmx.ch
Feature safe:	yes
This commit is contained in:
Jason Helfman 2012-11-30 19:07:41 +00:00
parent d4a5e1e0b0
commit 1e00f52e12
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308023
10 changed files with 146 additions and 0 deletions

View File

@ -545,6 +545,7 @@
SUBDIR += meandmyshadow
SUBDIR += megaglest
SUBDIR += megaglest-data
SUBDIR += megamario
SUBDIR += memonix
SUBDIR += meqcc
SUBDIR += meritous

61
games/megamario/Makefile Normal file
View File

@ -0,0 +1,61 @@
# Created by: nemysis@gmx.ch
#
# $FreeBSD$
PORTNAME= megamario
PORTVERSION= 1.7
CATEGORIES= games
MASTER_SITES= SF/mmario/Mega%20Mario%20Full%20Game/Mega%20Mario%20v${PORTVERSION}%20%28Full%20Game%2C%20high%20Quality%20music%29/
DISTNAME= MegaMario_v${PORTVERSION}_full
MAINTAINER= nemysis@gmx.ch
COMMENT= Super Mario Bros 1 clone
LICENSE= LGPL21
WRKSRC= ${WRKDIR}/${DISTNAME}
FETCH_ARGS?= -Fpr
USE_ZIP= yes
EXTRACT_AFTER_ARGS= -d ${WRKSRC}
USE_GMAKE= yes
USE_DOS2UNIX= *.cpp *.h *.ini Makefile* *.txt *.desktop
ALL_TARGET= ${PORTNAME}
USE_SDL= sdl image mixer ttf
USE_GL= glu
MAKE_JOBS_SAFE= yes
pre-extract:
${MKDIR} ${WRKDIR}/${DISTNAME}
PLIST_FILES= bin/${PORTNAME} \
share/applications/${PORTNAME}.desktop \
share/pixmaps/${PORTNAME}.png
PLIST_DIRSTRY= share/applications
PORTDATA= *
PORTDOCS= CONTROLS.txt linux.txt readme.txt
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's|/usr/share/pixmaps/megamario.png|${PORTNAME}|' \
${WRKSRC}/${PORTNAME}.desktop
@${REINPLACE_CMD} -e 's|slidebar.PNG|slidebar.png|' \
${WRKSRC}/data/levels/Edit2/main ${WRKSRC}/data/levels/3_2/main
@(cd ${WRKSRC}/help && ${MV} editor_R*.PNG editor_Roehren.png)
@for i in `${FIND} ${WRKSRC} -name \*.JPG -or -name \*.PNG`; do \
${MV} $$i `echo $$i | ${SED} -e 's/PNG/png/;s/JPG/jpg/'`; done
post-install:
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "help mp3music screens" ${DATADIR})
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png ${PREFIX}/share/pixmaps/
${MKDIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${PREFIX}/share/applications/
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
.include <bsd.port.mk>

2
games/megamario/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (MegaMario_v1.7_full.zip) = 243ebf03cb1e5c5e7cead48d9a988ffb9a1c94f9427f71ea559ad047486c9e72
SIZE (MegaMario_v1.7_full.zip) = 26467748

View File

@ -0,0 +1,12 @@
Index: Makefile
@@ -1,8 +1,7 @@
-PREFIX = /home/opt
DATADIR = $(PREFIX)/share/$(TARGET)
-CFLAGS = -g -Wall -O2
+CFLAGS += $(shell sdl-config --cflags)
CXXFLAGS= $(CFLAGS)
-LDFLAGS = -lSDL -lSDL_mixer -lSDL_ttf -lSDL_image -lGL
+LDFLAGS += $(shell sdl-config --libs) -lSDL -lSDL_mixer -lSDL_ttf -lSDL_image -lGL -lm
DEFINES = -DDATADIR=\"$(DATADIR)/\"
OBJS = src/bonus.o src/gamepad.o src/killerblume.o src/player.o \
src/bowser.o src/global.o src/levels.o src/spiny.o \

View File

@ -0,0 +1,11 @@
--- src/functions.cpp.orig 2012-05-06 00:56:40.000000000 +0200
+++ src/functions.cpp 2012-05-06 01:00:37.000000000 +0200
@@ -447,7 +447,7 @@
}
else
{
- sprintf(tmp, "mp3music/%s",filename);
+ sprintf(tmp, DATADIR "mp3music/%s",filename);
tmp[strlen(tmp)-3]='m';
tmp[strlen(tmp)-2]='p';
tmp[strlen(tmp)-1]='3';

View File

@ -0,0 +1,10 @@
--- src/global.cpp.orig 2012-05-06 00:44:34.000000000 +0200
+++ src/global.cpp 2012-05-06 00:50:32.000000000 +0200
@@ -9,6 +9,7 @@
#include "Global.h"
#include "unixutils.h"
+#include <limits.h>

View File

@ -0,0 +1,11 @@
--- src/levels.h.orig 2012-05-06 00:44:34.000000000 +0200
+++ src/levels.h 2012-05-06 00:52:50.000000000 +0200
@@ -8,7 +8,7 @@
#ifndef __LEVELS_H__
#define __LEVELS_H__
-
+#include <limits.h>
class cScene
{

View File

@ -0,0 +1,20 @@
--- src/main.cpp.orig 2012-05-06 00:56:40.000000000 +0200
+++ src/main.cpp 2012-05-06 01:03:55.000000000 +0200
@@ -61,7 +61,7 @@
#endif /* defined __unix__ */
- out_logfile.open ("log.txt");
+ out_logfile.open ("%s/.megamario/log.txt");
dictionary * d = iniparser_new(szIniFile);
pixelation = iniparser_getboolean (d, "Mario:Pixelation", 1);
@@ -413,7 +413,7 @@
fstream fin;
-fin.open("mp3music/music_available.dat",ios::in);
+fin.open( DATADIR "mp3music/music_available.dat",ios::in);
if( fin.is_open() )
{
HighQualityMusicFound=1;

View File

@ -0,0 +1,12 @@
--- src/player.cpp.orig 2012-05-05 20:22:06.000000000 +0200
+++ src/player.cpp 2012-05-05 21:08:10.000000000 +0200
@@ -10,7 +10,9 @@
#include "Global.h"
//#include <Math.h>
+#ifndef M_PI
#define M_PI 3.141592654
+#endif
#define JUMPS 12

View File

@ -0,0 +1,6 @@
Mega Mario is a Super Mario Bros. 1 clone.
It features everything the original features - with better graphics,
higher resolution, smoother movement and new levels.
The story of mario and Luigi continues in old-school style.
WWW: http://www.megamario.de/