community/simutrans to 120.0.1-1

This commit is contained in:
Kevin Mihelich 2014-11-21 01:44:51 +00:00
parent fa823a987c
commit c273841dfd
3 changed files with 63 additions and 34 deletions

View file

@ -9,36 +9,45 @@
# - get rid of a bad gcc flag in Makefile # - get rid of a bad gcc flag in Makefile
pkgname=simutrans pkgname=simutrans
pkgver=120.0 pkgver=120.0.1
_pkgver=120-0 _pkgver=120-0-1
pkgrel=1 pkgrel=1
pkgdesc="An open source transportation simulation game" pkgdesc="An open source transportation simulation game"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="http://simutrans.com/" url="http://simutrans.com/"
license=('PerlArtistic') license=('PerlArtistic')
depends=('gcc-libs' 'zlib' 'sdl_mixer' 'bzip2' 'simutrans-pak64') depends=('gcc-libs' 'zlib' 'sdl_mixer' 'bzip2' 'simutrans-pak64')
makedepends=('imagemagick') makedepends=('imagemagick' 'dos2unix')
optdepends=('timidity++: play MIDI music') optdepends=('timidity++: play MIDI music')
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-$_pkgver.zip source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-$_pkgver.zip
http://downloads.sourceforge.net/$pkgname/simulinux-$_pkgver.zip no-optimise.patch
settings-folder.patch settings-folder.patch
path-for-game-data.patch path-for-game-data.patch
config.patch config.patch
simutrans.desktop) simutrans.desktop)
md5sums=('42d804e3a6ac78460584903ce9b4eeb1' md5sums=('40372b6417f235740b14a6bb7b389a78'
'fdc58aee51a79d2a67219acff0cd5b12' '34b0472b08f3d9f38e289ba1639ef232'
'c87d9a9910bc371df5d50f7f1ec298bb' 'c87d9a9910bc371df5d50f7f1ec298bb'
'e716340d372af264ca05510facfe5d2c' 'e716340d372af264ca05510facfe5d2c'
'4a2d707ad2fc0abf42e8d75c0a3dcc8b' 'c2f4e494168e235380373974c91a0803'
'f41f7a08ad517ef2b60412859eb49963') 'f41f7a08ad517ef2b60412859eb49963')
prepare() { prepare() {
cd "$srcdir" cd "$srcdir"
# Some files are distributed in DOS format
find . -type f -exec dos2unix -q '{}' \;
# Don't overwrite default optimization flags
patch -Np1 -i no-optimise.patch
# Adjust paths
patch -Np0 -i settings-folder.patch
patch -Np1 -i path-for-game-data.patch
# Configure the build process
cp config.template config.default cp config.template config.default
patch -Np0 -i "$srcdir/settings-folder.patch" patch -Np0 -i config.patch
patch -Np1 -i "$srcdir/path-for-game-data.patch"
patch -Np0 -i "$srcdir/config.patch"
sed -i 's/-minline-all-stringops/-O3/' Makefile sed -i 's/-minline-all-stringops/-O3/' Makefile
} }
@ -57,7 +66,7 @@ package() {
#data #data
mkdir -p "$pkgdir/usr/share/games/$pkgname" mkdir -p "$pkgdir/usr/share/games/$pkgname"
cp -r "$pkgname"/{config,font,music,script,text,themes} "$pkgdir/usr/share/games/$pkgname" cp -r "$pkgname"/{config,font,music,text,themes} "$pkgdir/usr/share/games/$pkgname"
#desktop file and icon #desktop file and icon
install -Dm644 simutrans.png "$pkgdir/usr/share/pixmaps/simutrans.png" install -Dm644 simutrans.png "$pkgdir/usr/share/pixmaps/simutrans.png"

View file

@ -1,6 +1,6 @@
--- config.default.orig 2011-11-10 21:48:01.000000000 +0100 --- config.default.orig 2011-11-10 21:48:01.000000000 +0100
+++ config.default 2011-11-10 21:51:58.383221979 +0100 +++ config.default 2011-11-10 21:51:58.383221979 +0100
@@ -6,23 +6,23 @@ @@ -6,18 +6,18 @@
#BACKEND = opengl #BACKEND = opengl
#BACKEND = sdl #BACKEND = sdl
#BACKEND = sdl2 #BACKEND = sdl2
@ -22,18 +22,8 @@
#OSTYPE = mingw #OSTYPE = mingw
#OSTYPE = mac #OSTYPE = mac
#DEBUG = 3 # Level 1-3, higher number means more debug-friendly, see Makefile @@ -37,6 +37,6 @@
-#OPTIMISE = 1 # Add umpteen optimisation flags #SDL_CONFIG = sdl-config
+OPTIMISE = 1 # Add umpteen optimisation flags
#PROFILE = 1 # Enable profiling
#PROFILE = 2 # Enable profiling with optimisation flags, can be used with `OPTIMISE = 1'
@@ -34,9 +34,9 @@
# Define these as empty strings, if you don't have the respective config program
#ALLEGRO_CONFIG = allegro-config
#PNG_CONFIG = pkg-config libpng
-#SDL_CONFIG = sdl-config
+SDL_CONFIG = sdl-config
#SDL2_CONFIG = sdl2-config #SDL2_CONFIG = sdl2-config
-#VERBOSE = 1 -#VERBOSE = 1
@ -41,13 +31,3 @@
# The following useful conditional compilation flags exist # The following useful conditional compilation flags exist
# #
@@ -65,6 +65,9 @@
#
# In order to use the flags, add a line like this: (-Dxxx)
# FLAGS = -DUSE_C
+ifeq ($(shell uname -m),x86_64)
+ FLAGS += -DUSE_C
+endif
# Output directories:
#

View file

@ -0,0 +1,40 @@
diff -Naur simutrans.orig/Makefile simutrans/Makefile
--- simutrans.orig/Makefile 2014-11-20 17:50:34.948410000 +0100
+++ simutrans/Makefile 2014-11-20 17:51:43.936577860 +0100
@@ -76,15 +76,6 @@
SDL_CONFIG ?= sdl-config
SDL2_CONFIG ?= sdl2-config
-ifneq ($(OPTIMISE),)
- CFLAGS += -O3
- ifeq ($(findstring $(OSTYPE), amiga haiku mac),)
- CFLAGS += -minline-all-stringops
- endif
-else
- CFLAGS += -O
-endif
-
ifdef DEBUG
ifeq ($(shell expr $(DEBUG) \>= 1), 1)
CFLAGS += -g -DDEBUG
diff -Naur simutrans.orig/makeobj/Makefile simutrans/makeobj/Makefile
--- simutrans.orig/makeobj/Makefile 2014-11-20 17:50:34.945077000 +0100
+++ simutrans/makeobj/Makefile 2014-11-20 17:51:42.553214510 +0100
@@ -42,17 +42,6 @@
CXXFLAGS += -DUSE_HW -DUSE_C
endif
-ifneq ($(OPTIMISE),)
- CFLAGS += -O3 -fno-schedule-insns
- CXXFLAGS += -O3 -fno-schedule-insns
- ifneq ($(OSTYPE),mac)
- CFLAGS += -minline-all-stringops
- endif
-else
- CFLAGS += -O
- CXXFLAGS += -O
-endif
-
ifdef DEBUG
ifeq ($(shell expr $(DEBUG) \>= 1), 1)
CFLAGS += -g -DDEBUG