From f345f19ef74382e996b774aa0d3d6a16e07d07a0 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Mon, 10 Oct 2022 18:33:06 -0400 Subject: [PATCH] The-Powder-Toy: update to 96.2.350. --- srcpkgs/The-Powder-Toy/patches/luacpp.patch | 19 ++++++++++++ srcpkgs/The-Powder-Toy/template | 34 +++++++++++---------- 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 srcpkgs/The-Powder-Toy/patches/luacpp.patch diff --git a/srcpkgs/The-Powder-Toy/patches/luacpp.patch b/srcpkgs/The-Powder-Toy/patches/luacpp.patch new file mode 100644 index 000000000000..47e57a5861a3 --- /dev/null +++ b/srcpkgs/The-Powder-Toy/patches/luacpp.patch @@ -0,0 +1,19 @@ +They look for a pkg-config file that does not exist in our Lua package nor +upstream Lua, but the normal .pc file works just fine. + +-- + +--- a/meson.build ++++ b/meson.build +@@ -108,9 +108,9 @@ + if uopt_lua == 'luajit' + lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('luajit_dep') : dependency('luajit', static: uopt_static == 'system') ] + elif uopt_lua == 'lua5.2' +- lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua52_dep') : dependency('lua5.2-c++', static: uopt_static == 'system') ] ++ lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua52_dep') : dependency('lua5.2', static: uopt_static == 'system') ] + elif uopt_lua == 'lua5.1' +- lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua51_dep') : dependency('lua5.1-c++', static: uopt_static == 'system') ] ++ lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua51_dep') : dependency('lua5.1', static: uopt_static == 'system') ] + else + lua_opt_dep = [] + endif diff --git a/srcpkgs/The-Powder-Toy/template b/srcpkgs/The-Powder-Toy/template index 889c42724fb6..129929eb2fd9 100644 --- a/srcpkgs/The-Powder-Toy/template +++ b/srcpkgs/The-Powder-Toy/template @@ -1,29 +1,31 @@ # Template file for 'The-Powder-Toy' pkgname=The-Powder-Toy -version=95.0 +version=96.2.350 revision=1 -build_style=scons -make_build_args="--output=powder" -makedepends="SDL2-devel lua51-devel fftw-devel bzip2-devel zlib-devel - libcurl-devel" +build_style=meson +configure_args="-Dx86_sse=sse2 -Dworkaround_gcc_no_pie=false + -Dlua=$(vopt_if luajit luajit lua5.1)" +hostmakedepends="pkg-config" +makedepends="SDL2-devel fftw-devel bzip2-devel zlib-devel libcurl-devel + $(vopt_if luajit LuaJIT-devel lua51-devel)" short_desc="Falling sand physics sandbox, simulates air pressure, velocity & heat" -maintainer="Illia Shestakov " +maintainer="0x5c " license="GPL-3.0-or-later" homepage="https://powdertoy.co.uk/" distfiles="https://github.com/The-Powder-Toy/${pkgname}/archive/v${version}.tar.gz" -checksum=f60c3dc93e4ceddeda92b768e75a2d218f8df3da4a569b7d7cb57fff5515e15b -CPPDEFINES=IGNORE_UPDATES +checksum=d95cbadee22632687661e8fc488bd64405d81c0dca737e16420f26e93ea5bf58 -case "$XBPS_TARGET_MACHINE" - in x86_64*|i686*) - ;; - *) - make_build_args+=" --no-sse";; -esac +build_options="luajit" + +if [ "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ] ; then + build_options_default="luajit" +fi do_install() { vbin build/powder vdoc README.md - vinstall resources/powder.desktop 664 /usr/share/applications/ - vinstall resources/icon/powder-256.png 644 /usr/share/pixmaps/ powder.png + vinstall resources/powder.desktop 644 /usr/share/applications/ + for size in 16 24 32 48 128 256 ; do + vinstall resources/icon/powder-${size}.png 644 /usr/share/icons/hicolor/${size}x${size}/apps powder.png + done }