diff --git a/Formula/p/pioneer.rb b/Formula/p/pioneer.rb index 51750aaaf77ed..086d9d113dcdd 100644 --- a/Formula/p/pioneer.rb +++ b/Formula/p/pioneer.rb @@ -1,8 +1,8 @@ class Pioneer < Formula desc "Game of lonely space adventure" homepage "https://pioneerspacesim.net/" - url "https://github.com/pioneerspacesim/pioneer/archive/refs/tags/20230203.tar.gz" - sha256 "80eea94e0f7e4d8e6a0c4629bdfb89201f82aae2f59ee7a1f7a487eeeccf27c7" + url "https://github.com/pioneerspacesim/pioneer/archive/refs/tags/20240710.tar.gz" + sha256 "65549552df84edaecf0c2547d01dec137282c9fe20a1299f9494b739c90ef7ed" license "GPL-3.0-only" head "https://github.com/pioneerspacesim/pioneer.git", branch: "master" @@ -35,17 +35,20 @@ class Pioneer < Formula depends_on "mesa" end - def install - # Set PROJECT_VERSION to be the date of release, not the build date - inreplace "CMakeLists.txt", "string(TIMESTAMP PROJECT_VERSION \"%Y%m%d\")", "set(PROJECT_VERSION #{version})" + # patch to fix `pi_lua_generic_push` call, upstream pr ref, https://github.com/pioneerspacesim/pioneer/pull/6000 + patch do + url "https://github.com/pioneerspacesim/pioneer/commit/9293a5f84584d7dd10699c64f28647a576ca059b.patch?full_index=1" + sha256 "c93e0f8745d9e1dc7989a0051489be7825df452e0d1fa0cf654038f1486e2f9f" + end + def install system "cmake", "-S", ".", "-B", "build", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end test do - assert_match "#{name} #{version}", shell_output("#{bin}/pioneer -v 2>&1").chomp + assert_match "pioneer #{version}", shell_output("#{bin}/pioneer -v 2>&1").chomp assert_match "modelcompiler #{version}", shell_output("#{bin}/modelcompiler -v 2>&1").chomp end end