Port of Frogatto, an old-school 2D classic adventure platformer game.

WWW: http://www.frogatto.com/
This commit is contained in:
Alexey Dokuchaev 2010-07-16 01:32:15 +00:00
parent f84d275af4
commit a14ed098e5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=257832
5 changed files with 101 additions and 0 deletions

View file

@ -271,6 +271,7 @@
SUBDIR += fretsonfire
SUBDIR += fretsonfire-data
SUBDIR += frikqcc
SUBDIR += frogatto
SUBDIR += frotz
SUBDIR += frozenbubble
SUBDIR += fteqw

49
games/frogatto/Makefile Normal file
View file

@ -0,0 +1,49 @@
# New ports collection makefile for: Frogatto
# Date created: 14 Jul 2010
# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= frogatto
PORTVERSION= 1.0
CATEGORIES= games
MASTER_SITES= http://www.frogatto.com/files/
MAINTAINER= danfe@FreeBSD.org
COMMENT= An old-school 2D classic adventure platformer game
LIB_DEPENDS= boost_thread.4:${PORTSDIR}/devel/boost-libs
USE_BZIP2= yes
USE_GCC= 4.2+ # required for `-fthreadsafe-statics' on FreeBSD 6.X
USE_GMAKE= yes
ALL_TARGET= game server
USE_GL= glew
USE_SDL= image mixer ttf
PLIST_FILES= bin/${PORTNAME} bin/${PORTNAME}-server
post-patch:
# Sanitize Makefile: honor CXX/CXXFLAGS, trim `-mt' suffix from boost libs,
# remove superfluous libraries when linking server executable, etc.
@${REINPLACE_CMD} -E -e 's,(ccache )?g\+\+,$$(CXX) $$(CXXFLAGS),' \
-e 's,-O2,, ; s,-g,, ; s,/usr/X11R6,${LOCALBASE},' \
-e 's,-mt,,g ; /server/s,`.*mixer,,' \
-e '/server/s,-lX11,,' ${WRKSRC}/Makefile
# Point to the right location where look for the resources on FreeBSD
@${REINPLACE_CMD} -e 's,HAVE_CONFIG_H,__FreeBSD__,' \
-e 's,DATADIR,"${DATADIR}",' ${WRKSRC}/src/filesystem.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/game ${PREFIX}/bin/${PORTNAME}
${INSTALL_PROGRAM} ${WRKSRC}/server ${PREFIX}/bin/${PORTNAME}-server
cd ${WRKSRC} && ${COPYTREE_SHARE} "data images music sounds" \
${DATADIR}
# Dynamically generate part of the PLIST for game resources (lots of them)
${FIND} ${DATADIR} -not -type d | \
${SED} 's,^${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
${FIND} ${DATADIR} -type d | \
${SED} 's,^${PREFIX}/,@dirrm ,' | ${SORT} -r >> ${TMPPLIST}
.include <bsd.port.mk>

3
games/frogatto/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (frogatto-1.0.tar.bz2) = 13035e6bf1adbf15b38b9b655d67fcb9
SHA256 (frogatto-1.0.tar.bz2) = 7a3dab049df8d4cd38a4fa0ab98ea001d5bae1d373d134fbd4e773132fb68c59
SIZE (frogatto-1.0.tar.bz2) = 136213969

View file

@ -0,0 +1,37 @@
--- src/filesystem.cpp.orig
+++ src/filesystem.cpp
@@ -299,8 +299,14 @@
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 +337,14 @@
#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)) {

11
games/frogatto/pkg-descr Normal file
View file

@ -0,0 +1,11 @@
Frogatto is a "platformer" or "jump-and-run" videogame. Like many older
arcade/nintendo/sega titles, the world is viewed as a cross-section seen
from the side, and your character walks and jumps between solid platforms,
whilst avoiding being hurt by monsters. We're not a clone of any specific
game; although just by being a platformer, it's impossible not to have
something in common with games like Mario or Sonic. So we are trying to
innovate a bit.
Frogatto is also the protagonist's name. It's eponymous.
WWW: http://www.frogatto.com/