Permalink
Browse files

+ simutrans-9999: preliminary version

  • Loading branch information...
1 parent 65cec05 commit 265c107132954aa87efbe7e87f2ed43dbb80acec @l29ah committed Sep 25, 2012
@@ -0,0 +1 @@
+DIST Pak128.Britain-Ex-0.8.4.zip 58307447 SHA256 808955ab16f0680538f57ed65e68a1929978b4c2091d5e71868b1391121e0295 SHA512 c04fc086ff4a4b45754eab866305278c92f2ce610a1a03485269c6af7446caac4b5e2db1b41ea5e89494b464104cd4e32fb2f9f30e5ed15ef72a7fbc51c622e7 WHIRLPOOL b48220c28b72576b03bbfca8b2976091427c4f0295db152ded38b2478776454c491d34c4048db5373a05b2cd2a9b47cb0e6b28810e98d180b01089b6253f6080
@@ -0,0 +1,10 @@
+--- tpl/slist_tpl.h.old 2011-05-09 14:01:02.299244745 +0200
++++ tpl/slist_tpl.h 2011-05-09 14:01:39.973619614 +0200
+@@ -8,6 +8,7 @@
+ #ifndef tpl_slist_tpl_h
+ #define tpl_slist_tpl_h
+
++#include <cstddef>
+ #include <iterator>
+ #include <typeinfo>
+ #include "../dataobj/freelist.h"
@@ -0,0 +1,69 @@
+--- dataobj/loadsave.cc.old 2012-09-25 18:01:48.000000000 +0400
++++ dataobj/loadsave.cc 2012-09-25 18:13:36.000000000 +0400
+@@ -96,7 +96,7 @@
+ if(fd->gzfp==NULL) {
+ return false;
+ }
+- gzgets(fd->gzfp, buf, 80);
++ gzgets((gzFile)fd->gzfp, buf, 80);
+ }
+ saving = false;
+
+@@ -282,11 +282,11 @@
+ }
+ if( is_zipped() && fd->gzfp) {
+ int err_no;
+- const char *err_str = gzerror( fd->gzfp, &err_no );
++ const char *err_str = gzerror( (gzFile)fd->gzfp, &err_no );
+ if(err_no!=Z_OK && err_no!=Z_STREAM_END) {
+ success = err_no==Z_ERRNO ? strerror(errno) : err_str;
+ }
+- gzclose(fd->gzfp);
++ gzclose((gzFile)fd->gzfp);
+ fd->gzfp = NULL;
+ }
+ if( is_bzip2() && fd->fp ) {
+@@ -330,7 +330,7 @@
+ return fd->bse!=BZ_OK;
+ }
+ else {
+- return gzeof(fd->gzfp) != 0;
++ return gzeof((gzFile)fd->gzfp) != 0;
+ }
+ }
+
+@@ -338,7 +338,7 @@
+ void loadsave_t::lsputc(int c)
+ {
+ if(is_zipped()) {
+- gzputc(fd->gzfp, c);
++ gzputc((gzFile)fd->gzfp, c);
+ }
+ else if(is_bzip2()) {
+ uint8 ch = c;
+@@ -359,14 +359,14 @@
+ return fd->bse==BZ_OK ? c[0] : -1;
+ }
+ else {
+- return gzgetc(fd->gzfp);
++ return gzgetc((gzFile)fd->gzfp);
+ }
+ }
+
+ size_t loadsave_t::write(const void *buf, size_t len)
+ {
+ if(is_zipped()) {
+- return gzwrite(fd->gzfp, const_cast<void *>(buf), len);
++ return gzwrite((gzFile)fd->gzfp, const_cast<void *>(buf), len);
+ }
+ else if(is_bzip2()) {
+ BZ2_bzWrite( &fd->bse, fd->bzfp, const_cast<void *>(buf), len);
+@@ -387,7 +387,7 @@
+ return fd->bse==BZ_OK ? len : 0;
+ }
+ else {
+- return gzread(fd->gzfp, buf, len);
++ return gzread((gzFile)fd->gzfp, buf, len);
+ }
+ }
+
@@ -0,0 +1,73 @@
+# 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.5 2012/03/23 20:14:06 tupone Exp $
+
+EAPI=4
+inherit flag-o-matic eutils games git
+
+EGIT_REPO_URI='https://github.com/jamespetts/simutrans-experimental.git'
+EGIT_BRANCH=devel
+EGIT_COMMIT=devel
+
+DESCRIPTION="A free Transport Tycoon clone"
+HOMEPAGE="http://www.simutrans.com/"
+pak=Pak128.Britain-Ex-0.8.4
+SRC_URI="https://github.com/downloads/jamespetts/$PN-pak128.britain/$pak.zip"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/libsdl[audio,video]
+ sys-libs/zlib
+ media-libs/libpng
+ media-libs/sdl-mixer"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ git_src_unpack
+ cd "$S"
+ unpack $A
+}
+
+src_prepare() {
+ strip-flags # bug #293927
+ echo "BACKEND=mixer_sdl
+COLOUR_DEPTH=16
+OSTYPE=linux
+FLAGS=-DSTEPS16" > config.default \
+ || die "echo failed"
+
+ if use amd64; then
+ echo "FLAGS+=-DUSE_C" >> config.default
+ fi
+ # make it look in the install location for the data
+ sed -i \
+ -e "s:argv\[0\]:\"${GAMES_DATADIR}/${PN}/\":" \
+ simmain.cc \
+ || die "sed failed"
+
+ # Please don't override our CFLAGS, kthx
+ sed -i \
+ -e '/-O$/d' \
+ Makefile \
+ || die "sed failed"
+
+ rm -f simutrans/simutrans
+ epatch "${FILESDIR}"/${PN}-0.102.2.2-gcc46.patch \
+ "${FILESDIR}"/${P}-zlib.patch
+}
+
+src_install() {
+ newgamesbin build/default/simutrans-experimental ${PN} || die "dogamesbin failed"
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r $pak/* || die "doins failed"
+ dodoc documentation/* todo.txt
+ doicon simutrans.ico
+ make_desktop_entry simutrans Simutrans /usr/share/pixmaps/simutrans.ico
+ prepgamesdirs
+}

0 comments on commit 265c107

Please sign in to comment.