blob: d153abe68a74d0fab7299d698e7c21c55222b2f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: farseerfc <farseerfc@archlinuxcn.org>
# Contributor: refujee <gmail.com: refujee>
# Contributor: sausageandeggs <archlinux.us: sausageandeggs>
# Maintainer: Jesse Jaara <gmail.com: jesse.jaara>
# Set to 'y' if you want native optimizations (-march=native)
# based on your hardware. Enabled automatically if -march
# is set to native in makepkg.conf.
NATIVE_OPTIMIZATIONS=n
pkgname=powder-toy
#pkgver=${_sver}.${_mver}
pkgver=92.5
_sver=${pkgver/.*/}
_mver=${pkgver/*./}
_build=336
pkgrel=2
pkgdesc="Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat!"
arch=(i686 x86_64)
depends=('sdl' 'lua52' 'fftw' 'bzip2' 'zlib')
makedepends=('python2' 'scons')
url="http://powdertoy.co.uk/"
license=('GPL3')
source=(http://github.com/ThePowderToy/The-Powder-Toy/archive/v${pkgver}.tar.gz
${pkgname}.desktop ${pkgname}.png)
prepare() {
cd "${srcdir}/The-Powder-Toy-${pkgver}"
#Disable the updates. I cant get the buildsystem to not compile a beta version.
#Also I do not know the logic behind the generated snapshotids.
sed 's|//#define I|#define I|' -i src/Config.h
}
build() {
unset _xarch _ssever _native
cd "${srcdir}/The-Powder-Toy-${pkgver}"
if $(grep -q 'pni' -i /proc/cpuinfo); then
_ssever="sse3"
elif $(grep -q sse2 -i /proc/cpuinfo); then
_ssever="sse2"
elif $(grep -q sse -i /proc/cpuinfo); then
_ssever="sse"
else
_ssever="no-sse"
fi
# if [ NATIVE_OPTIMIZATIONS == "y" ] || $(echo ${CXXFLAGS} | grep -q -- "-march=native"); then
# _native="--native"
# fi
if [ "${CARCH}" == "x86_64" ]; then
_xarch="--64bit"
fi
msg2 "building powder with options with following extra flags ${_xarch} --${_ssever} ${_native}"
scons --lin ${_xarch} --release --${_ssever} ${_native} --save-version=${_sver} \
--minor-version=${_mver} --build-number=${_build} ${MAKEFLAGS} \
--lua52
mv build/{powder*,binary}
}
package() {
install -Dm 755 "${srcdir}/The-Powder-Toy-${pkgver}/build/binary" "${pkgdir}/usr/bin/powder-toy"
install -Dm 644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -Dm 644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}
md5sums=('7c4dc2a62cda2b652f135d52894299aa'
'8901d334c53c04738cbd3518c80fa37c'
'bb40bf9c2fa3982e2872b5d32de3b006')
|