1 # Contributor: robb_force <robb_force@holybuffalo.net>
2 # Maintainer: Anton Shestakov <engored*ya.ru>
11 pkgdesc='A port of the popular Multiple Emulator Super System using SDL.'
12 url='http://www.mess.org/'
13 license=('custom:MAME License')
14 arch=('i686' 'x86_64')
15 depends=('sdl>=1.2.11' 'sdl_ttf' 'libxinerama' 'gconf' 'zlib' 'expat' 'gtk2')
17 [ "$CARCH" = 'i686' ] && makedepends=('mesa' 'nasm')
18 optdepends=('ttf-liberation: recommended UI font')
20 for i in `seq 1 ${_patchlevel}`; do
21 _patches="${_patches} mess${_basever}u${i}_diff.zip::http://mess.redump.net/_media/downloads:mess${_basever}u${i}_diff.zip"
24 source=("mess${_basever}s.zip::http://mess.redump.net/_media/downloads:mess${_basever}s.zip"
25 sdlmess.sh ${_patches})
26 md5sums=('af4821f2575c7d8a241bc8e1243c3b20'
27 '141069e7019da5e33414dc8d4c421150'
28 '5dda3980fc97ded824c492f6ca7999bf'
29 'be8d654c794c6f7520cf342891b70652'
30 '6359e000db4c2b8af3d5f83e793edfdf'
31 '2a6270904717cc9491e98249bfeea4bc'
32 '130fcfe8fb3e72f88de11cef6cc75aff'
33 'd9f3d50f08177b24ff68004059cb334b')
34 install=sdlmess.install
39 find . -type f -not -name '*.png' -exec perl -pi -e 's/\r\n?/\n/g' '{}' \;
41 for i in `seq 1 ${_patchlevel}`; do
42 msg2 "Applying patch: mess${_basever}u${i}.diff"
43 patch --silent -p0 -E < mess${_basever}u${i}.diff
46 # Adjusting make options according to target architecture
47 if [ "$CARCH" == 'x86_64' ]; then
48 echo 'Compiling for AMD64...'
49 make TARGET=mess AMD64=1 PTR64=1 SUFFIX64='' NOWERROR=1 BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
50 elif [ "$CARCH" == 'i686' ]; then
51 echo 'Compiling for i686...'
52 make TARGET=mess I686=1 NOWERROR=1 BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
54 echo 'Compiling for i386...'
55 make TARGET=mess PM=1 NOWERROR=1 BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
62 # Installing the wrapper script
63 install -Dm755 "$srcdir/sdlmess.sh" "$pkgdir/usr/bin/sdlmess"
66 install -Dm755 mess "$pkgdir/usr/share/sdlmess/sdlmess"
68 # Installing extra bits
69 install -d "$pkgdir/usr/share/sdlmess/artwork"
70 install -m644 artwork/* "$pkgdir/usr/share/sdlmess/artwork/"
71 install -d "$pkgdir/usr/share/sdlmess/hash"
72 install -m644 hash/* "$pkgdir/usr/share/sdlmess/hash/"
75 install -Dm644 docs/license.txt "$pkgdir/usr/share/licenses/custom/sdlmess/license.txt"