diff options
author | Jiachen Yang | 2015-08-10 19:27:59 +0900 |
---|---|---|
committer | Jiachen Yang | 2015-08-10 19:27:59 +0900 |
commit | 8ffc9e2317c9bdd3f43faba82145a4dd752ff4f3 (patch) | |
tree | e65b30dfdd44688593395f4de146ec134baebdeb | |
download | aur-8ffc9e2317c9bdd3f43faba82145a4dd752ff4f3.tar.gz |
takeover powder-toy
-rw-r--r-- | .SRCINFO | 26 | ||||
-rwxr-xr-x | PKGBUILD | 74 | ||||
-rw-r--r-- | lua-5.2-arch.patch | 18 | ||||
-rwxr-xr-x | powder-toy.desktop | 12 | ||||
-rw-r--r-- | powder-toy.png | bin | 0 -> 58276 bytes |
5 files changed, 130 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b00c8db2a149 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = powder-toy + pkgdesc = Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat! + pkgver = 90.2 + pkgrel = 4 + url = http://powdertoy.co.uk/ + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = python2 + makedepends = scons + depends = sdl + depends = lua52 + depends = fftw + depends = bzip2 + depends = zlib + source = http://github.com/FacialTurd/The-Powder-Toy/archive/v90.2.322.tar.gz + source = powder-toy.desktop + source = powder-toy.png + source = lua-5.2-arch.patch + md5sums = 0eec9ce14da705b1525e9c641460cc2c + md5sums = 8901d334c53c04738cbd3518c80fa37c + md5sums = bb40bf9c2fa3982e2872b5d32de3b006 + md5sums = 6d17fa966ac45f42e51eb574bcd08881 + +pkgname = powder-toy + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..50f8a4931aa3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,74 @@ +# 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 +_sver=90 +_mver=2 +_build=322 +pkgver=${_sver}.${_mver} +pkgrel=4 +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/FacialTurd/The-Powder-Toy/archive/v${_sver}.${_mver}.${_build}.tar.gz + ${pkgname}.desktop ${pkgname}.png lua-5.2-arch.patch) + +prepare() { + cd "${srcdir}/The-Powder-Toy-${_sver}.${_mver}.${_build}" + + #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 + + patch --binary -p0 -i ../lua-5.2-arch.patch +} + +build() { + unset _xarch _ssever _native + cd "${srcdir}/The-Powder-Toy-${_sver}.${_mver}.${_build}" + + if $(grep -q 'pni' -i /proc/cpuinfo); then + _ssever="sse3" + elif $(grep -q sse2 -i /proc/cpuinfo); then + _ssever="sse2" + else + _ssever="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} + + mv build/{powder*,binary} +} + +package() { + install -Dm 755 "${srcdir}/The-Powder-Toy-${_sver}.${_mver}.${_build}/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=('0eec9ce14da705b1525e9c641460cc2c' + '8901d334c53c04738cbd3518c80fa37c' + 'bb40bf9c2fa3982e2872b5d32de3b006' + '6d17fa966ac45f42e51eb574bcd08881') diff --git a/lua-5.2-arch.patch b/lua-5.2-arch.patch new file mode 100644 index 000000000000..130d927a9099 --- /dev/null +++ b/lua-5.2-arch.patch @@ -0,0 +1,18 @@ +--- SConscript 2014-08-31 04:33:31.000000000 +0300
++++ SConscript.arch 2014-08-31 23:31:50.732594365 +0300
+@@ -248,13 +248,8 @@
+
+ if not GetOption('nolua') and not GetOption('renderer'):
+ #Look for Lua
+- luaver = "lua5.1"
+- if not conf.CheckLib(['lua5.1', 'lua-5.1', 'lua51', 'lua']):
+- if conf.CheckLib(['lua5.2', 'lua-5.2', 'lua52']):
+- env.Append(CPPDEFINES=["LUA_COMPAT_ALL"])
+- luaver = "lua5.2"
+- elif platform != "Darwin" or not conf.CheckFramework("Lua"):
+- FatalError("lua5.1 development library not found or not installed")
++ env.Append(CPPDEFINES=["LUA_COMPAT_ALL"])
++ luaver = "lua52"
+ if platform == "Linux":
+ try:
+ env.ParseConfig("pkg-config --cflags {0}".format(luaver))
diff --git a/powder-toy.desktop b/powder-toy.desktop new file mode 100755 index 000000000000..e60f4303f3ac --- /dev/null +++ b/powder-toy.desktop @@ -0,0 +1,12 @@ + +[Desktop Entry] +Type=Application +Version=38.7 +Encoding=UTF-8 +Name=Powder Toy +Comment=A physics simulation game. +Exec=/usr/bin/powder-toy +Icon=powder-toy +Terminal=false +StartupNotify=false +Categories=Game; diff --git a/powder-toy.png b/powder-toy.png Binary files differnew file mode 100644 index 000000000000..02ebd59bbfda --- /dev/null +++ b/powder-toy.png |