summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmytro Meleshko2023-01-05 18:33:07 +0100
committerDmytro Meleshko2023-01-05 18:33:40 +0100
commit6df9defc9030a2891cb575f250c97e2026470bee (patch)
tree4cc1afe34b8c8a9c401ad5dd60a0620636acb912
parent53ef430cef027f26f5282e734ba8a86f1e82f3f1 (diff)
downloadaur-6df9defc9030a2891cb575f250c97e2026470bee.tar.gz
v97.0.352
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD90
-rw-r--r--powder-toy-open.desktop12
-rw-r--r--powder-toy-ptsave.desktop12
-rw-r--r--powder-toy.desktop10
-rw-r--r--powder-toy.patch24
-rwxr-xr-xpowder-toy.sh9
7 files changed, 48 insertions, 126 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8f2dcd200640..ae3c3edee13c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = powder-toy
pkgdesc = Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat!
- pkgver = 96.2.350
+ pkgver = 97.0.352
pkgrel = 1
url = https://powdertoy.co.uk/
install = powder-toy.install
@@ -9,24 +9,17 @@ pkgbase = powder-toy
license = GPL3
makedepends = meson
makedepends = ninja
- makedepends = libicns
depends = glibc
depends = libx11
depends = sdl2
depends = luajit
depends = fftw
depends = zlib
+ depends = libpng
depends = curl
+ depends = jsoncpp
depends = hicolor-icon-theme
- source = powder-toy-96.2.350.tar.gz::https://github.com/The-Powder-Toy/The-Powder-Toy/archive/refs/tags/v96.2.350.tar.gz
- source = powder-toy.sh
- source = powder-toy.desktop
- source = powder-toy-open.desktop
- source = powder-toy-ptsave.desktop
- sha256sums = d95cbadee22632687661e8fc488bd64405d81c0dca737e16420f26e93ea5bf58
- sha256sums = b5d181c3141715b7dced8813cae6d07d2adc03bca2a7efe527592740de2d45e2
- sha256sums = 265f530be7597fcc7bbaf2690fd517fe4f8f18372c808a90ddef49a604c8d455
- sha256sums = 398f6d068dd37e12989f4132ea5966886b14036bac07a589991b283d242b4ca5
- sha256sums = fcbf035d286d805dced55f147d649aa0bc74d3be873d5430de92d175d9f59431
+ source = powder-toy-97.0.352.tar.gz::https://github.com/The-Powder-Toy/The-Powder-Toy/archive/refs/tags/v97.0.352.tar.gz
+ sha256sums = 3ab27e1b9a84db1da7342e61232ad5be981ca1ddf001c4924fd08b61cc8d287a
pkgname = powder-toy
diff --git a/PKGBUILD b/PKGBUILD
index 5e36a97bbe1e..d9a8bc7a6070 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,54 +10,52 @@
_lua=luajit
pkgname=powder-toy
-pkgver=96.2.350
+_appexe="${pkgname}"
+_appid=uk.co.powdertoy.tpt
+_appvendor=powdertoy
+pkgver=97.0.352
pkgrel=1
pkgdesc="Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat!"
arch=(x86_64 i686)
-depends=('glibc' 'libx11' 'sdl2' "$_lua" 'fftw' 'zlib' 'curl' 'hicolor-icon-theme')
-makedepends=('meson' 'ninja' 'libicns')
+depends=('glibc' 'libx11' 'sdl2' "$_lua" 'fftw' 'zlib' 'libpng' 'curl' 'jsoncpp' 'hicolor-icon-theme')
+makedepends=('meson' 'ninja')
url="https://powdertoy.co.uk/"
license=('GPL3')
install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/The-Powder-Toy/The-Powder-Toy/archive/refs/tags/v${pkgver}.tar.gz"
- "${pkgname}.sh"
- "${pkgname}.desktop"
- "${pkgname}-open.desktop"
- "${pkgname}-ptsave.desktop")
-sha256sums=('d95cbadee22632687661e8fc488bd64405d81c0dca737e16420f26e93ea5bf58'
- 'b5d181c3141715b7dced8813cae6d07d2adc03bca2a7efe527592740de2d45e2'
- '265f530be7597fcc7bbaf2690fd517fe4f8f18372c808a90ddef49a604c8d455'
- '398f6d068dd37e12989f4132ea5966886b14036bac07a589991b283d242b4ca5'
- 'fcbf035d286d805dced55f147d649aa0bc74d3be873d5430de92d175d9f59431')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/The-Powder-Toy/The-Powder-Toy/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('3ab27e1b9a84db1da7342e61232ad5be981ca1ddf001c4924fd08b61cc8d287a')
build() {
cd "The-Powder-Toy-${pkgver}"
- # extract document icons from macOS .icns files
- pushd >/dev/null resources
- icns2png -x document.icns
- popd >/dev/null
+ local opt_lua opt_sse
- local extra_flags=()
-
- extra_flags+=(-Dignore_updates=true)
- extra_flags+=(-Dinstall_check=false)
+ case "$_lua" in
+ luajit) opt_lua=luajit ;;
+ lua51) opt_lua=lua5.1 ;;
+ lua52) opt_lua=lua5.2 ;;
+ *) opt_lua=none ;;
+ esac
if grep -q -i pni /proc/cpuinfo; then
- extra_flags+=(-Dx86_sse=sse3)
+ opt_sse=sse3
elif grep -q -i sse2 /proc/cpuinfo; then
- extra_flags+=(-Dx86_sse=sse2)
+ opt_sse=sse2
elif grep -q -i sse /proc/cpuinfo; then
- extra_flags+=(-Dx86_sse=sse)
+ opt_sse=sse
else
- extra_flags+=(-Dx86_sse=none)
+ opt_sse=none
fi
- case "$_lua" in
- luajit) extra_flags+=(-Dlua=luajit) ;;
- lua51) extra_flags+=(-Dlua=lua5.1) ;;
- lua52) extra_flags+=(-Dlua=lua5.2) ;;
- esac
+ local extra_flags=(
+ -Dignore_updates=true
+ -Dinstall_check=false
+ -Dapp_exe="${_appexe}"
+ -Dapp_id="${_appid}"
+ -Dapp_vendor="${_appvendor}"
+ -Dlua="${opt_lua}"
+ -Dx86_sse="${opt_sse}"
+ )
msg2 "building ${pkgname} with the following extra flags: ${extra_flags[*]}"
arch-meson --buildtype=release build "${extra_flags[@]}"
@@ -70,25 +68,23 @@ check() {
}
package() {
- install -Dm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -Dm644 "${pkgname}-open.desktop" "${pkgdir}/usr/share/applications/${pkgname}-open.desktop"
- install -Dm644 "${pkgname}-ptsave.desktop" "${pkgdir}/usr/share/applications/${pkgname}-ptsave.desktop"
-
cd "The-Powder-Toy-${pkgver}"
- install -Dm755 "build/powder" "${pkgdir}/usr/lib/${pkgname}/${pkgname}"
- install -Dm644 "resources/powdertoy-save.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}-save.xml"
- install -Dm644 "resources/powder.appdata.xml" "${pkgdir}/usr/share/metainfo/${pkgname}.appdata.xml"
- install -Dm644 "resources/powder.man" "${pkgdir}/usr/share/man/man6/${pkgname}.6"
+ install -Dm755 "build/${_appexe}" "${pkgdir}/usr/bin/${_appexe}"
+ install -Dm644 "build/resources/powder.desktop" "${pkgdir}/usr/share/applications/${_appid}.desktop"
+ install -Dm644 "build/resources/appdata.xml" "${pkgdir}/usr/share/metainfo/${_appid}.appdata.xml"
+ install -Dm644 "resources/save.xml" "${pkgdir}/usr/share/mime/packages/${_appvendor}-save.xml"
+ install -Dm644 "resources/powder.man" "${pkgdir}/usr/share/man/man6/${_appexe}.6"
- local icon_size
- for icon_size in 16 24 32 48 128 256; do
- install -Dm644 "resources/icon/powder-${icon_size}.png" \
- "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/${pkgname}.png"
- done
- for icon_size in 16 32 128 256 512; do
- install -Dm644 "resources/document_${icon_size}x${icon_size}x32.png" \
- "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/mimetypes/application-vnd.${pkgname}.save.png"
+ local theme_dir="${pkgdir}/usr/share/icons/hicolor" mimetype="application-vnd.powdertoy.save"
+ install -Dm644 "resources/icon_exe.svg" "${theme_dir}/scalable/apps/${_appvendor}-${_appexe}.svg"
+ install -Dm644 "resources/icon_cps.svg" "${theme_dir}/scalable/mimetypes/${mimetype}.svg"
+ install -Dm644 "resources/generated_icons/icon_exe.png" "${theme_dir}/256x256/apps/${_appvendor}-${_appexe}.png"
+ install -Dm644 "resources/generated_icons/icon_cps.png" "${theme_dir}/256x256/mimetypes/${mimetype}.png"
+ local icon_size; for icon_size in 16 32 48; do
+ install -Dm644 "resources/generated_icons/icon_exe_${icon_size}.png" \
+ "${theme_dir}/${icon_size}x${icon_size}/apps/${_appvendor}-${_appexe}.png"
+ install -Dm644 "resources/generated_icons/icon_cps_${icon_size}.png" \
+ "${theme_dir}/${icon_size}x${icon_size}/mimetypes/${mimetype}.png"
done
}
diff --git a/powder-toy-open.desktop b/powder-toy-open.desktop
deleted file mode 100644
index 715a38ecfb69..000000000000
--- a/powder-toy-open.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Powder Toy
-NoDisplay=true
-Comment=Physics sandbox game
-Icon=powder-toy
-Exec=powder-toy open %f
-Terminal=false
-MimeType=application/vnd.powder-toy.save;
-Categories=Game;Simulation;
-StartupNotify=false
diff --git a/powder-toy-ptsave.desktop b/powder-toy-ptsave.desktop
deleted file mode 100644
index bf90bb551e81..000000000000
--- a/powder-toy-ptsave.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Powder Toy
-NoDisplay=true
-Comment=Physics sandbox game
-Icon=powder-toy
-Exec=powder-toy ptsave %u
-Terminal=false
-MimeType=x-scheme-handler/ptsave;
-Categories=Game;Simulation;
-StartupNotify=false
diff --git a/powder-toy.desktop b/powder-toy.desktop
deleted file mode 100644
index 5aa018043c2c..000000000000
--- a/powder-toy.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Powder Toy
-Comment=Physics sandbox game
-Icon=powder-toy
-Exec=powder-toy
-Terminal=false
-Categories=Game;Simulation;
-StartupNotify=false
diff --git a/powder-toy.patch b/powder-toy.patch
deleted file mode 100644
index 9a5630ee6d2f..000000000000
--- a/powder-toy.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --unified --recursive --text --color The-Powder-Toy-94.1.orig/resources/powdertoy-save.xml The-Powder-Toy-94.1/resources/powdertoy-save.xml
---- The-Powder-Toy-94.1.orig/resources/powdertoy-save.xml 2019-02-21 07:23:45.000000000 +0200
-+++ The-Powder-Toy-94.1/resources/powdertoy-save.xml 2019-10-06 00:21:51.080019592 +0300
-@@ -1,6 +1,6 @@
- <?xml version="1.0"?>
- <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
-- <mime-type type="application/vnd.powdertoy.save">
-+ <mime-type type="application/vnd.powder-toy.save">
- <comment>Powder Toy save</comment>
- <glob pattern="*.cps"/>
- <glob pattern="*.stm"/>
-diff --unified --recursive --text --color The-Powder-Toy-94.1.orig/src/Config.h The-Powder-Toy-94.1/src/Config.h
---- The-Powder-Toy-94.1.orig/src/Config.h 2019-02-21 07:23:45.000000000 +0200
-+++ The-Powder-Toy-94.1/src/Config.h 2019-10-06 01:33:00.610003177 +0300
-@@ -40,7 +40,8 @@
- #endif
- //VersionInfoEnd
-
--//#define IGNORE_UPDATES //uncomment this for mods, to not get any update notifications
-+#define IGNORE_UPDATES
-+#define NO_INSTALL_CHECK
-
- #if !(defined(MACOSX) && defined(DEBUG))
- #define HIGH_QUALITY_RESAMPLE //High quality image resampling, slower but much higher quality than my terribad linear interpolation
diff --git a/powder-toy.sh b/powder-toy.sh
deleted file mode 100755
index db640fb98173..000000000000
--- a/powder-toy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env sh
-set -eu
-
-pkgname=powder-toy
-data_home="${XDG_DATA_HOME:-${HOME}/.local/share}/${pkgname}"
-
-mkdir -p "${data_home}"
-cd "${data_home}"
-exec "/usr/lib/${pkgname}/${pkgname}" "$@"