Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / w / widelands.rb
blobd1b7d324f3a080d8c62065c99752426388112384
1 class Widelands < Formula
2   desc "Free real-time strategy game like Settlers II"
3   homepage "https://www.widelands.org/"
4   url "https://github.com/widelands/widelands/archive/refs/tags/v1.2.1.tar.gz"
5   sha256 "799bfd32048ef20118c48e21f3fc843ae0451c42bb8bf2eabcb9b26bf6fe54b4"
6   license "GPL-2.0-or-later"
7   version_scheme 1
9   livecheck do
10     url :stable
11     regex(/^v?(\d+(?:\.\d+)+)$/i)
12   end
14   bottle do
15     sha256 arm64_sequoia: "8f6a42336d2463fa5fb780b1d0a265f58e83c8011f90b635a994b39fe2382c69"
16     sha256 arm64_sonoma:  "f81d945d7bdb3961c2c808294496a42d29c78133850e6ff9578451c68524d043"
17     sha256 arm64_ventura: "fde531ff4c5c0bd673dcefdc64caf3598b4c43fdc02b75a93464862054c7f96e"
18     sha256 sonoma:        "506d22d26f4c3e2ab5893a116fbbb9a298073ac8fbb66ddb230874c495ff88a9"
19     sha256 ventura:       "974a1506ca44d90f468e681ac4f29aed05fd0a2a3847b301600de2fd33c74cf2"
20     sha256 x86_64_linux:  "68877518c427d75cf1a45005a2ee32258df2a587eadbfd6429af2626d90c51f7"
21   end
23   depends_on "asio" => :build
24   depends_on "cmake" => :build
25   depends_on "doxygen" => :build
26   depends_on "gettext" => :build
27   depends_on "pkgconf" => :build
29   depends_on "glew"
30   depends_on "icu4c@76"
31   depends_on "libpng"
32   depends_on "lua"
33   depends_on "minizip"
34   depends_on "sdl2"
35   depends_on "sdl2_image"
36   depends_on "sdl2_mixer"
37   depends_on "sdl2_ttf"
39   uses_from_macos "python" => :build
40   uses_from_macos "zlib"
42   on_macos do
43     depends_on "gettext"
44   end
46   on_linux do
47     depends_on "mesa"
48   end
50   def install
51     system "cmake", "-S", ".", "-B", "build",
52                     "-DWL_INSTALL_BASEDIR=#{pkgshare}",
53                     "-DWL_INSTALL_BINDIR=#{bin}",
54                     "-DWL_INSTALL_DATADIR=#{pkgshare}/data",
55                     "-DOPTION_BUILD_CODECHECK=OFF",
56                     "-DOPTION_BUILD_TESTS=OFF",
57                     "-DOPTION_BUILD_WEBSITE_TOOLS=OFF",
58                     "-DPYTHON_EXECUTABLE=#{which("python3") || which("python")}",
59                     *std_cmake_args
60     system "cmake", "--build", "build"
61     system "cmake", "--install", "build"
62   end
64   test do
65     if OS.linux?
66       # Unable to start Widelands, because we were unable to add the home directory:
67       # RealFSImpl::make_directory: No such file or directory: /tmp/widelands-test/.local/share/widelands
68       mkdir_p ".local/share/widelands"
69       mkdir_p ".config/widelands"
70     end
72     system bin/"widelands", "--version"
73   end
74 end