diff options
author | danfe <danfe@FreeBSD.org> | 2010-07-16 09:32:15 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2010-07-16 09:32:15 +0800 |
commit | 24f4502ca7b6c2d8830b73c6a3b20f51abc7aada (patch) | |
tree | 635b09d49a6c34f58e92ff5ccd45889099576738 /games | |
parent | 0c7ab40a8312a45d82595301678821cc94233334 (diff) | |
download | freebsd-ports-gnome-24f4502ca7b6c2d8830b73c6a3b20f51abc7aada.tar.gz freebsd-ports-gnome-24f4502ca7b6c2d8830b73c6a3b20f51abc7aada.tar.zst freebsd-ports-gnome-24f4502ca7b6c2d8830b73c6a3b20f51abc7aada.zip |
Port of Frogatto, an old-school 2D classic adventure platformer game.
WWW: http://www.frogatto.com/
Diffstat (limited to 'games')
-rw-r--r-- | games/Makefile | 1 | ||||
-rw-r--r-- | games/frogatto/Makefile | 49 | ||||
-rw-r--r-- | games/frogatto/distinfo | 3 | ||||
-rw-r--r-- | games/frogatto/files/patch-src-filesystem.cpp | 37 | ||||
-rw-r--r-- | games/frogatto/pkg-descr | 11 |
5 files changed, 101 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index f95d1bd66ee0..160635743a4d 100644 --- a/games/Makefile +++ b/games/Makefile @@ -271,6 +271,7 @@ SUBDIR += fretsonfire SUBDIR += fretsonfire-data SUBDIR += frikqcc + SUBDIR += frogatto SUBDIR += frotz SUBDIR += frozenbubble SUBDIR += fteqw diff --git a/games/frogatto/Makefile b/games/frogatto/Makefile new file mode 100644 index 000000000000..af1a497aeabb --- /dev/null +++ b/games/frogatto/Makefile @@ -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> diff --git a/games/frogatto/distinfo b/games/frogatto/distinfo new file mode 100644 index 000000000000..2e8e25876d5f --- /dev/null +++ b/games/frogatto/distinfo @@ -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 diff --git a/games/frogatto/files/patch-src-filesystem.cpp b/games/frogatto/files/patch-src-filesystem.cpp new file mode 100644 index 000000000000..5ab41e334d21 --- /dev/null +++ b/games/frogatto/files/patch-src-filesystem.cpp @@ -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)) { diff --git a/games/frogatto/pkg-descr b/games/frogatto/pkg-descr new file mode 100644 index 000000000000..163c6d1af83c --- /dev/null +++ b/games/frogatto/pkg-descr @@ -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/ |