From fdcfb8599c590d18abc972ab2aa6b01997e60c74 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 27 Sep 2021 17:05:58 +1000 Subject: [PATCH] The Powder Toy: bump version * add hvif icon --- .../additional-files/thepowdertoy.rdef.in | 31 ++++++++++ .../patches/thepowdertoy-91.5.330.patchset | 54 ------------------ .../patches/thepowdertoy-96.2.350.patchset | 26 +++++++++ ...30.recipe => thepowdertoy-96.2.350.recipe} | 57 ++++++++++++------- 4 files changed, 93 insertions(+), 75 deletions(-) create mode 100644 games-simulation/thepowdertoy/additional-files/thepowdertoy.rdef.in delete mode 100644 games-simulation/thepowdertoy/patches/thepowdertoy-91.5.330.patchset create mode 100644 games-simulation/thepowdertoy/patches/thepowdertoy-96.2.350.patchset rename games-simulation/thepowdertoy/{thepowdertoy-91.5.330.recipe => thepowdertoy-96.2.350.recipe} (51%) diff --git a/games-simulation/thepowdertoy/additional-files/thepowdertoy.rdef.in b/games-simulation/thepowdertoy/additional-files/thepowdertoy.rdef.in new file mode 100644 index 000000000..637e91563 --- /dev/null +++ b/games-simulation/thepowdertoy/additional-files/thepowdertoy.rdef.in @@ -0,0 +1,31 @@ + +resource app_flags B_SINGLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "The Powder Toy", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource vector_icon { + $"6E636966040501020006023C21DB382726B8B1363CAA964A18DC4980DE00DEC5" + $"96FF6A542803836B3C0401590302043E3B383B443B534EC2DAC0385A563A5A44" + $"5BB692C96E254B224DB890C1C00604EE3E243F253F243F263E263D253D263D24" + $"06032F435C445C425C60575E5DCD84C5DD4E46110A030102000A000100100117" + $"8422040A010100000A0001011001178400040A010101000A000101301A2E0117" + $"8400040A010101201A2E0A00010130253001178400040A0101012025300A0201" + $"010242000000000000000041FFFFCB00004A50000A0201010242000000000000" + $"000041FFFFC940004900000A02010102428000000000000000427FFFC990004A" + $"50000A0201010241000000000000000040FFFFC9100049E0000A020101024100" + $"0000000000000040FFFFC5C0004AE0000A0201010241000000000000000040FF" + $"FFC8F0004AD0000A0201010241000000000000000040FFFFC810004A60000A02" + $"01010241000000000000000040FFFFC280004A2000" +}; diff --git a/games-simulation/thepowdertoy/patches/thepowdertoy-91.5.330.patchset b/games-simulation/thepowdertoy/patches/thepowdertoy-91.5.330.patchset deleted file mode 100644 index 75e03dad3..000000000 --- a/games-simulation/thepowdertoy/patches/thepowdertoy-91.5.330.patchset +++ /dev/null @@ -1,54 +0,0 @@ -From 7840aa9c4f2f758f3321104450924f8e25093518 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 30 Oct 2016 20:43:50 +0000 -Subject: [PATCH] Added Haiku target - ---- - SConscript | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/SConscript b/SConscript -index 97ac57d..bca80eb 100644 ---- a/SConscript -+++ b/SConscript -@@ -41,6 +41,7 @@ def AddSconsOption(name, default, hasArgs, help): - AddSconsOption('win', False, False, "Target Windows.") - AddSconsOption('lin', False, False, "Target Linux.") - AddSconsOption('mac', False, False, "Target Mac OS X.") -+AddSconsOption('haiku', False, False, "Target Haiku.") - AddSconsOption('msvc', False, False, "Use the Microsoft Visual Studio compiler.") - AddSconsOption("tool", False, True, "Tool prefix appended before gcc/g++.") - -@@ -87,8 +88,10 @@ elif GetOption('lin'): - platform = "Linux" - elif GetOption('mac'): - platform = "Darwin" --elif compilePlatform not in ["Linux", "Windows", "Darwin"]: -- FatalError("Unknown platform: {0}".format(platform)) -+elif GetOption('haiku'): -+ platform = "Linux" -+#elif compilePlatform not in ["Linux", "Windows", "Darwin"]: -+# FatalError("Unknown platform: {0}".format(platform)) - - msvc = GetOption('msvc') - if msvc and platform != "Windows": -@@ -416,6 +419,9 @@ elif platform == "Linux": - elif platform == "Darwin": - env.Append(CPPDEFINES=['MACOSX']) - #env.Append(LINKFLAGS=['-headerpad_max_install_names']) #needed in some cross compiles -+elif platform == "Haiku": -+ env.Append(LINKFLAGS=['-lroot']) -+ env.Append(LINKFLAGS=['-lnetwork']) - - - #Add architecture flags and defines -@@ -503,6 +509,7 @@ elif GetOption("no-warnings"): - env.Append(CCFLAGS=['-w']) - - -+ - #Add version defines - if GetOption('save-version'): - env.Append(CPPDEFINES=["SAVE_VERSION={0}".format(GetOption('save-version'))]) --- -2.7.4 diff --git a/games-simulation/thepowdertoy/patches/thepowdertoy-96.2.350.patchset b/games-simulation/thepowdertoy/patches/thepowdertoy-96.2.350.patchset new file mode 100644 index 000000000..6d46827e9 --- /dev/null +++ b/games-simulation/thepowdertoy/patches/thepowdertoy-96.2.350.patchset @@ -0,0 +1,26 @@ +From 676d785d956ae1622d79b4c6eaedc329a4b547aa Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 27 Sep 2021 16:22:56 +1000 +Subject: Fix build + + +diff --git a/src/lua/LuaBit.cpp b/src/lua/LuaBit.cpp +index 5dae78d..1e98158 100644 +--- a/src/lua/LuaBit.cpp ++++ b/src/lua/LuaBit.cpp +@@ -163,6 +163,7 @@ static const struct luaL_Reg bit_funcs[] = { + */ + #define BAD_SAR (bsar(-8, 2) != (SBits)-2) + ++#ifndef __HAIKU__ + int luaopen_bit(lua_State *L) + { + UBits b; +@@ -190,3 +191,4 @@ int luaopen_bit(lua_State *L) + return 1; + } + #endif ++#endif +-- +2.30.2 + diff --git a/games-simulation/thepowdertoy/thepowdertoy-91.5.330.recipe b/games-simulation/thepowdertoy/thepowdertoy-96.2.350.recipe similarity index 51% rename from games-simulation/thepowdertoy/thepowdertoy-91.5.330.recipe rename to games-simulation/thepowdertoy/thepowdertoy-96.2.350.recipe index 3d0dadb3f..0f9dcfe57 100644 --- a/games-simulation/thepowdertoy/thepowdertoy-91.5.330.recipe +++ b/games-simulation/thepowdertoy/thepowdertoy-96.2.350.recipe @@ -7,64 +7,79 @@ and electronic components which can be used to construct complex machines,\ guns, bombs, realistic terrains and almost anything else." HOMEPAGE="http://powdertoy.co.uk/" COPYRIGHT="2008-2010 Stanislaw Skowronek - 2010-2016 Simon Robertshaw" + 2010-2021 Simon Robertshaw" LICENSE="GNU GPL v3" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/simtr/The-Powder-Toy/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="9a7de557e771f88e823d06cc21d16f1fbbca930ce751720bc9035d00073d6635" +CHECKSUM_SHA256="d95cbadee22632687661e8fc488bd64405d81c0dca737e16420f26e93ea5bf58" SOURCE_DIR="The-Powder-Toy-$portVersion" PATCHES="thepowdertoy-$portVersion.patchset" +ADDITIONAL_FILES="thepowdertoy.rdef.in" ARCHITECTURES="all" PROVIDES=" thepowdertoy = $portVersion - cmd:powder + app:Powder = $portVersion " REQUIRES=" haiku lib:libbz2 + lib:libcurl lib:libfftw3 lib:libfftw3f - lib:libgl - lib:liblua - lib:libsdl + lib:liblua >= 5.1 + lib:libluajit_5.1 + lib:libsdl2_2.0 lib:libz " BUILD_REQUIRES=" haiku_devel - lua51_devel devel:libbz2 + devel:libcurl devel:libfftw3 devel:libfftw3f - devel:liblua devel:liblua5.1 - devel:libsdl + devel:libluajit_5.1 + devel:libsdl2_2.0 devel:libz " BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf - cmd:automake - cmd:cmake cmd:gcc - cmd:ld - cmd:libtoolize - cmd:make + cmd:meson + cmd:ninja cmd:pkg_config - cmd:python - cmd:scons + cmd:python3.7 " BUILD() { - scons -Q + export DISABLE_ASLR=1 + + meson build + ninja -C build $jobArgs } INSTALL() { mkdir -p $appsDir cp build/powder $appsDir/Powder - addAppDeskbarSymlink $appsDir/Powder + + local APP_SIGNATURE="application/x-vnd.the-powder-toy" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/thepowdertoy.rdef.in > $sourceDir/thepowdertoy.rdef + + addResourcesToBinaries $sourceDir/thepowdertoy.rdef $appsDir/Powder + + addAppDeskbarSymlink $appsDir/Powder "The Powder Toy" }