Skip to content

Commit

Permalink
Update SFML to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Dec 30, 2024
1 parent 48afdad commit dbb3451
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 152 deletions.
28 changes: 0 additions & 28 deletions ports/sfml/fix-dep-openal.patch

This file was deleted.

87 changes: 0 additions & 87 deletions ports/sfml/fix-dependencies.patch

This file was deleted.

34 changes: 3 additions & 31 deletions ports/sfml/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@ vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO SFML/SFML
REF "${VERSION}"
HEAD_REF master
SHA512 d8a8bee3aa9acda4609104c2a9d4a2512e4be6d6e85fd4b24c287c03f60cfb888e669e61bfac4113dae35f0c3492559b65b3453baf38766d8c0223d9ab77aada
PATCHES
fix-dependencies.patch
fix-dep-openal.patch
SHA512 116b934950b02639aa0924cdf6ceaf34518be7f94037e77e52f374aa0a03403487ef58384137569d930961c7d65291a7f0bbddcf1eaf4260086f49afbfae1f27
)

# The embedded FindFreetype doesn't properly handle debug libraries
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake")

if(VCPKG_TARGET_IS_LINUX)
message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n libxcursor\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev")
message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxi\n libxrandr\n libxcursor\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxi-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev")
endif()

vcpkg_check_features(
Expand All @@ -31,11 +25,10 @@ vcpkg_cmake_configure(
-DSFML_USE_SYSTEM_DEPS=ON
-DSFML_MISC_INSTALL_PREFIX=share/sfml
-DSFML_GENERATE_PDB=OFF
-DSFML_WARNINGS_AS_ERRORS=OFF #Remove in the next version
-DSFML_INSTALL_PKGCONFIG_FILES=OFF
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
SFML_MISC_INSTALL_PREFIX
SFML_WARNINGS_AS_ERRORS
)

vcpkg_cmake_install()
Expand All @@ -58,27 +51,6 @@ endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

set(SHOULD_REMOVE_SFML_ALL 0)
if(NOT "audio" IN_LIST FEATURES)
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-audio.pc")
set(SHOULD_REMOVE_SFML_ALL 1)
endif()
if(NOT "graphics" IN_LIST FEATURES)
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-graphics.pc")
set(SHOULD_REMOVE_SFML_ALL 1)
endif()
if(NOT "network" IN_LIST FEATURES)
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-network.pc")
set(SHOULD_REMOVE_SFML_ALL 1)
endif()
if(NOT "window" IN_LIST FEATURES)
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-window.pc")
set(SHOULD_REMOVE_SFML_ALL 1)
endif()
if(SHOULD_REMOVE_SFML_ALL)
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sfml-all.pc")
endif()

vcpkg_fixup_pkgconfig()

file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
Expand Down
6 changes: 3 additions & 3 deletions ports/sfml/usage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The package sfml provides CMake targets:

find_package(SFML COMPONENTS system window graphics audio CONFIG REQUIRED)
target_link_libraries(main PRIVATE sfml-system sfml-network sfml-graphics sfml-window sfml-audio)
find_package(SFML COMPONENTS Network Graphics Window Audio System CONFIG REQUIRED)
target_link_libraries(main PRIVATE SFML::Network SFML::Graphics SFML::Window SFML::Audio SFML::System)

# If you want SFML to provide an implementation of main():
target_link_libraries(main PRIVATE sfml-main)
target_link_libraries(main PRIVATE SFML::Main)
4 changes: 2 additions & 2 deletions ports/sfml/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sfml",
"version": "2.6.2",
"version": "3.0.0",
"description": "Simple and fast multimedia library",
"homepage": "https://github.com/SFML/SFML",
"license": "Zlib",
Expand All @@ -27,7 +27,7 @@
"libflac",
"libogg",
"libvorbis",
"openal-soft"
"miniaudio"
]
},
"graphics": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8337,7 +8337,7 @@
"port-version": 6
},
"sfml": {
"baseline": "2.6.2",
"baseline": "3.0.0",
"port-version": 0
},
"sfsexp": {
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sfml.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "72dfe19299a1cb204b62e657e6312e628fcb0b6a",
"version": "3.0.0",
"port-version": 0
},
{
"git-tree": "16580cf264c6a8933fb657e425a5866568d4c394",
"version": "2.6.2",
Expand Down

0 comments on commit dbb3451

Please sign in to comment.