From c3bd1a0db0d83475bc29d497ac36f9cc1de88482 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 22 May 2013 01:46:21 +0000 Subject: [PATCH 1/2] added community/simutrans --- community/simutrans/PKGBUILD | 61 ++++++++++++++++++++ community/simutrans/config.patch | 52 +++++++++++++++++ community/simutrans/path-for-game-data.patch | 18 ++++++ community/simutrans/settings-folder.patch | 12 ++++ community/simutrans/simutrans.desktop | 9 +++ 5 files changed, 152 insertions(+) create mode 100644 community/simutrans/PKGBUILD create mode 100644 community/simutrans/config.patch create mode 100644 community/simutrans/path-for-game-data.patch create mode 100644 community/simutrans/settings-folder.patch create mode 100644 community/simutrans/simutrans.desktop diff --git a/community/simutrans/PKGBUILD b/community/simutrans/PKGBUILD new file mode 100644 index 000000000..eb70db30a --- /dev/null +++ b/community/simutrans/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 91302 2013-05-20 23:13:17Z bgyorgy $ +# Maintainer: Balló György +# Contributor: Anton Bazhenov +# Contributor: Jaroslav Lichtblau +# Contributor: Gilles Gagniard +# Contributor: JD Steffen + +# ALARM: Kevin Mihelich +# - get rid of a bad gcc flag in Makefile + +pkgname=simutrans +pkgver=112.3 +_pkgver=112-3 +pkgrel=1 +pkgdesc="An open source transportation simulation game" +arch=('i686' 'x86_64') +url="http://simutrans.com/" +license=('PerlArtistic') +depends=('gcc-libs' 'zlib' 'sdl_mixer' 'bzip2' 'simutrans-pak64') +makedepends=('imagemagick') +optdepends=('timidity++: play MIDI music') +source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-$_pkgver.zip + http://downloads.sourceforge.net/$pkgname/simulinux-$_pkgver.zip + settings-folder.patch + path-for-game-data.patch + config.patch + simutrans.desktop) +md5sums=('4963f0ad0da5f622f67b7c1fb888a264' + '8e09f450173110fec097497c7198e50c' + 'c87d9a9910bc371df5d50f7f1ec298bb' + '4648680290b44775b9c47d3758d3bd6c' + 'd11bc8ee33a34e33341f6ccd90a44dba' + 'f41f7a08ad517ef2b60412859eb49963') + +build() { + cd "$srcdir" + + cp config.template config.default + patch -Np0 -i "$srcdir/settings-folder.patch" + patch -Np1 -i "$srcdir/path-for-game-data.patch" + patch -Np0 -i "$srcdir/config.patch" + convert simutrans.ico -alpha on simutrans.png + sed -i 's/-minline-all-stringops/-O3/' Makefile + + make +} + +package() { + cd "$srcdir" + + #binary + install -Dm755 build/default/sim "$pkgdir/usr/bin/simutrans" + + #data + mkdir -p "$pkgdir/usr/share/games/$pkgname" + cp -r "$pkgname"/{config,font,music,script,skin,text} "$pkgdir/usr/share/games/$pkgname" + + #desktop file and icon + install -Dm644 simutrans.png "$pkgdir/usr/share/pixmaps/simutrans.png" + install -Dm644 simutrans.desktop "$pkgdir/usr/share/applications/simutrans.desktop" +} diff --git a/community/simutrans/config.patch b/community/simutrans/config.patch new file mode 100644 index 000000000..ea4657a7a --- /dev/null +++ b/community/simutrans/config.patch @@ -0,0 +1,52 @@ +--- config.default.orig 2011-11-10 21:48:01.000000000 +0100 ++++ config.default 2011-11-10 21:51:58.383221979 +0100 +@@ -6,23 +6,23 @@ + #BACKEND = allegro + #BACKEND = gdi + #BACKEND = sdl +-#BACKEND = mixer_sdl ++BACKEND = mixer_sdl + #BACKEND = posix + + #COLOUR_DEPTH = 0 +-#COLOUR_DEPTH = 16 ++COLOUR_DEPTH = 16 + + #OSTYPE = amiga + #OSTYPE = beos + #OSTYPE = cygwin + #OSTYPE = freebsd + #OSTYPE = haiku +-#OSTYPE = linux ++OSTYPE = linux + #OSTYPE = mingw + #OSTYPE = mac + + #DEBUG = 3 # Level 1-3, higher number means more debug-friendly, see Makefile +-#OPTIMISE = 1 # Add umpteen optimisation flags ++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 + +-#VERBOSE = 1 ++VERBOSE = 1 + + # 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: + # diff --git a/community/simutrans/path-for-game-data.patch b/community/simutrans/path-for-game-data.patch new file mode 100644 index 000000000..ac2b41407 --- /dev/null +++ b/community/simutrans/path-for-game-data.patch @@ -0,0 +1,18 @@ +look in /usr/share/games/simutrans for game data + +@DPATCH@ + +--- simutrans.orig/simmain.cc ++++ simutrans/simmain.cc +@@ -437,8 +437,9 @@ + strcat( umgebung_t::program_dir, path_sep ); + } + else { +- strcpy( umgebung_t::program_dir, argv[0] ); +- *(strrchr( umgebung_t::program_dir, path_sep[0] )+1) = 0; ++ // strcpy( umgebung_t::program_dir, argv[0] ); ++ // *(strrchr( umgebung_t::program_dir, path_sep[0] )+1) = 0; ++ strcpy(umgebung_t::program_dir, "/usr/share/games/simutrans/"); + + chdir( umgebung_t::program_dir ); + } diff --git a/community/simutrans/settings-folder.patch b/community/simutrans/settings-folder.patch new file mode 100644 index 000000000..166795803 --- /dev/null +++ b/community/simutrans/settings-folder.patch @@ -0,0 +1,12 @@ +--- simsys.cc.orig 2011-10-28 20:32:25.000000000 +0200 ++++ simsys.cc 2011-11-10 23:09:10.380031846 +0100 +@@ -47,7 +47,7 @@ + #elif defined __APPLE__ + sprintf(buffer, "%s/Library/Simutrans", getenv("HOME")); + #else +- sprintf(buffer, "%s/simutrans", getenv("HOME")); ++ sprintf(buffer, "%s/.simutrans", getenv("HOME")); + #endif + + dr_mkdir(buffer); + diff --git a/community/simutrans/simutrans.desktop b/community/simutrans/simutrans.desktop new file mode 100644 index 000000000..e8d8660c8 --- /dev/null +++ b/community/simutrans/simutrans.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Simutrans +Comment=Transportation simulator +Exec=simutrans +Icon=simutrans +Terminal=false +Type=Application +Categories=Game;Simulation; + From dc4fb607c48cbd12322de54ca4c9959da8cbf004 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 22 May 2013 01:56:48 +0000 Subject: [PATCH 2/2] added extra/calligra --- extra/calligra/PKGBUILD | 11 +++++++++-- extra/calligra/arm.patch | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 extra/calligra/arm.patch diff --git a/extra/calligra/PKGBUILD b/extra/calligra/PKGBUILD index c8a7c93de..2c608d73c 100644 --- a/extra/calligra/PKGBUILD +++ b/extra/calligra/PKGBUILD @@ -4,6 +4,7 @@ # ALARM: Kevin Mihelich # - removed makedepend on vc - not for ARM +# - patch to fix qreal ARMisms pkgbase=calligra pkgname=('calligra-filters' @@ -30,10 +31,16 @@ makedepends=('cmake' 'automoc4' 'boost' 'kdepimlibs' 'eigen2' 'kdeedu-marble' 'libwps' 'gsl' 'glew' 'fftw' 'opengtl' 'poppler-qt' 'libkdcraw' 'openjpeg' 'kdegraphics-okular' 'pstoedit') groups=('calligra') -source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2") -md5sums=('90d6bb619191abbcc94094379d47e225') +source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2" + "arm.patch") +md5sums=('90d6bb619191abbcc94094379d47e225' + '51f443435a0cf022bec3db041b4047bb') build() { + cd $pkgbase-$pkgver + patch -p1 -i "$srcdir"/arm.patch + cd .. + mkdir build cd build cmake ../${pkgbase}-${pkgver} \ diff --git a/extra/calligra/arm.patch b/extra/calligra/arm.patch new file mode 100644 index 000000000..0164f2002 --- /dev/null +++ b/extra/calligra/arm.patch @@ -0,0 +1,36 @@ +diff -urN a/krita/ui/kis_image_view_converter.cpp b/krita/ui/kis_image_view_converter.cpp +--- a/krita/ui/kis_image_view_converter.cpp 2013-04-08 03:23:17.000000000 -0500 ++++ b/krita/ui/kis_image_view_converter.cpp 2013-05-21 17:20:34.227367776 -0500 +@@ -40,7 +40,7 @@ + + // remember here; document is postscript points; view is krita pixels. + +-void KisImageViewConverter::zoom(qreal *zoomX, qreal *zoomY) const ++void KisImageViewConverter::zoom(double *zoomX, double *zoomY) const + { + Q_ASSERT(zoomX); + Q_ASSERT(zoomY); +diff -urN a/krita/ui/kis_image_view_converter.h b/krita/ui/kis_image_view_converter.h +--- a/krita/ui/kis_image_view_converter.h 2013-04-08 03:23:17.000000000 -0500 ++++ b/krita/ui/kis_image_view_converter.h 2013-05-21 17:19:52.171064761 -0500 +@@ -52,7 +52,7 @@ + using KoViewConverter::viewToDocument; + + /// reimplemented from superclass +- void zoom(qreal *zoomX, qreal *zoomY) const; ++ void zoom(double *zoomX, double *zoomY) const; + + qreal documentToViewX(qreal documentX) const; + qreal documentToViewY(qreal documentY) const; +diff -urN a/krita/ui/tests/kis_zoom_and_pan_test.cpp b/krita/ui/tests/kis_zoom_and_pan_test.cpp +--- a/krita/ui/tests/kis_zoom_and_pan_test.cpp 2013-04-08 03:24:15.000000000 -0500 ++++ b/krita/ui/tests/kis_zoom_and_pan_test.cpp 2013-05-21 19:09:55.408078960 -0500 +@@ -220,7 +220,7 @@ + qreal oldPreferredCenterFractionY = 1.0 * oldPreferredCenter.y() / oldDocumentSize.height(); + + qreal roundingTolerance = +- qMax(1.0, qMax(oldPreferredCenterFractionX, oldPreferredCenterFractionY) / k); ++ qMax((float)1.0, qMax(oldPreferredCenterFractionX, oldPreferredCenterFractionY) / k); + + /** + * In the computation of the offset two roundings happen: