Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sfml 3.0.0 #202104

Merged
merged 8 commits into from
Dec 25, 2024
Merged

sfml 3.0.0 #202104

Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Aliases/sfml@3
5 changes: 3 additions & 2 deletions Formula/c/csfml.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
class Csfml < Formula

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/c/csfml.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for csfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)
# Don't update CSFML until there's a corresponding SFML release
desc "SMFL bindings for C"
homepage "https://www.sfml-dev.org/"
url "https://github.com/SFML/CSFML/archive/refs/tags/2.6.1.tar.gz"
sha256 "f3f3980f6b5cad85b40e3130c10a2ffaaa9e36de5f756afd4aacaed98a7a9b7b"
license "Zlib"
revision 1
head "https://github.com/SFML/CSFML.git", branch: "master"

bottle do
Expand All @@ -19,11 +20,11 @@
end

depends_on "cmake" => :build
depends_on "sfml"
depends_on "sfml@2" # milestone to support sfml 3.0, https://github.com/SFML/CSFML/milestone/1

def install
args = %W[
-DCMAKE_MODULE_PATH=#{Formula["sfml"].share}/SFML/cmake/Modules/
-DCMAKE_MODULE_PATH=#{Formula["sfml@2"].share}/SFML/cmake/Modules/
]

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
Expand Down
16 changes: 9 additions & 7 deletions Formula/s/sfml.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Sfml < Formula

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for sfml built at 2911caa7af7 (Merge 3b396304badae6db207b93b73a628d8b855ea1a1 into 7c3f5707a83eefc405c15dd60acd5c6383187ff2, 2024-12-23)

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for sfml built at 2911caa7af7 (Merge 3b396304badae6db207b93b73a628d8b855ea1a1 into 7c3f5707a83eefc405c15dd60acd5c6383187ff2, 2024-12-23)

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for sfml built at 57ce1fe3cb2 (Merge 6898ae88323c0d098fc41128f136047675e21919 into 1063218ae24710e03c81dd154a45d584ea518c3e, 2024-12-24)

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for sfml built at 2911caa7af7 (Merge 3b396304badae6db207b93b73a628d8b855ea1a1 into 7c3f5707a83eefc405c15dd60acd5c6383187ff2, 2024-12-23)

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for sfml built at 2911caa7af7 (Merge 3b396304badae6db207b93b73a628d8b855ea1a1 into 7c3f5707a83eefc405c15dd60acd5c6383187ff2, 2024-12-23)

Check notice on line 1 in Formula/s/sfml.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for sfml built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)
# 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.6.2-sources.zip"
sha256 "19d6dbd9c901c74441d9888c13cb1399f614fe8993d59062a72cfbceb00fed04"
url "https://www.sfml-dev.org/files/SFML-3.0.0-sources.zip"
sha256 "8cc41db46b59f07c44ecf21c74a0f956d37735dec9d90ff4522856cb162ba642"
license "Zlib"
head "https://github.com/SFML/SFML.git", branch: "master"

Expand All @@ -18,6 +18,7 @@

depends_on "cmake" => :build
depends_on "doxygen" => :build
depends_on "pkgconf" => :build
depends_on "flac"
depends_on "freetype"
depends_on "libogg"
Expand All @@ -26,6 +27,7 @@
on_linux do
depends_on "libx11"
depends_on "libxcursor"
depends_on "libxi"
depends_on "libxrandr"
depends_on "mesa"
depends_on "mesa-glu"
Expand All @@ -47,12 +49,12 @@
args = ["-DCMAKE_INSTALL_RPATH=#{lib}",
"-DSFML_MISC_INSTALL_PREFIX=#{share}/SFML",
"-DSFML_INSTALL_PKGCONFIG_FILES=TRUE",
"-DSFML_BUILD_DOC=TRUE"]

args << "-DSFML_USE_SYSTEM_DEPS=ON" if OS.linux?
"-DSFML_BUILD_DOC=TRUE",
"-DSFML_USE_SYSTEM_DEPS=ON"]

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "--build", "build"
system "cmake", "--build", "build", "--target=doc"
system "cmake", "--install", "build"
end

Expand All @@ -64,8 +66,8 @@
return 0;
}
CPP
system ENV.cxx, "-I#{include}/SFML/System", testpath/"test.cpp",
"-L#{lib}", "-lsfml-system", "-o", "test"
system ENV.cxx, "-I#{include}/SFML/System", "-std=c++17", testpath/"test.cpp",
"-L#{lib}", "-o", "test"
system "./test"
end
end
63 changes: 63 additions & 0 deletions Formula/s/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
class SfmlAT2 < Formula

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)

Check notice on line 1 in Formula/s/[email protected]

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for sfml@2 built at e8ac63a0738 (Merge 829d3e1b9aab9bee051e61afc4ff747974febd06 into 82aa6e3b889ea46b1ee65b08bdeabdc26d1b88ac, 2024-12-25)
desc "Multi-media library with bindings for multiple languages"
homepage "https://www.sfml-dev.org/"
url "https://www.sfml-dev.org/files/SFML-2.6.2-sources.zip"
sha256 "19d6dbd9c901c74441d9888c13cb1399f614fe8993d59062a72cfbceb00fed04"
license "Zlib"

keg_only :versioned_formula

depends_on "cmake" => :build
depends_on "doxygen" => :build
depends_on "flac"
depends_on "freetype"
depends_on "libogg"
depends_on "libvorbis"

on_linux do
depends_on "libx11"
depends_on "libxcursor"
depends_on "libxrandr"
depends_on "mesa"
depends_on "mesa-glu"
depends_on "openal-soft"
depends_on "systemd"
end

def install
# Fix "fatal error: 'os/availability.h' file not found" on 10.11 and
# "error: expected function body after function declarator" on 10.12
# Requires the CLT to be the active developer directory if Xcode is installed
ENV["SDKROOT"] = MacOS.sdk_path if OS.mac? && MacOS.version <= :high_sierra

# Always remove the "extlibs" to avoid install_name_tool failure
# (https://github.com/Homebrew/homebrew/pull/35279) but leave the
# headers that were moved there in https://github.com/SFML/SFML/pull/795
rm_r(Dir["extlibs/*"] - ["extlibs/headers"])

args = %W[
-DCMAKE_INSTALL_RPATH=#{lib}
-DSFML_MISC_INSTALL_PREFIX=#{share}/SFML
-DSFML_INSTALL_PKGCONFIG_FILES=TRUE
-DSFML_BUILD_DOC=TRUE
]
args << "-DSFML_USE_SYSTEM_DEPS=ON" if OS.linux?

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
(testpath/"test.cpp").write <<~CPP
#include "SFML/System/Time.hpp"
int main() {
sf::Time t1 = sf::milliseconds(10);
return 0;
}
CPP

system ENV.cxx, testpath/"test.cpp", "-I#{include}", "-L#{lib}", "-lsfml-system", "-o", "test"
system "./test"
end
end
9 changes: 6 additions & 3 deletions Formula/t/tgui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Tgui < Formula
url "https://github.com/texus/TGUI/archive/refs/tags/v1.7.0.tar.gz"
sha256 "7d40359770e2f8e534a57332c99fd56c72cf79a8b59642676e01394fe05cb1fa"
license "Zlib"
revision 1

livecheck do
url :stable
Expand All @@ -20,7 +21,7 @@ class Tgui < Formula
end

depends_on "cmake" => :build
depends_on "sfml"
depends_on "sfml@2" # sfml 3.0 build issue report, https://github.com/texus/TGUI/issues/249

def install
args = %W[
Expand Down Expand Up @@ -49,8 +50,10 @@ def install
return 0;
}
CPP
system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}",
"-L#{lib}", "-L#{Formula["sfml"].opt_lib}",

ENV.append_path "LD_LIBRARY_PATH", Formula["sfml@2"].opt_lib if OS.linux?
system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-I#{Formula["sfml@2"].opt_include}",
"-L#{lib}", "-L#{Formula["sfml@2"].opt_lib}",
"-ltgui", "-lsfml-graphics", "-lsfml-system", "-lsfml-window",
"-o", "test"
system "./test"
Expand Down
Loading