summaryrefslogtreecommitdiff
path: root/devel/sfml
diff options
context:
space:
mode:
Diffstat (limited to 'devel/sfml')
-rw-r--r--devel/sfml/Makefile8
-rw-r--r--devel/sfml/distinfo6
-rw-r--r--devel/sfml/files/patch-include_SFML_System_String.hpp134
-rw-r--r--devel/sfml/pkg-plist20
4 files changed, 151 insertions, 17 deletions
diff --git a/devel/sfml/Makefile b/devel/sfml/Makefile
index 1f4725c6abd4..6de899d3aaaf 100644
--- a/devel/sfml/Makefile
+++ b/devel/sfml/Makefile
@@ -1,6 +1,5 @@
PORTNAME= SFML
-PORTVERSION= 2.6.1
-PORTREVISION= 1
+DISTVERSION= 2.6.2
CATEGORIES= devel
MAINTAINER= amdmi3@FreeBSD.org
@@ -11,8 +10,6 @@ WWW= https://www.sfml-dev.org/ \
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
@@ -23,6 +20,9 @@ CONFLICTS= sfml251
PORTDATA= *
PORTDOCS= *
+PLIST_SUB= LONGVERSION=${DISTVERSION} \
+ SHORTVERSION=${DISTVERSION:R}
+
OPTIONS_DEFINE= DOCS DOXYGEN
OPTIONS_GROUP= MODULES
OPTIONS_GROUP_MODULES= AUDIO GRAPHICS NETWORK WINDOW
diff --git a/devel/sfml/distinfo b/devel/sfml/distinfo
index 96bc007dc613..8d0b3b95beec 100644
--- a/devel/sfml/distinfo
+++ b/devel/sfml/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1717434619
-SHA256 (SFML-SFML-2.6.1_GH0.tar.gz) = 82535db9e57105d4f3a8aedabd138631defaedc593cab589c924b7d7a11ffb9d
-SIZE (SFML-SFML-2.6.1_GH0.tar.gz) = 25499153
+TIMESTAMP = 1731608442
+SHA256 (SFML-SFML-2.6.2_GH0.tar.gz) = 15ff4d608a018f287c6a885db0a2da86ea389e516d2323629e4d4407a7ce047f
+SIZE (SFML-SFML-2.6.2_GH0.tar.gz) = 28624288
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 <string>
+
+
++namespace std
++{
++
++namespace // anonymous
++{
++
++template<class CharType, class IntType, IntType EOFVal>
++struct char_traits_base
++{
++ using char_type = CharType;
++ using int_type = IntType;
++ using off_type = streamoff;
++ using pos_type = fpos<mbstate_t>;
++ 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<char_type*>(__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<unsigned char> : char_traits_base<unsigned char, unsigned int, static_cast<unsigned int>(EOF)>
++{
++};
++
++template<>
++struct char_traits<unsigned short> : char_traits_base<unsigned short, unsigned int, static_cast<unsigned int>(0xFFFF)>
++{
++};
++
++template<>
++struct char_traits<unsigned int> : char_traits_base<unsigned int, unsigned int, static_cast<unsigned int>(0xFFFFFFFF)>
++{
++};
++
++} // namespace std
++
++
+ namespace sf
+ {
+ ////////////////////////////////////////////////////////////
diff --git a/devel/sfml/pkg-plist b/devel/sfml/pkg-plist
index 9ea258788869..c40d1217fe01 100644
--- a/devel/sfml/pkg-plist
+++ b/devel/sfml/pkg-plist
@@ -113,20 +113,20 @@ lib/cmake/SFML/SFMLConfigVersion.cmake
lib/cmake/SFML/SFMLSharedTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/SFML/SFMLSharedTargets.cmake
%%AUDIO%%lib/libsfml-audio.so
-%%AUDIO%%lib/libsfml-audio.so.2.6
-%%AUDIO%%lib/libsfml-audio.so.2.6.1
+%%AUDIO%%lib/libsfml-audio.so.%%SHORTVERSION%%
+%%AUDIO%%lib/libsfml-audio.so.%%LONGVERSION%%
%%GRAPHICS%%lib/libsfml-graphics.so
-%%GRAPHICS%%lib/libsfml-graphics.so.2.6
-%%GRAPHICS%%lib/libsfml-graphics.so.2.6.1
+%%GRAPHICS%%lib/libsfml-graphics.so.%%SHORTVERSION%%
+%%GRAPHICS%%lib/libsfml-graphics.so.%%LONGVERSION%%
%%NETWORK%%lib/libsfml-network.so
-%%NETWORK%%lib/libsfml-network.so.2.6
-%%NETWORK%%lib/libsfml-network.so.2.6.1
+%%NETWORK%%lib/libsfml-network.so.%%SHORTVERSION%%
+%%NETWORK%%lib/libsfml-network.so.%%LONGVERSION%%
lib/libsfml-system.so
-lib/libsfml-system.so.2.6
-lib/libsfml-system.so.2.6.1
+lib/libsfml-system.so.%%SHORTVERSION%%
+lib/libsfml-system.so.%%LONGVERSION%%
%%WINDOW%%lib/libsfml-window.so
-%%WINDOW%%lib/libsfml-window.so.2.6
-%%WINDOW%%lib/libsfml-window.so.2.6.1
+%%WINDOW%%lib/libsfml-window.so.%%SHORTVERSION%%
+%%WINDOW%%lib/libsfml-window.so.%%LONGVERSION%%
libdata/pkgconfig/sfml-all.pc
%%AUDIO%%libdata/pkgconfig/sfml-audio.pc
%%GRAPHICS%%libdata/pkgconfig/sfml-graphics.pc