Skip to content

Commit

Permalink
pioneer 20240710
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Dec 30, 2024
1 parent c6d934f commit 0369b56
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Formula/p/pioneer.rb
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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

0 comments on commit 0369b56

Please sign in to comment.