From 47fcb75607762e3c0286e1b769f5c3958e8d2beb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 14 Dec 2004 04:57:49 +0000 Subject: [PATCH] initial import --- games-arcade/smclone/ChangeLog | 8 ++ games-arcade/smclone/Manifest | 16 +++ .../smclone/files/0.94.1-gentoo-paths.patch | 21 +++ .../smclone/files/0.94.1-use-HOME.patch | 129 ++++++++++++++++++ .../smclone/files/digest-smclone-0.94.1 | 3 + games-arcade/smclone/metadata.xml | 5 + games-arcade/smclone/smclone-0.94.1.ebuild | 55 ++++++++ 7 files changed, 237 insertions(+) create mode 100644 games-arcade/smclone/ChangeLog create mode 100644 games-arcade/smclone/Manifest create mode 100644 games-arcade/smclone/files/0.94.1-gentoo-paths.patch create mode 100644 games-arcade/smclone/files/0.94.1-use-HOME.patch create mode 100644 games-arcade/smclone/files/digest-smclone-0.94.1 create mode 100644 games-arcade/smclone/metadata.xml create mode 100644 games-arcade/smclone/smclone-0.94.1.ebuild 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 : + Initial import. Ebuild submitted by me. diff --git a/games-arcade/smclone/Manifest b/games-arcade/smclone/Manifest new file mode 100644 index 000000000000..ee1216f3cb7c --- /dev/null +++ b/games-arcade/smclone/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 1fa27468af0beea4b61f729b6086d911 smclone-0.94.1.ebuild 1461 +MD5 fb78e4412858d46c386a9602c52c8ad9 ChangeLog 339 +MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158 +MD5 73e6ede9566959233f03faa1caf91657 files/digest-smclone-0.94.1 202 +MD5 349d7f721e40c9520d0951c7de1aacb6 files/0.94.1-gentoo-paths.patch 1148 +MD5 e7791b027b33238591ac319187887371 files/0.94.1-use-HOME.patch 3333 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.9.10 (GNU/Linux) + +iD8DBQFBvnLzroRuSHgZdywRAm9YAJ9rxiK+x2q0Owr+vOxLyHnk5KXxgACfR+41 +0I5pgyFp9pTiG5JVNCQi3vc= +=NJo6 +-----END PGP SIGNATURE----- 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 @@ + + + +games + 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 +} -- 2.26.2