Adding wesnoth

This commit is contained in:
abveritas 2010-08-19 02:37:44 +00:00
parent 87d47c30cf
commit c5d1fc42b4
3 changed files with 62 additions and 0 deletions

33
wesnoth/PKGBUILD Normal file
View File

@ -0,0 +1,33 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=wesnoth
pkgver=1.8.4
pkgrel=1
pkgdesc="A turn-based strategy game on a fantasy world"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.wesnoth.org/"
depends=('sdl_ttf' 'sdl_net' 'sdl_mixer' 'sdl_image' 'libvorbis' 'fribidi' 'freetype2' 'gcc-libs' 'pango' 'lua')
makedepends=('boost')
install=wesnoth.install
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
wesnoth-libpng-1.4.0.patch)
md5sums=('2dce83f835ecce1d505ea60e46b7356f'
'ca7412ffc4682ef55ddf82d56b0e2f08')
build() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np1 -i ../wesnoth-libpng-1.4.0.patch || return 1
./autogen.sh || return 1
./configure --prefix=/usr --localstatedir=/var --enable-tools --enable-editor --enable-server
make || return 1
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
}

View File

@ -0,0 +1,14 @@
diff -Nur wesnoth-1.8.orig/src/tools/exploder_utils.cpp wesnoth-1.8/src/tools/exploder_utils.cpp
--- wesnoth-1.8.orig/src/tools/exploder_utils.cpp 2010-01-01 15:16:49.000000000 +0200
+++ wesnoth-1.8/src/tools/exploder_utils.cpp 2010-04-08 17:38:03.066201123 +0300
@@ -174,8 +174,8 @@
//TODO: review whether providing NULL error handlers is something
//sensible
png_struct* png_ptr = png_create_write_struct
- (PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(png_voidp_NULL),
- png_error_ptr_NULL, png_error_ptr_NULL);
+ (PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(NULL),
+ NULL, NULL);
if(!png_ptr)
throw exploder_failure("Unable to initialize the png write structure");

15
wesnoth/wesnoth.install Normal file
View File

@ -0,0 +1,15 @@
# arg 1: the new package version
post_install() {
cat << EOF
Note:
==> If you experience sound problems try setting your SDL_AUDIODRIVER environment variable to "dma"
==> eg. export SDL_AUDIODRIVER="dma" ; wesnoth
==> If "dma" doesn't work,other options are: dsp,alsa,artsc,esd,nas try to find the right output.
EOF
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}