Import frogatto-1.0.3
Frogatto is an open-source "platformer" or "jump-and-run" videogame. Like in many classic games, the world is viewed as a cross-section seen from the side, and your character (in this case, a small green fellow named Frogatto) walks and jumps between solid platforms, whilst avoiding monsters. Based on the frogatto FreeBSD port. ok sthen@
This commit is contained in:
parent
9ed6d71a8f
commit
ceb779450c
54
games/frogatto/Makefile
Normal file
54
games/frogatto/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2010/09/23 11:30:55 ajacoutot Exp $
|
||||
|
||||
ONLY_FOR_ARCHS= ${GCC4_ARCHS}
|
||||
|
||||
COMMENT= 2D adventure platformer game
|
||||
|
||||
DISTNAME= frogatto-1.0.3
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
CATEGORIES= games
|
||||
|
||||
HOMEPAGE= http://www.frogatto.com/
|
||||
|
||||
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
|
||||
# GPLv3 + see share/frogatto/LICENSE
|
||||
PERMIT_PACKAGE_CDROM= may not charge
|
||||
PERMIT_PACKAGE_FTP= may not modify
|
||||
PERMIT_DISTFILES_CDROM= may not charge
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += GL GLU X11 c m pthread stdc++ GLEW SDL SDL_image SDL_mixer
|
||||
WANTLIB += SDL_ttf boost_iostreams-mt boost_regex-mt boost_system-mt
|
||||
WANTLIB += boost_thread-mt png
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}files/
|
||||
|
||||
LIB_DEPENDS= ::devel/sdl-image \
|
||||
::devel/sdl-mixer \
|
||||
::devel/sdl-ttf \
|
||||
::graphics/glew \
|
||||
::devel/boost
|
||||
|
||||
NO_REGRESS= Yes
|
||||
USE_GMAKE= Yes
|
||||
ALL_TARGET= game server
|
||||
|
||||
SUBST_VARS= CXX CFLAGS CXXFLAGS
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/Makefile \
|
||||
${WRKSRC}/src/sound.cpp \
|
||||
${WRKSRC}/src/filesystem.cpp
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/game ${PREFIX}/bin/frogatto
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/server ${PREFIX}/bin/frogatto-server
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/frogatto
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/frogatto
|
||||
.for i in data images music sounds
|
||||
cp -R ${WRKSRC}/${i} ${PREFIX}/share/frogatto
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
5
games/frogatto/distinfo
Normal file
5
games/frogatto/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (frogatto-1.0.3.tar.bz2) = Hp/+cpx4yI0eKRR2lCmVMQ==
|
||||
RMD160 (frogatto-1.0.3.tar.bz2) = Xpmv12NJryLKvBKyzOC98TwSG+U=
|
||||
SHA1 (frogatto-1.0.3.tar.bz2) = N2NxwdFjB7PsdT7cfu9MbQa7y38=
|
||||
SHA256 (frogatto-1.0.3.tar.bz2) = DyEBL6jImA3nwDDH3mMCZx0PoQNvD7oRy8/rqjzqomk=
|
||||
SIZE (frogatto-1.0.3.tar.bz2) = 100909023
|
44
games/frogatto/patches/patch-Makefile
Normal file
44
games/frogatto/patches/patch-Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2010/09/23 11:30:56 ajacoutot Exp $
|
||||
--- Makefile.orig Sat Aug 14 06:27:06 2010
|
||||
+++ Makefile Thu Sep 23 10:00:11 2010
|
||||
@@ -7,31 +7,31 @@ formula_test_objects = filesystem.o formula_function.o
|
||||
wml_modify_test_objects = filesystem.o string_utils.o wml_node.o wml_parser.o wml_utils.o
|
||||
wml_schema_test_objects = filesystem.o string_utils.o wml_node.o wml_parser.o wml_utils.o
|
||||
|
||||
-OPT=-O2 -fno-inline-functions
|
||||
+OPT=-fno-inline-functions
|
||||
|
||||
%.o : src/%.cpp
|
||||
- ccache g++ -DIMPLEMENT_SAVE_PNG -fno-inline-functions -g $(OPT) `sdl-config --cflags` -I/usr/X11R6/include -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -fthreadsafe-statics -c $<
|
||||
+ ${CXX} ${CXXFLAGS} -DIMPLEMENT_SAVE_PNG -fno-inline-functions $(OPT) `sdl-config --cflags` -I${X11BASE}/include -I${LOCALBASE}/include/libpng -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -fthreadsafe-statics -c $<
|
||||
|
||||
game: $(objects)
|
||||
- g++ -g $(OPT) -L. -L/sw/lib -L/usr/X11R6/lib -L. -lX11 -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -L/usr/lib `sdl-config --libs` -lSDLmain -lSDL -lGL -lGLU -lGLEW -lSDL_image -lSDL_ttf -lSDL_mixer -lpng -lboost_regex-mt -lboost_system-mt -fthreadsafe-statics $(objects) -o game
|
||||
+ ${CXX} ${CXXFLAGS} $(OPT) -L. -L/sw/lib -L${X11BASE}/lib -L. -lX11 -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -L/usr/lib `sdl-config --libs` -lSDLmain -lSDL -lGL -lGLU -lGLEW -lSDL_image -lSDL_ttf -lSDL_mixer -lpng -lboost_regex-mt -lboost_system-mt -fthreadsafe-statics $(objects) -o game
|
||||
|
||||
server: $(server_objects)
|
||||
- g++ -fno-inline-functions -g $(OPT) -L/sw/lib -L/usr/X11R6/lib -lX11 -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -L/usr/lib `sdl-config --libs` -lSDLmain -lSDL -lGL -lGLU -lSDL_image -lSDL_ttf -lSDL_mixer -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lboost_iostreams-mt -fthreadsafe-statics $(server_objects) -o server
|
||||
+ ${CXX} ${CXXFLAGS} -fno-inline-functions $(OPT) -L/sw/lib -L${X11BASE}/lib -lX11 -D_GNU_SOURCE=1 -D_REENTRANT -Wnon-virtual-dtor -Wreturn-type -L/usr/lib `sdl-config --libs` -lSDLmain -lSDL -lGL -lGLU -lSDL_image -lSDL_ttf -lSDL_mixer -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lboost_iostreams-mt -fthreadsafe-statics $(server_objects) -o server
|
||||
|
||||
poolalloc.o: src/poolalloc.c
|
||||
- gcc -fno-inline-functions -g $(OPT) `sdl-config --cflags` -I/usr/X11R6/include -D_GNU_SOURCE=1 -D_REENTRANT -Wreturn-type -c src/poolalloc.c
|
||||
+ ${CC} ${CFLAGS} -fno-inline-functions $(OPT) `sdl-config --cflags` -I${X11BASE}/include -I${LOCALBASE}/include/libpng -D_GNU_SOURCE=1 -D_REENTRANT -Wreturn-type -c src/poolalloc.c
|
||||
|
||||
malloc.o: src/malloc.c
|
||||
- gcc -fno-inline-functions -g $(OPT) `sdl-config --cflags` -I/usr/X11R6/include -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_LOCKS=1 -Wreturn-type -c src/malloc.c
|
||||
+ ${CC} ${CFLAGS} -fno-inline-functions $(OPT) `sdl-config --cflags` -I${X11BASE}/include -I${LOCALBASE}/include/libpng -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_LOCKS=1 -Wreturn-type -c src/malloc.c
|
||||
|
||||
formula_test: $(formula_test_objects)
|
||||
- g++ -O2 -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_FORMULA -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lSDL -lGL -lGLU -lSDL_image -lSDL_ttf -lSDL_mixer -lboost_regex src/formula.cpp $(formula_test_objects) -o test
|
||||
+ ${CXX} ${CXXFLAGS} -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_FORMULA -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lSDL -lGL -lGLU -lSDL_image -lSDL_ttf -lSDL_mixer -lboost_regex src/formula.cpp $(formula_test_objects) -o test
|
||||
|
||||
wml_modify_test: $(wml_modify_test_objects)
|
||||
- g++ -O2 -g -framework Cocoa -I/usr/local/include/boost-1_34 -I/sw/include/SDL -I/usr/X11R6/include -Isrc/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_WML_MODIFY -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lboost_regex src/wml_modify.cpp $(wml_modify_test_objects) -o test
|
||||
+ ${CXX} ${CXXFLAGS} -framework Cocoa -I/usr/local/include/boost-1_34 -I/sw/include/SDL -I${X11BASE}/include -I${LOCALBASE}/include/libpng -Isrc/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_WML_MODIFY -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lboost_regex src/wml_modify.cpp $(wml_modify_test_objects) -o test
|
||||
|
||||
wml_schema_test: $(wml_schema_test_objects)
|
||||
- g++ -O2 -g -framework Cocoa -I/usr/local/include/boost-1_34 -I/sw/include/SDL -I/usr/X11R6/include -Isrc/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_WML_SCHEMA -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lboost_regex src/wml_schema.cpp $(wml_schema_test_objects) -o test
|
||||
+ ${CXX} ${CXXFLAGS} -framework Cocoa -I/usr/local/include/boost-1_34 -I/sw/include/SDL -I${X11BASE}/include -I${LOCALBASE}/include/libpng -Isrc/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUNIT_TEST_WML_SCHEMA -Wnon-virtual-dtor -Wreturn-type -L/usr/lib -lboost_regex src/wml_schema.cpp $(wml_schema_test_objects) -o test
|
||||
|
||||
|
||||
clean:
|
11
games/frogatto/patches/patch-src_controls_cpp
Normal file
11
games/frogatto/patches/patch-src_controls_cpp
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-src_controls_cpp,v 1.1.1.1 2010/09/23 11:30:56 ajacoutot Exp $
|
||||
--- src/controls.cpp.orig Thu Sep 23 08:16:24 2010
|
||||
+++ src/controls.cpp Thu Sep 23 08:16:48 2010
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
+#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
49
games/frogatto/patches/patch-src_filesystem_cpp
Normal file
49
games/frogatto/patches/patch-src_filesystem_cpp
Normal file
@ -0,0 +1,49 @@
|
||||
$OpenBSD: patch-src_filesystem_cpp,v 1.1.1.1 2010/09/23 11:30:56 ajacoutot Exp $
|
||||
--- src/filesystem.cpp.orig Sun Jun 27 01:22:06 2010
|
||||
+++ src/filesystem.cpp Thu Sep 23 08:39:45 2010
|
||||
@@ -285,6 +285,9 @@ namespace {
|
||||
#ifdef HAVE_CONFIG_H
|
||||
const std::string data_dir=DATADIR ;
|
||||
const bool have_datadir = true;
|
||||
+#elif defined __OpenBSD__
|
||||
+ const std::string data_dir="${TRUEPREFIX}/share/frogatto" ;
|
||||
+ const bool have_datadir = true;
|
||||
#else
|
||||
const std::string data_dir="";
|
||||
const bool have_datadir = false;
|
||||
@@ -299,9 +302,15 @@ void get_files_in_dir(const std::string& directory,
|
||||
FILE_NAME_MODE mode)
|
||||
{
|
||||
struct stat st;
|
||||
+ std::string dirname;
|
||||
|
||||
- DIR* dir = opendir(directory.c_str());
|
||||
+ if(have_datadir)
|
||||
+ dirname = data_dir + "/" + directory;
|
||||
+ else
|
||||
+ dirname = directory;
|
||||
|
||||
+ DIR* dir = opendir(dirname.c_str());
|
||||
+
|
||||
if(dir == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -331,14 +340,14 @@ void get_files_in_dir(const std::string& directory,
|
||||
#endif /* !APPLE */
|
||||
|
||||
std::string fullname;
|
||||
- if (directory.empty() || directory[directory.size()-1] == '/'
|
||||
+ if (dirname.empty() || dirname[dirname.size()-1] == '/'
|
||||
#ifdef __AMIGAOS4__
|
||||
- || (directory[directory.size()-1]==':')
|
||||
+ || (dirname[dirname.size()-1]==':')
|
||||
#endif /* __AMIGAOS4__ */
|
||||
)
|
||||
- fullname = directory + basename;
|
||||
+ fullname = dirname + basename;
|
||||
else
|
||||
- fullname = (directory + "/") + basename;
|
||||
+ fullname = (dirname + "/") + basename;
|
||||
|
||||
if (::stat(fullname.c_str(), &st) != -1) {
|
||||
if (S_ISREG(st.st_mode)) {
|
30
games/frogatto/patches/patch-src_sound_cpp
Normal file
30
games/frogatto/patches/patch-src_sound_cpp
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_sound_cpp,v 1.1.1.1 2010/09/23 11:30:56 ajacoutot Exp $
|
||||
--- src/sound.cpp.orig Thu Sep 23 08:02:09 2010
|
||||
+++ src/sound.cpp Thu Sep 23 08:01:33 2010
|
||||
@@ -356,7 +356,7 @@ int play_internal(const std::string& file, int loops,
|
||||
#if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE
|
||||
Mix_Chunk*& chunk = cache[file];
|
||||
if(chunk == NULL) {
|
||||
- chunk = Mix_LoadWAV(("sounds/" + file).c_str());
|
||||
+ chunk = Mix_LoadWAV(("${TRUEPREFIX}/share/frogatto/sounds/" + file).c_str());
|
||||
if(chunk == NULL) {
|
||||
return -1;
|
||||
}
|
||||
@@ -544,7 +544,7 @@ void play_music(const std::string& file)
|
||||
}
|
||||
|
||||
current_music_name() = file;
|
||||
- current_mix_music = Mix_LoadMUS(("music/" + file).c_str());
|
||||
+ current_mix_music = Mix_LoadMUS(("${TRUEPREFIX}/share/frogatto/music/" + file).c_str());
|
||||
if(!current_mix_music) {
|
||||
std::cerr << "Mix_LoadMUS ERROR loading " << file << ": " << Mix_GetError() << "\n";
|
||||
return;
|
||||
@@ -597,7 +597,7 @@ void play_music_interrupt(const std::string& file)
|
||||
return;
|
||||
}
|
||||
|
||||
- current_mix_music = Mix_LoadMUS(("music/" + file).c_str());
|
||||
+ current_mix_music = Mix_LoadMUS(("${TRUEPREFIX}/share/frogatto/music/" + file).c_str());
|
||||
if(!current_mix_music) {
|
||||
std::cerr << "Mix_LoadMUS ERROR loading " << file << ": " << Mix_GetError() << "\n";
|
||||
return;
|
5
games/frogatto/pkg/DESCR
Normal file
5
games/frogatto/pkg/DESCR
Normal file
@ -0,0 +1,5 @@
|
||||
Frogatto is an open-source "platformer" or "jump-and-run" videogame.
|
||||
Like in many classic games, the world is viewed as a cross-section seen
|
||||
from the side, and your character (in this case, a small green fellow
|
||||
named Frogatto) walks and jumps between solid platforms, whilst
|
||||
avoiding monsters.
|
1462
games/frogatto/pkg/PLIST
Normal file
1462
games/frogatto/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user