1 # Maintainer: Robert McCathie <archaur at rmcc dot com dot au>
3 # Contributor (cal3d): Hussam Al-Tayeb <ht990332@gmail.com>
5 # Contributor (libvorbis): Tobias Kieslich <tobias@archlinux.org>
6 # Contributor (libvorbis): dorphell <dorphell@archlinux.org>
7 # Contributor (libvorbis): John Proctor <jproctor@prium.net>
9 # Contributer (openal): Allan McRae <allan@archlinux.org>
10 # Contributer (openal): Jason Chu <jchu@xentac.net>
12 # Contributor (mesa): Jan de Groot <jgc@archlinux.org>
13 # Contributor (mesa): Andreas Radke <andyrtr@archlinux.org>
15 # Contributor (glew): Stéphane Gaudreault <stephane@archlinux.org>
16 # Contributor (glew): SleepyDog
19 pkgname=eternallands-staticlibs
22 pkgdesc="Static (.a) versions of libcal3d, libvorbis, libopenal, libGLU and libGLEW. Used for building an Eternal Lands (MMORPG) static binary."
23 license=('GPL2' 'custom' 'LGPL' 'BSD' 'MIT')
24 arch=('i686' 'x86_64')
25 url="http://www.eternal-lands.com/forum/index.php?showtopic=55516"
27 source=("http://download.gna.org/cal3d/sources/cal3d-0.11.0.tar.gz" 'cal3d-gcc43.diff' # cal3d sources
28 "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz" # libvorbis sources
29 "http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.bz2" # openal sources
30 "ftp://ftp.freedesktop.org/pub/mesa/7.10.2/MesaLib-7.10.2.tar.bz2" 'gnome-shell-shader-fix.patch' 'nouveau-fix-header.patch' # libglu (mesa) sources
31 "http://downloads.sourceforge.net/glew/glew-1.6.0.tgz" # glew sources
34 md5sums=('82ad09c1c28e73bc9596aec47237bfba' # cal3d source
35 'f290fb54f844e044ae80165f083cf58f' # cal3d patch - cal3d-gcc43.diff
36 'c870b9bd5858a0ecb5275c14486d9554' # libvorbis source
37 '58b7d2809790c70681b825644c5f3614' # openal source
38 'f5de82852f1243f42cc004039e10b771' # libglu (mesa) source
39 '3ec78f340f9387abd7a37b195e764cbf' # libglu (mesa) patch - gnome-shell-shader-fix.patch
40 '67c87b77cc2236b52a3b47dad3fbb5d4' # libglu (mesa) patch - nouveau-fix-header.patch
41 '7dfbb444b5a4e125bc5dba0aef403082' # glew source
44 depends=('gcc-libs' # cal3d depends
45 'libogg' # libvorbis depends
46 'glibc' # openal depends
47 'libxmu' 'libxi' 'mesa' # glew depends
50 makedepends=('patch' # cal3d makedepends
51 'alsa-lib' 'sdl' 'pkgconfig' 'cmake' 'libpulse' # openal makedepends
52 'glproto>=1.4.12' 'pkgconfig' 'libdrm>=2.4.23' 'libxxf86vm>=1.1.0' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.3.5' 'libxt>=1.0.8' 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2' 'libxml2' 'imake' # libglu (mesa) makedepends
60 cd "$srcdir/cal3d-0.11.0"
61 patch -p0 -i "$startdir/cal3d-gcc43.diff"
62 ./configure --prefix=/usr --enable-static
64 make DESTDIR="$srcdir/cal3d_installed" install
66 install -D -m644 "$srcdir/cal3d_installed/usr/lib/libcal3d.a" "$pkgdir/usr/lib/eternallands-static/libcal3d.a"
71 cd "$srcdir/libvorbis-1.3.2"
72 #-march=i686 optimizes too much, strip it out
73 CFLAGS=${CFLAGS/-march=$CARCH} ./configure --prefix=/usr
75 make DESTDIR="$srcdir/libvorbis_installed" install
77 install -D -m644 "$srcdir/libvorbis_installed/usr/lib/libvorbis.a" "$pkgdir/usr/lib/eternallands-static/libvorbis.a"
78 install -D -m644 "$srcdir/libvorbis_installed/usr/lib/libvorbisfile.a" "$pkgdir/usr/lib/eternallands-static/libvorbisfile.a"
83 cd "$srcdir/openal-soft-1.13/build"
84 cmake -D CMAKE_INSTALL_PREFIX=/usr -D LIBTYPE=STATIC -D CMAKE_BUILD_TYPE=Release ..
87 install -D -m644 "$srcdir/openal-soft-1.13/build/libopenal.a" "$pkgdir/usr/lib/eternallands-static/libopenal.a"
90 ## Start mesa (libGLU)
92 cd "$srcdir/Mesa-7.10.2"
94 #backport from master to fix gnome-shell shader
95 #https://bugs.freedesktop.org/show_bug.cgi?id=35714
96 patch -Np1 -i "${srcdir}/gnome-shell-shader-fix.patch"
97 patch -Np1 -i "${srcdir}/nouveau-fix-header.patch"
99 ./configure --prefix=/usr \
100 --enable-gallium-radeon \
101 --enable-gallium-r600 \
102 --enable-gallium-nouveau \
103 --enable-gallium-swrast \
107 --with-state-trackers=glx \
112 --disable-gallium-egl \
117 install -D -m644 "$srcdir/Mesa-7.10.2/lib/libGLU.a" "$pkgdir/usr/lib/eternallands-static/libGLU.a"
120 ## Start glew (libGLU)
121 cd "${srcdir}/glew-1.6.0"
122 sed -i 's|lib64|lib|' config/Makefile.linux
125 install -D -m644 "$srcdir/glew-1.6.0/lib/libGLEW.a" "$pkgdir/usr/lib/eternallands-static/libGLEW.a"