From: Tristan Heaven Date: Thu, 23 Nov 2006 20:07:37 +0000 (+0000) Subject: Remove old version X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b7986da19e43a15cb260d6cb378b9170986aa37;p=gentoo.git Remove old version Package-Manager: portage-2.1.2_rc2-r1 --- diff --git a/games-arcade/njam/files/1.21-conf.patch b/games-arcade/njam/files/1.21-conf.patch deleted file mode 100644 index e3ee74547ec3..000000000000 --- a/games-arcade/njam/files/1.21-conf.patch +++ /dev/null @@ -1,136 +0,0 @@ ---- njam.cpp.orig 2004-08-31 23:08:03.911280616 -0400 -+++ njam.cpp 2004-08-31 23:57:05.560082024 -0400 -@@ -33,6 +33,9 @@ - // needed for chdir - #ifdef __linux__ - #include -+// for mkdir -+#include -+#include - #endif - - #include -@@ -215,15 +218,31 @@ - SDLNet_Quit(); - - // write configuration options -- char filename[] = "njam.conf"; -- FILE *fp = fopen(filename, "w+"); -- if (fp) -- { -- fprintf(fp, "M=%d\n", (m_GameOptions.PlayMusic ? 1 : 0)); -- fprintf(fp, "S=%d\n", (m_GameOptions.PlaySound ? 1 : 0)); -- fprintf(fp, "U=%d\n", m_GameOptions.UsedSkin); -- fprintf(fp, "I=%s\n", m_GameOptions.ServerIP); -- fclose(fp); -+ FILE *fp; -+ -+ if(getenv("HOME") && (chdir(getenv("HOME")) == 0)) -+ { -+ mkdir(".njam", 0774); -+ -+ if(chdir(".njam") == 0) -+ { -+ char filename[] = "njam.conf"; -+ fp = fopen(filename, "w+"); -+ -+ if(fp) -+ { -+ fprintf(fp, -+ "M=%d\n", -+ "S=%d\n", -+ "U=%d\n", -+ "I=%d\n", -+ (m_GameOptions.PlayMusic ? 1 : 0), -+ (m_GameOptions.PlaySound ? 1 : 0), -+ m_GameOptions.UsedSkin, -+ m_GameOptions.ServerIP); -+ fclose(fp); -+ } -+ } - } - - // format: NAME#POINTS#LEVEL# -@@ -599,37 +618,52 @@ - m_FontYellow = new NjamFont("data/font-yellow.bmp", 10, 15); - - // Load user settings from .conf file -- char filename[] = "njam.conf"; -- FILE *fp = fopen(filename, "r"); -- if (fp) -- { -- LogFile("Reading njam.conf file.\n"); -- char buff[20]; -- while (true) -+ FILE *fp; -+ -+ if(getenv("HOME") && (chdir(getenv("HOME")) == 0) && -+ (chdir(".njam") == 0)) -+ { -+ char filename[] = "njam.conf"; -+ fp = fopen(filename, "r"); -+ -+ if(fp) - { -- fgets(buff, 20, fp); -- if (feof(fp)) -- break; -+ LogFile("Reading njam.conf file.\n"); -+ char buff[20]; - -- if (buff[1] == '=') -+ while (true) - { -- int i; -- switch (buff[0]) -+ fgets(buff, 20, fp); -+ if (feof(fp)) -+ break; -+ -+ if (buff[1] == '=') - { -- case 'M': m_GameOptions.PlayMusic = (buff[2] == '1'); break; -- case 'S': m_GameOptions.PlaySound = (buff[2] == '1'); break; -- case 'U': m_GameOptions.UsedSkin = (buff[2] - '0'); break; -- case 'I': // serverIP -- for (i=2; buff[i] != '\n' && buff[i] && i<17; i++) -- m_GameOptions.ServerIP[i-2] = buff[i]; -- m_GameOptions.ServerIP[i] = '\0'; -- break; -- default: -- printf("Unknown configuration file option: %c\n", buff[0]); -+ int i; -+ switch (buff[0]) -+ { -+ case 'M': -+ m_GameOptions.PlayMusic = (buff[2] == '1'); -+ break; -+ case 'S': -+ m_GameOptions.PlaySound = (buff[2] == '1'); -+ break; -+ case 'U': -+ m_GameOptions.UsedSkin = (buff[2] - '0'); -+ break; -+ case 'I': // serverIP -+ for (i=2; buff[i] != '\n' && buff[i] && i<17; i++) -+ m_GameOptions.ServerIP[i-2] = buff[i]; -+ m_GameOptions.ServerIP[i] = '\0'; -+ break; -+ default: -+ printf("Unknown configuration file option: %c\n", -+ buff[0]); -+ } - } - } -+ fclose(fp); - } -- fclose(fp); - } - - // create default hiscore -@@ -992,4 +1026,4 @@ - SDL_Flip(m_Screen); - } - } --//--------------------------------------------------------------------------- -+//--------------------------------------------------------------------------- diff --git a/games-arcade/njam/files/digest-njam-1.21 b/games-arcade/njam/files/digest-njam-1.21 deleted file mode 100644 index 716e4acc14d3..000000000000 --- a/games-arcade/njam/files/digest-njam-1.21 +++ /dev/null @@ -1 +0,0 @@ -MD5 aa1889ea750fabff3029b95ad21ad1fa njam-1.21-src.tar.gz 1438351 diff --git a/games-arcade/njam/njam-1.21.ebuild b/games-arcade/njam/njam-1.21.ebuild deleted file mode 100644 index 35ff9ef3a298..000000000000 --- a/games-arcade/njam/njam-1.21.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-arcade/njam/njam-1.21.ebuild,v 1.3 2005/12/28 06:42:07 mr_bones_ Exp $ - -inherit eutils flag-o-matic games - -MY_P="${P}-src" -DESCRIPTION="Multi or single-player network Pacman-like game in SDL" -HOMEPAGE="http://njam.sourceforge.net/" -SRC_URI="mirror://sourceforge/njam/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86 ppc ~amd64" -IUSE="" - -DEPEND=">=media-libs/sdl-mixer-1.2.5 - >=media-libs/sdl-image-1.2.2 - >=media-libs/libsdl-1.2.5 - >=media-libs/sdl-net-1.2.4" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - cd "${S}" - - # store the conf file in the user's home directory. - epatch "${FILESDIR}/${PV}-conf.patch" - - sed -i \ - -e "s:\"data:\"${GAMES_DATADIR}/${PN}/data:" njam.cpp njamgame.cpp \ - || die "sed njam.cpp and njamgame.cpp failed" - sed -i \ - -e "s:\"hiscore.dat:\"${GAMES_STATEDIR}/${PN}/hiscore.dat:" \ - -e "s:\"skins:\"${GAMES_DATADIR}/${PN}/skins:" njam.cpp \ - || die "sed njam.cpp failed" - sed -i \ - -e "s:\"levels:\"${GAMES_DATADIR}/${PN}/levels:" njamedit.cpp \ - || die "sed njamedit.cpp failed" - sed -i \ - -e "s:\"log.txt:\"/dev/null:" njamutils.cpp \ - || die "sed njamutils.cpp failed" - - # njam segfaults on startup with -Os - replace-flags "-Os" "-O2" - - sed -i \ - -e '/^PREFIX/s:=.*:=/usr/share:' \ - -e "s:-O3:${CFLAGS}:" Makefile \ - || die "sed Makefile failed" -} - -src_install() { - dogamesbin njam || die "dogamesbin failed" - dodoc CHANGES README TODO - dohtml html/* - dodir "${GAMES_DATADIR}/njam" - cp -r data/ skins/ levels/ "${D}${GAMES_DATADIR}/njam" || die "cp failed" - dodir "${GAMES_STATEDIR}/${PN}" - touch "${D}/${GAMES_STATEDIR}/${PN}/hiscore.dat" - fperms 664 "${GAMES_STATEDIR}/${PN}/hiscore.dat" - prepgamesdirs -}