1 # $Id: PKGBUILD 57484 2011-10-28 15:16:39Z spupykin $
2 # Based On: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: robb_force <robb_force@holybuffalo.net>
4 # Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
5 # Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
10 if [ ${_patchlevel} = "0" ]; then
13 _ver="${_basever}.u${_patchlevel}"
16 pkgname=sdlmame-wout-gconf
20 pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support. WITHOUT GCONF and GTK"
21 url="http://mamedev.org/"
22 license=('custom:MAME License')
23 arch=('i686' 'x86_64')
26 depends=('sdl>=1.2.11' 'libxinerama' 'sdl_ttf')
27 makedepends=('unzip' 'nasm' 'mesa')
28 DLAGENTS=('http::/usr/bin/wget -U "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.2) Gecko/20090804 Shiretoko/3.5.2" -c -t 3 --waitretry=3 -O %o %u')
29 install="${_pkgname}".install
31 for i in `seq 1 "${_patchlevel}"`; do
32 _patches=""${_patches}" sdlmame-"${_basever/./}"u"${i}"_diff.zip::http://mamedev.org/updates/"${_basever/./}"u"${i}"_diff.zip"
35 source=("mame"${_basever/./}"s.zip::http://mamedev.org/downloader.php?file=releases/mame"${_basever/./}"s.zip"
39 sdlmame-wout-gconf-v2.patch)
40 md5sums=('7440076e60cd5d61ea33df17fc00719a'
41 '3119ccfa1e970eba4467df31208adaf0'
42 '420b61240bf5ae11615ba7c6100ee00d'
43 'f01001d40417f8f0d3963dae01b04200'
44 '5b54e7357a9133a38f3021f610354530'
45 '5bb7dbbb8e37b151dce8f4824a95ed12'
46 'fd2b7811b53a61028daff87cdfd775eb'
47 '2425f1d27514c16b1044177b4374d9ec'
48 '006609c0896cb3c2d65d501123e277be'
49 'e17515824b113725c573d91710337f7a')
54 if [ $NOEXTRACT -eq 0 ]; then
56 find . -type f -not -name \*.png | xargs perl -pi -e 's/\r\n?/\n/g'
57 for i in `seq 1 "${_patchlevel}"`; do
59 patch -p0 -E <"${_basever/./}"u"$i".diff
61 sed -i 's/-Werror//' makefile
62 sed -i 's/LDFLAGS = -Wl,--warn-common/LDFLAGS = -Wl,--warn-common -Wl,-zmuldefs/' makefile
65 msg "Patch disable GCONF and GTK dependencies"
66 patch -p0 < ../sdlmame-wout-gconf-v2.patch
69 # Modify the make options based on the user's architecture
70 if [ "${CARCH}" == "x86_64" ]; then
71 echo "Compiling for AMD64..."
72 make ${MAKEFLAGS} AMD64=1 PTR64=1 NO_DEBUGGER=1
73 make ${MAKEFLAGS} tools AMD64=1 PTR64=1 NO_DEBUGGER=1
74 elif [ "${CARCH}" == "i686" ]; then
75 make ${MAKEFLAGS} I686=1 NO_DEBUGGER=1
76 make ${MAKEFLAGS} tools I686=1 NO_DEBUGGER=1
78 echo "Compiling for i386..."
79 make ${MAKEFLAGS} PM=1 NO_DEBUGGER=1
80 make ${MAKEFLAGS} tools PM=1 NO_DEBUGGER=1
86 # Install the sdlmame script
87 install -Dm755 "${srcdir}"/"${_pkgname}".sh "${pkgdir}"/usr/bin/"${_pkgname}"
89 # Install the applications and the UI font in /usr/share
90 [ "${CARCH}" = "i386" ] && install -Dm755 mame "${pkgdir}"/usr/share/"${_pkgname}"/"${_pkgname}"
91 [ "${CARCH}" = "i686" ] && install -Dm755 mame "${pkgdir}"/usr/share/"${_pkgname}"/"${_pkgname}"
92 [ "${CARCH}" = "x86_64" ] && install -Dm755 mame64 "${pkgdir}"/usr/share/"${_pkgname}"/"${_pkgname}"
94 install -Dm755 chdman "${pkgdir}"/usr/share/"${_pkgname}"/chdman
95 install -Dm755 jedutil "${pkgdir}"/usr/share/"${_pkgname}"/jedutil
96 install -Dm755 regrep "${pkgdir}"/usr/share/"${_pkgname}"/regrep
97 install -Dm755 romcmp "${pkgdir}"/usr/share/"${_pkgname}"/romcmp
98 install -Dm755 testkeys "${pkgdir}"/usr/share/"${_pkgname}"/testkeys
99 install -Dm755 src2html "${pkgdir}"/usr/share/"${_pkgname}"/src2html
100 install -Dm755 srcclean "${pkgdir}"/usr/share/"${_pkgname}"/srcclean
101 install -Dm755 ldverify "${pkgdir}"/usr/share/"${_pkgname}"/ldverify
102 install -Dm755 ldresample "${pkgdir}"/usr/share/"${_pkgname}"/ldresample
104 # Install the extra bits
105 install -d "${pkgdir}"/usr/share/"${_pkgname}"/{artwork,ctrlr,keymaps,shader}
106 install -d "${pkgdir}"/usr/share/man/man1
107 install -Dm644 src/osd/sdl/shader/glsl*.*h "${pkgdir}"/usr/share/"${_pkgname}"/shader/
108 install -Dm644 src/osd/sdl/man/* "${pkgdir}"/usr/share/man/man1/
110 install -Dm644 "${srcdir}"/artwork/* "${pkgdir}"/usr/share/"${_pkgname}"/artwork/
111 install -Dm644 "${srcdir}"/ctrlr/* "${pkgdir}"/usr/share/"${_pkgname}"/ctrlr/
112 install -Dm644 src/osd/sdl/keymaps/* "${pkgdir}"/usr/share/"${_pkgname}"/keymaps/
114 # Include the license
115 install -Dm644 docs/license.txt "${pkgdir}"/usr/share/licenses/"${_pkgname}"/license.txt
117 find "${pkgdir}" -type f -exec strip {} \;