[BACK]Return to sdl2.rb CVS log [TXT][DIR] Up to [contributed] / brogue-ce / macos

Annotation of brogue-ce/macos/sdl2.rb, Revision 1.1.1.1

1.1       rubenllo    1: class Sdl2 < Formula
                      2:   desc "Low-level access to audio, keyboard, mouse, joystick, and graphics"
                      3:   homepage "https://www.libsdl.org/"
                      4:   url "https://libsdl.org/release/SDL2-2.0.14.tar.gz"
                      5:   sha256 "d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc"
                      6:   license "Zlib"
                      7:   revision 1
                      8:
                      9:   livecheck do
                     10:     url "https://www.libsdl.org/download-2.0.php"
                     11:     regex(/SDL2[._-]v?(\d+(?:\.\d+)*)/i)
                     12:   end
                     13:
                     14:   bottle do
                     15:     cellar :any
                     16:     sha256 "ccde7145d4334d9274f9588e6b841bf3749729682e1d25f590bdcf7994dfdd89" => :big_sur
                     17:     sha256 "2ae70b6025c4e241400643f2686c8e288d50e3f04311e63d8a1f8180ed4afb07" => :arm64_big_sur
                     18:     sha256 "d6ae3300160c5bb495b78a5c5c0fc995f9e797e9cdd4b04ef77d59d45d2d694d" => :catalina
                     19:     sha256 "4f3988fb3af0f370bc1648d6eb1d6573fd37381df0f3b9ee0874a49d6a7dec2e" => :mojave
                     20:   end
                     21:
                     22:   head do
                     23:     url "https://hg.libsdl.org/SDL", using: :hg
                     24:
                     25:     depends_on "autoconf" => :build
                     26:     depends_on "automake" => :build
                     27:     depends_on "libtool" => :build
                     28:   end
                     29:
                     30:   on_linux do
                     31:     depends_on "pkg-config" => :build
                     32:   end
                     33:
                     34:   def install
                     35:     # Set deployment target version environment variable, so SDL works on older
                     36:     # versions of macOS. 10.6 is chosen by SDL build scripts.
                     37:     ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.6"
                     38:
                     39:     # we have to do this because most build scripts assume that all SDL modules
                     40:     # are installed to the same prefix. Consequently SDL stuff cannot be
                     41:     # keg-only but I doubt that will be needed.
                     42:     inreplace %w[sdl2.pc.in sdl2-config.in], "@prefix@", HOMEBREW_PREFIX
                     43:
                     44:     system "./autogen.sh" if build.head?
                     45:
                     46:     args = %W[--prefix=#{prefix} --without-x --enable-hidapi]
                     47:     system "./configure", *args
                     48:     system "make", "install"
                     49:   end
                     50:
                     51:   test do
                     52:     system bin/"sdl2-config", "--version"
                     53:   end
                     54: end

CVSweb