diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-14 04:57:49 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-14 04:57:49 +0000 |
commit | 5ea1eebb1529c9f7af11d01db4281a6a7d7ff26c (patch) | |
tree | 5dfa598f6571ae80cc88e25f59819b86bdb9a5a9 | |
parent | Added ~sparc keyword. (Manifest recommit) (diff) | |
download | gentoo-2-5ea1eebb1529c9f7af11d01db4281a6a7d7ff26c.tar.gz gentoo-2-5ea1eebb1529c9f7af11d01db4281a6a7d7ff26c.tar.bz2 gentoo-2-5ea1eebb1529c9f7af11d01db4281a6a7d7ff26c.zip |
initial import
-rw-r--r-- | games-arcade/smclone/ChangeLog | 8 | ||||
-rw-r--r-- | games-arcade/smclone/Manifest | 3 | ||||
-rw-r--r-- | games-arcade/smclone/files/0.94.1-gentoo-paths.patch | 21 | ||||
-rw-r--r-- | games-arcade/smclone/files/0.94.1-use-HOME.patch | 129 | ||||
-rw-r--r-- | games-arcade/smclone/files/digest-smclone-0.94.1 | 3 | ||||
-rw-r--r-- | games-arcade/smclone/metadata.xml | 5 | ||||
-rw-r--r-- | games-arcade/smclone/smclone-0.94.1.ebuild | 55 |
7 files changed, 224 insertions, 0 deletions
diff --git a/games-arcade/smclone/ChangeLog b/games-arcade/smclone/ChangeLog new file mode 100644 index 000000000000..57629854d2ae --- /dev/null +++ b/games-arcade/smclone/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for games-arcade/smclone +# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-arcade/smclone/ChangeLog,v 1.1 2004/12/14 04:57:49 vapier Exp $ + +*smclone-0.94.1 (13 Dec 2004) + + 13 Dec 2004; Mike Frysinger <vapier@gentoo.org> : + Initial import. Ebuild submitted by me. diff --git a/games-arcade/smclone/Manifest b/games-arcade/smclone/Manifest new file mode 100644 index 000000000000..d3dae452092d --- /dev/null +++ b/games-arcade/smclone/Manifest @@ -0,0 +1,3 @@ +MD5 898be1c4aff5c6091ec54d0df2afedda smclone-0.94.1.ebuild 1246 +MD5 73e6ede9566959233f03faa1caf91657 files/digest-smclone-0.94.1 202 +MD5 349d7f721e40c9520d0951c7de1aacb6 files/0.94.1-gentoo-paths.patch 1148 diff --git a/games-arcade/smclone/files/0.94.1-gentoo-paths.patch b/games-arcade/smclone/files/0.94.1-gentoo-paths.patch new file mode 100644 index 000000000000..bc89e6923f45 --- /dev/null +++ b/games-arcade/smclone/files/0.94.1-gentoo-paths.patch @@ -0,0 +1,21 @@ +--- configure.ac.orig 2004-12-13 22:32:19.202807712 -0500 ++++ configure.ac 2004-12-13 22:32:45.232850544 -0500 +@@ -79,12 +79,12 @@ + packagedocdir=doc/${PACKAGE} + + +-AC_DEFINE_UNQUOTED(LEVEL_DIR, "levels", [Directory for level files]) +-AC_DEFINE_UNQUOTED(OVERWORLD_DIR, "World", [Directory for word data]) +-AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "data/pixmaps", [Directory for pixmap data]) +-AC_DEFINE_UNQUOTED(SOUNDS_DIR, "data/sounds", [Directory for sound data]) +-AC_DEFINE_UNQUOTED(MUSIC_DIR, "data/music", [Directory for music data]) +-AC_DEFINE_UNQUOTED(FONT_DIR, "data/font", [Directory for font data]) ++AC_DEFINE_UNQUOTED(LEVEL_DIR, "@GENTOO_DATADIR@/levels", [Directory for level files]) ++AC_DEFINE_UNQUOTED(OVERWORLD_DIR, "@GENTOO_DATADIR@/World", [Directory for word data]) ++AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "@GENTOO_DATADIR@/pixmaps", [Directory for pixmap data]) ++AC_DEFINE_UNQUOTED(SOUNDS_DIR, "@GENTOO_DATADIR@/sounds", [Directory for sound data]) ++AC_DEFINE_UNQUOTED(MUSIC_DIR, "@GENTOO_DATADIR@/music", [Directory for music data]) ++AC_DEFINE_UNQUOTED(FONT_DIR, "@GENTOO_DATADIR@/font", [Directory for font data]) + + + AC_OUTPUT([Makefile]) diff --git a/games-arcade/smclone/files/0.94.1-use-HOME.patch b/games-arcade/smclone/files/0.94.1-use-HOME.patch new file mode 100644 index 000000000000..0c4f21fa327b --- /dev/null +++ b/games-arcade/smclone/files/0.94.1-use-HOME.patch @@ -0,0 +1,129 @@ +--- include/savegame.h.orig 2004-12-13 23:29:55.346394024 -0500 ++++ include/savegame.h 2004-12-13 23:30:11.844885872 -0500 +@@ -20,7 +20,7 @@ +
+ #define SAVEGAME_VERSION "2.1"
+
+-#define SAVE_DIR "Savegames"
++#define SAVE_DIR ".smclone/Savegames"
+
+ struct Savegame
+ {
+--- savegame.cpp.orig 2004-12-13 23:23:21.299298288 -0500 ++++ savegame.cpp 2004-12-13 23:28:37.816180408 -0500 +@@ -37,8 +37,8 @@ + Loaded_Save_info.OverWorld = 0;
+ Loaded_Save_info.Itembox_item = 0;
+
+- char Full_Save_Name[40];
+- sprintf( Full_Save_Name,"%s/%d.sav", SAVE_DIR, Save_file );
++ char Full_Save_Name[255];
++ snprintf( Full_Save_Name, 254, "%s/%s/%d.sav", getenv("HOME"), SAVE_DIR, Save_file );
+
+ ifstream ifs( Full_Save_Name, ios::in );
+
+@@ -67,8 +67,8 @@ +
+ int Savegame_Save( unsigned int Save_file, Savegame Save_info )
+ {
+- char Full_Save_Name[45];
+- sprintf( Full_Save_Name, "%s/%d.sav", SAVE_DIR, Save_file );
++ char Full_Save_Name[255];
++ snprintf( Full_Save_Name, 254, "%s/%s/%d.sav", getenv("HOME"), SAVE_DIR, Save_file );
+
+ ifstream ifs( Full_Save_Name, ios::in );
+
+@@ -163,11 +163,11 @@ + const char *Savegame_GetDescription( unsigned int Save_file, bool Only_Description )
+ {
+ std :: string Full_Save_Name;
+- char buffer[10];
++ char buffer[255];
+
+ Full_Save_Name = SAVE_DIR "/.sav";
+
+- sprintf( buffer, "%d", Save_file );
++ snprintf( buffer, 254, "%s/%d", getenv("HOME"), Save_file );
+
+ Full_Save_Name.insert( strlen( SAVE_DIR ) + 1, buffer );
+
+@@ -226,11 +226,11 @@ + bool Savegame_valid( unsigned int Save_file )
+ {
+ std :: string Full_Save_Name;
+- char buffer[10];
++ char buffer[255];
+
+ Full_Save_Name = SAVE_DIR "/.sav";
+
+- sprintf( buffer, "%d", Save_file );
++ snprintf( buffer, 254, "%s/%d", getenv("HOME"), Save_file );
+ Full_Save_Name.insert( strlen( SAVE_DIR ) + 1, buffer );
+
+ ifstream ifs( Full_Save_Name.c_str(), ios::in );
+--- main.cpp.orig 2004-12-13 23:29:48.623416072 -0500 ++++ main.cpp 2004-12-13 23:31:16.989982312 -0500 +@@ -554,14 +554,14 @@ + + void MakeScreenshot( void ) + { +- char filename[20];
++ char filename[255];
+ int i = 0;
+ + while( i < 1000 ) + {
+ i++;
+ +- sprintf( filename, "Screenshots/%03d.bmp" , i ); ++ snprintf( filename, 254, "%s/.smclone/Screenshots/%03d.bmp" , getenv("HOME"), i ); + FILE *fp = fopen( filename, "r" );
+ + if( !fp ) +--- preferences.cpp.orig 2004-12-13 23:31:36.006091424 -0500 ++++ preferences.cpp 2004-12-13 23:33:28.611972728 -0500 +@@ -27,6 +27,12 @@ + {
+ //
+ }
++char *get_PREF_NAME( void ) ++{ ++ static char ret[255]; ++ snprintf(ret, 254, "%s/.smclone/%s", getenv("HOME"), PREF_NAME); ++ return ret; ++} +
+ bool cPreferences :: Load( void )
+ {
+@@ -38,11 +44,11 @@ + return 0;
+ }
+
+- ifstream ifs( PREF_NAME, ios::in );
++ ifstream ifs( get_PREF_NAME(), ios::in );
+
+ if( !ifs )
+ {
+- cout << "Could not open preferences file : " << PREF_NAME << endl;
++ cout << "Could not open preferences file : " << get_PREF_NAME() << endl;
+
+ return 0;
+ }
+@@ -67,7 +73,7 @@ + {
+ Update();
+
+- ofstream ofs( PREF_NAME, ios::out );
++ ofstream ofs( get_PREF_NAME(), ios::out );
+
+ char row[250];
+
+@@ -150,7 +156,7 @@ +
+ bool cPreferences :: Prefs_available( void )
+ {
+- FILE *fp = fopen( PREF_NAME, "r" );
++ FILE *fp = fopen( get_PREF_NAME(), "r" );
+
+ if ( !fp )
+ {
diff --git a/games-arcade/smclone/files/digest-smclone-0.94.1 b/games-arcade/smclone/files/digest-smclone-0.94.1 new file mode 100644 index 000000000000..0b122365d5eb --- /dev/null +++ b/games-arcade/smclone/files/digest-smclone-0.94.1 @@ -0,0 +1,3 @@ +MD5 22a540c9fcd82e19b7a25e381d9719f7 SMC_0.94.1_source.zip 148544 +MD5 d8bdc97964ba3bc999e90ad22bb76877 smc_0.94.1_linux_x86.tar.gz 3534898 +MD5 51be4da219a1b44fbc0334aa01edc12c SMC_93_music.zip 12160252 diff --git a/games-arcade/smclone/metadata.xml b/games-arcade/smclone/metadata.xml new file mode 100644 index 000000000000..d3c2cc926f0b --- /dev/null +++ b/games-arcade/smclone/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>games</herd> +</pkgmetadata> diff --git a/games-arcade/smclone/smclone-0.94.1.ebuild b/games-arcade/smclone/smclone-0.94.1.ebuild new file mode 100644 index 000000000000..252d95a5aa7e --- /dev/null +++ b/games-arcade/smclone/smclone-0.94.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-arcade/smclone/smclone-0.94.1.ebuild,v 1.1 2004/12/14 04:57:49 vapier Exp $ + +inherit games eutils + +DESCRIPTION="clone of Super Mario World" +HOMEPAGE="http://smclone.arturh.com/" +SRC_URI="mirror://sourceforge/smclone/SMC_${PV}_source.zip + mirror://sourceforge/smclone/smc_${PV}_linux_x86.tar.gz + mirror://sourceforge/smclone/SMC_93_music.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" +IUSE="" + +RDEPEND="media-libs/libsdl + media-libs/sdl-image + media-libs/sdl-mixer + media-libs/sdl-ttf + media-libs/sdl-gfx" +DEPEND="${RDEPEND} + >=sys-apps/portage-2.0.51" + +S=${WORKDIR}/${PV}/src/unix + +src_unpack() { + unpack ${A} + cd ${S} + chmod go+rw * + epatch ${FILESDIR}/${PV}-gentoo-paths.patch + sed -i \ + -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:g" \ + -e "s:0\.93:${PV}:" \ + configure.ac + sed -i 's:-Wmissing-prototypes:-Wno-deprecated:' Makefile.am + chmod a+x autogen.sh + ./autogen.sh || die "autogen failed" + cd .. + sed -i '/define LEVEL_DIR/d' include/savegame.h + sed -i '/define VERSION/d' include/globals.h + epatch ${FILESDIR}/${PV}-use-HOME.patch +} + +src_install() { + dogamesbin smclone || die "smclone" + cd ${WORKDIR}/smc-${PV} + dodoc *.rtf + cd ${PV} + insinto ${GAMES_DATADIR}/${PN} + doins -r Preferences.ini World levels data/* || die "doins" + doins -r ${WORKDIR}/0.93.1/data/music || die "music" + prepgamesdirs +} |