diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2006-09-01 23:45:28 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2006-09-01 23:45:28 +0000 |
commit | 968487be8d60764a96b8cea79f0e6c2adc9d4bf2 (patch) | |
tree | e67c8628506d773dd9c8994d270114e437b22142 /games-arcade/tomatoes | |
parent | Added ebuilds for the 2006.0 and 2006.1 releases. (diff) | |
download | historical-968487be8d60764a96b8cea79f0e6c2adc9d4bf2.tar.gz historical-968487be8d60764a96b8cea79f0e6c2adc9d4bf2.tar.bz2 historical-968487be8d60764a96b8cea79f0e6c2adc9d4bf2.zip |
Fixing memory leak, Bug #129778
Package-Manager: portage-2.1-r2
Diffstat (limited to 'games-arcade/tomatoes')
-rw-r--r-- | games-arcade/tomatoes/ChangeLog | 8 | ||||
-rw-r--r-- | games-arcade/tomatoes/files/digest-tomatoes-1.55-r2 | 6 | ||||
-rw-r--r-- | games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch | 10 | ||||
-rw-r--r-- | games-arcade/tomatoes/tomatoes-1.55-r2.ebuild | 74 |
4 files changed, 93 insertions, 5 deletions
diff --git a/games-arcade/tomatoes/ChangeLog b/games-arcade/tomatoes/ChangeLog index 629930145621..8b3750fbeee7 100644 --- a/games-arcade/tomatoes/ChangeLog +++ b/games-arcade/tomatoes/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-arcade/tomatoes # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-arcade/tomatoes/ChangeLog,v 1.12 2006/06/23 00:01:53 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-arcade/tomatoes/ChangeLog,v 1.13 2006/09/01 23:45:28 tupone Exp $ + +*tomatoes-1.55-r2 (01 Sep 2006) + + 01 Sep 2006; <tupone@gentoo.org> files/tomatoes-1.55-c_str.patch, + -tomatoes-1.55-r1.ebuild, +tomatoes-1.55-r2.ebuild: + Fixing memory leak, Bug #129778 by whereami@gmail.com 23 Jun 2006; Michael Sterrett <mr_bones_@gentoo.org> tomatoes-1.55-r1.ebuild: diff --git a/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2 b/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2 new file mode 100644 index 000000000000..f457e71c188b --- /dev/null +++ b/games-arcade/tomatoes/files/digest-tomatoes-1.55-r2 @@ -0,0 +1,6 @@ +MD5 a6a7ff71bb1098fd0a4098fd3d846339 tomatoes-linux-1.5.tar.bz2 8807421 +RMD160 454591162df5266a6ecb88b0b67914a5c0348a04 tomatoes-linux-1.5.tar.bz2 8807421 +SHA256 69a3af1994cb58409be9b469e1aa4bdb91c405d99071c7431526640ec53d1300 tomatoes-linux-1.5.tar.bz2 8807421 +MD5 b0fa201bfb55d1cb402c52ab7e743086 tomatoes-linux-src-1.55.tar.bz2 62947 +RMD160 a57881902e3c917733058e3b9c936d2db5ca0e3a tomatoes-linux-src-1.55.tar.bz2 62947 +SHA256 126d001532ee5b81cc95e1a86a274d11669b8c8f65c8235ae2e9b8fbdfab4a60 tomatoes-linux-src-1.55.tar.bz2 62947 diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch index 47f5e68dec80..dd6927e54153 100644 --- a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch +++ b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch @@ -4,18 +4,20 @@ // makefile. char *get_config_location(bool write) { #ifdef LINUX -+ char *config_path; ++ static char *config_path = NULL; // Get the path to the config file string tmp = get_tomatoes_dir() + "config.cfg"; -@@ -90,8 +91,9 @@ +@@ -90,8 +91,11 @@ } fclose(ftest); } - - return (char*)tmp.c_str(); -+ config_path = new char[tmp.length()+1]; -+ strcpy(config_path,tmp.c_str()); ++ if (!config_path) { ++ config_path = new char[tmp.length()+1]; ++ strcpy(config_path,tmp.c_str()); ++ } + return config_path; #endif diff --git a/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild b/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild new file mode 100644 index 000000000000..809543235cc5 --- /dev/null +++ b/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-arcade/tomatoes/tomatoes-1.55-r2.ebuild,v 1.1 2006/09/01 23:45:28 tupone Exp $ + +inherit eutils games + +DATA_PV=1.5 +DESCRIPTION="How many tomatoes can you smash in ten short minutes?" +HOMEPAGE="http://tomatoes.sourceforge.net/about.html" +SRC_URI="mirror://sourceforge/tomatoes/tomatoes-linux-src-${PV}.tar.bz2 + mirror://sourceforge/tomatoes/tomatoes-linux-${DATA_PV}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +DEPEND="virtual/opengl + virtual/glu + >=media-libs/libsdl-1.2.7 + >=media-libs/sdl-image-1.2.2 + media-libs/sdl-mixer" + +pkg_setup() { + if ! built_with_use media-libs/sdl-mixer mikmod ; then + eerror "Tomatoes doesn't work properly if sdl-mixer" + eerror "is built with USE=-mikmod" + die "Please emerge sdl-mixer with USE=mikmod" + fi + games_pkg_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + mv ../tomatoes-1.5/* . || die "mv failed" + mv icon.png ${PN}.png + + sed -i \ + -e '/^CC/d' \ + -e '/^MARCH/d' \ + -e "/^CFLAGS/s/=.*$/= ${CFLAGS} \$(SDL_FLAGS)/" \ + -e "/^LDFLAGS/s/-s$/${LDFLAGS}/" \ + -e "/^MPKDIR = /s:./:${GAMES_DATADIR}/${PN}/:" \ + -e "/^MUSICDIR = /s:./music/:${GAMES_DATADIR}/${PN}/music/:" \ + -e "/^HISCOREDIR = /s:./:${GAMES_STATEDIR}/${PN}/:" \ + -e "/^CONFIGDIR = /s:./:${GAMES_SYSCONFDIR}/${PN}/:" \ + -e "/^OVERRIDEDIR = /s:./data/:${GAMES_DATADIR}/${PN}/data/:" \ + makefile \ + || die "sed failed" + + epatch "${FILESDIR}"/${P}-c_str.patch +} + +src_install() { + dogamesbin tomatoes || die "dogamesbin failed" + dodir "${GAMES_DATADIR}/${PN}" "${GAMES_STATEDIR}/${PN}" + dodoc README README-src + + cp -r tomatoes.mpk music/ "${D}${GAMES_DATADIR}/${PN}" \ + || die "failed to copy game data" + + doicon ${PN}.png + make_desktop_entry tomatoes "I Have No Tomatoes" + + touch "${D}${GAMES_STATEDIR}/${PN}/hiscore.lst" || die "touch failed" + fperms 660 "${GAMES_STATEDIR}/${PN}/hiscore.lst" + + insinto "${GAMES_SYSCONFDIR}/${PN}/" + insopts -m0640 + doins config.cfg || die "failed to copy game config" + + prepgamesdirs +} |