diff options
-rw-r--r-- | games-simulation/simutrans/ChangeLog | 8 | ||||
-rw-r--r-- | games-simulation/simutrans/files/simutrans-0.102.2.2-zlib.patch | 69 | ||||
-rw-r--r-- | games-simulation/simutrans/simutrans-0.102.2.2.ebuild | 7 |
3 files changed, 79 insertions, 5 deletions
diff --git a/games-simulation/simutrans/ChangeLog b/games-simulation/simutrans/ChangeLog index 475ef8fb59f7..6d6a7f918e37 100644 --- a/games-simulation/simutrans/ChangeLog +++ b/games-simulation/simutrans/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-simulation/simutrans -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-simulation/simutrans/ChangeLog,v 1.27 2011/05/09 15:53:23 tupone Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-simulation/simutrans/ChangeLog,v 1.28 2012/03/23 20:14:06 tupone Exp $ + + 23 Mar 2012; Tupone Alfredo <tupone@gentoo.org> simutrans-0.102.2.2.ebuild, + +files/simutrans-0.102.2.2-zlib.patch: + Build with new zlib. Bug #408467 by Piotr Szymaniak 09 May 2011; Tupone Alfredo <tupone@gentoo.org> simutrans-0.102.2.2.ebuild, +files/simutrans-0.102.2.2-gcc46.patch: diff --git a/games-simulation/simutrans/files/simutrans-0.102.2.2-zlib.patch b/games-simulation/simutrans/files/simutrans-0.102.2.2-zlib.patch new file mode 100644 index 000000000000..966480232e58 --- /dev/null +++ b/games-simulation/simutrans/files/simutrans-0.102.2.2-zlib.patch @@ -0,0 +1,69 @@ +--- dataobj/loadsave.cc.old 2012-03-23 20:37:16.071335099 +0100 ++++ dataobj/loadsave.cc 2012-03-23 20:39:53.600282699 +0100 +@@ -82,7 +82,7 @@ + if(fp==NULL) { + return false; + } +- gzgets(fp, buf, 80); ++ gzgets((gzFile)fp, buf, 80); + } + saving = false; + +@@ -237,11 +237,11 @@ + } + if(is_zipped()) { + int err_no; +- const char *err_str = gzerror( fp, &err_no ); ++ const char *err_str = gzerror((gzFile)fp, &err_no ); + if(err_no!=Z_OK && err_no!=Z_STREAM_END) { + success = err_no==Z_ERRNO ? strerror(errno) : err_str; + } +- gzclose(fp); ++ gzclose((gzFile)fp); + } + else if( is_bzip2() ) { + if( saving ) { +@@ -280,7 +280,7 @@ + return bse!=BZ_OK; + } + else { +- return gzeof(fp) != 0; ++ return gzeof((gzFile)fp) != 0; + } + } + +@@ -288,7 +288,7 @@ + void loadsave_t::lsputc(int c) + { + if(is_zipped()) { +- gzputc(fp, c); ++ gzputc((gzFile)fp, c); + } + else if(is_bzip2()) { + uint8 ch = c; +@@ -309,14 +309,14 @@ + return bse==BZ_OK ? c[0] : -1; + } + else { +- return gzgetc(fp); ++ return gzgetc((gzFile)fp); + } + } + + long loadsave_t::write(const void *buf, size_t len) + { + if(is_zipped()) { +- return gzwrite(fp, const_cast<void *>(buf), len); ++ return gzwrite((gzFile)fp, const_cast<void *>(buf), len); + } + else if(is_bzip2()) { + BZ2_bzWrite( &bse, bzfp, const_cast<void *>(buf), len); +@@ -338,7 +338,7 @@ + return (long)len&~(bse-BZ_OK); + } + else { +- return gzread(fp, buf, len); ++ return gzread((gzFile)fp, buf, len); + } + } + diff --git a/games-simulation/simutrans/simutrans-0.102.2.2.ebuild b/games-simulation/simutrans/simutrans-0.102.2.2.ebuild index 47b574ea3243..26458a2286a5 100644 --- a/games-simulation/simutrans/simutrans-0.102.2.2.ebuild +++ b/games-simulation/simutrans/simutrans-0.102.2.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-simulation/simutrans/simutrans-0.102.2.2.ebuild,v 1.4 2011/05/09 15:53:23 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-simulation/simutrans/simutrans-0.102.2.2.ebuild,v 1.5 2012/03/23 20:14:06 tupone Exp $ EAPI=2 inherit flag-o-matic eutils games @@ -52,7 +52,8 @@ FLAGS=-DSTEPS16" > config.default \ || die "sed failed" rm -f simutrans/simutrans - epatch "${FILESDIR}"/${P}-gcc46.patch + epatch "${FILESDIR}"/${P}-gcc46.patch \ + "${FILESDIR}"/${P}-zlib.patch } src_install() { |