diff --git a/Formula/sfml.rb b/Formula/sfml.rb index fb00a3e9b0..0b7ea5c07a 100644 --- a/Formula/sfml.rb +++ b/Formula/sfml.rb @@ -2,9 +2,8 @@ class Sfml < Formula # Don't update SFML until there's a corresponding CSFML release desc "Multi-media library with bindings for multiple languages" homepage "https://www.sfml-dev.org/" - url "https://www.sfml-dev.org/files/SFML-2.4.2-sources.zip" - sha256 "8ba04f6fde6a7b42527d69742c49da2ac529354f71f553409f9f821d618de4b6" - revision 1 + url "https://www.sfml-dev.org/files/SFML-2.5.1-sources.zip" + sha256 "bf1e0643acb92369b24572b703473af60bac82caf5af61e77c063b779471bb7f" head "https://github.com/SFML/SFML.git" bottle do @@ -28,13 +27,8 @@ class Sfml < Formula # https://github.com/Homebrew/homebrew/issues/40301 def install - # Install pkg-config files, adding the CMake flag below isn't enough, as - # the CMakeLists.txt file currently doesn't consider MacOS X. - # This was fixed upstream for the future 2.5.0 release on 2016-12-19 in: - # https://github.com/SFML/SFML/commit/5fe5e5d6d7792e37685a437551ffa8ed5161fcc1 - inreplace "CMakeLists.txt", - "if(SFML_OS_LINUX OR SFML_OS_FREEBSD)", - "if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_MACOSX)" + # error: expected function body after function declarator + ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra # Always remove the "extlibs" to avoid install_name_tool failure # (https://github.com/Homebrew/homebrew/pull/35279) but leave the @@ -42,6 +36,7 @@ class Sfml < Formula rm_rf Dir["extlibs/*"] - ["extlibs/headers"] system "cmake", ".", *std_cmake_args, + "-DSFML_MISC_INSTALL_PREFIX=#{share}/SFML", "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE", "-DSFML_BUILD_DOC=TRUE" system "make", "install"