diff --git a/devel/sfml/Makefile b/devel/sfml/Makefile index 1f4725c6abd4..74a0f24d8271 100644 --- a/devel/sfml/Makefile +++ b/devel/sfml/Makefile @@ -1,62 +1,60 @@ PORTNAME= SFML PORTVERSION= 2.6.1 PORTREVISION= 1 CATEGORIES= devel MAINTAINER= amdmi3@FreeBSD.org COMMENT= Simple and Fast Multimedia Library WWW= https://www.sfml-dev.org/ \ https://github.com/SFML/SFML LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/license.md -BROKEN_FreeBSD_15= compilation fails with libc++ 19, see PR281540 - USES= cmake compiler:c++11-lang USE_GITHUB= yes CMAKE_ON= SFML_USE_SYSTEM_DEPS USE_LDCONFIG= yes CONFLICTS= sfml251 PORTDATA= * PORTDOCS= * OPTIONS_DEFINE= DOCS DOXYGEN OPTIONS_GROUP= MODULES OPTIONS_GROUP_MODULES= AUDIO GRAPHICS NETWORK WINDOW OPTIONS_DEFAULT= ${OPTIONS_GROUP_MODULES} OPTIONS_SUB= yes MODULES_DESC= SFML modules AUDIO_DESC= SFML Audio module AUDIO_LIB_DEPENDS= libFLAC.so:audio/flac \ libogg.so:audio/libogg \ libvorbis.so:audio/libvorbis AUDIO_USES= openal:al AUDIO_CMAKE_BOOL= SFML_BUILD_AUDIO DOXYGEN_IMPLIES= DOCS DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen DOXYGEN_CMAKE_BOOL= SFML_BUILD_DOC GRAPHICS_DESC= SFML Graphics module GRAPHICS_IMPLIES= WINDOW GRAPHICS_LIB_DEPENDS= libfreetype.so:print/freetype2 GRAPHICS_CMAKE_BOOL= SFML_BUILD_GRAPHICS NETWORK_DESC= SFML Network module NETWORK_CMAKE_BOOL= SFML_BUILD_NETWORK WINDOW_DESC= SFML Window module WINDOW_USES= gl xorg WINDOW_USE= GL=gl XORG=x11,xcursor,xrandr WINDOW_CMAKE_BOOL= SFML_BUILD_WINDOW post-install-DOCS-on: @${RM} ${STAGEDIR}${DOCSDIR}/license.md ${INSTALL_DATA} ${WRKSRC}/changelog.md ${STAGEDIR}${DOCSDIR} .include diff --git a/devel/sfml/files/patch-include_SFML_System_String.hpp b/devel/sfml/files/patch-include_SFML_System_String.hpp new file mode 100644 index 000000000000..ae79639bd4a2 --- /dev/null +++ b/devel/sfml/files/patch-include_SFML_System_String.hpp @@ -0,0 +1,134 @@ +--- include/SFML/System/String.hpp.orig 2023-10-30 00:03:26 UTC ++++ include/SFML/System/String.hpp +@@ -35,6 +35,131 @@ + #include + + ++namespace std ++{ ++ ++namespace // anonymous ++{ ++ ++template ++struct char_traits_base ++{ ++ using char_type = CharType; ++ using int_type = IntType; ++ using off_type = streamoff; ++ using pos_type = fpos; ++ using state_type = mbstate_t; ++ ++ static inline constexpr void assign(char_type& c1, const char_type& c2) noexcept ++ { ++ c1 = c2; ++ } ++ ++ static inline constexpr bool eq(char_type c1, char_type c2) noexcept ++ { ++ return c1 == c2; ++ } ++ ++ static inline constexpr bool lt(char_type c1, char_type c2) noexcept ++ { ++ return c1 < c2; ++ } ++ ++ static constexpr int compare(const char_type* lhs, const char_type* rhs, size_t count) noexcept ++ { ++ for (; count; --count, ++lhs, ++rhs) ++ { ++ if (lt(*lhs, *rhs)) ++ return -1; ++ if (lt(*rhs, *lhs)) ++ return 1; ++ } ++ return 0; ++ } ++ ++ static inline size_t constexpr length(const char_type* s) noexcept ++ { ++ size_t i = 0; ++ for (; s[i] != '\0'; ++i) ++ { ++ } ++ return i; ++ } ++ ++ static constexpr const char_type* find(const char_type* s, size_t n, const char_type& a) noexcept ++ { ++ for (; n; --n) ++ { ++ if (*s == a) ++ return s; ++ ++s; ++ } ++ return nullptr; ++ } ++ ++ static inline char_type* move(char_type* s1, const char_type* s2, size_t n) noexcept ++ { ++ return reinterpret_cast(__builtin_memmove(s1, s2, n * sizeof(char_type))); ++ } ++ ++ static inline char_type* copy(char_type* s1, const char_type* s2, size_t n) noexcept ++ { ++ __builtin_memmove(s1, s2, n * sizeof(char_type)); ++ return s1; ++ } ++ ++ static inline char_type* assign(char_type* s, size_t n, char_type a) noexcept ++ { ++ std::fill_n(s, n, a); ++ return s; ++ } ++ ++ static inline constexpr int_type not_eof(int_type c) noexcept ++ { ++ return eq_int_type(c, eof()) ? ~eof() : c; ++ } ++ ++ static inline constexpr char_type to_char_type(int_type c) noexcept ++ { ++ return char_type(c); ++ } ++ ++ static inline constexpr int_type to_int_type(char_type c) noexcept ++ { ++ return int_type(c); ++ } ++ ++ static inline constexpr bool eq_int_type(int_type c1, int_type c2) noexcept ++ { ++ return c1 == c2; ++ } ++ ++ static inline constexpr int_type eof() noexcept ++ { ++ return int_type(EOF); ++ } ++}; ++ ++} // namespace anonymous ++ ++template<> ++struct char_traits : char_traits_base(EOF)> ++{ ++}; ++ ++template<> ++struct char_traits : char_traits_base(0xFFFF)> ++{ ++}; ++ ++template<> ++struct char_traits : char_traits_base(0xFFFFFFFF)> ++{ ++}; ++ ++} // namespace std ++ ++ + namespace sf + { + ////////////////////////////////////////////////////////////