wsddn: fixing build breaks

* Corrected logic for libc++ on darwin 11-18. This fixes builds on Mojave and High Sierra
* Added a patch to enable compilation on 32-bit. This fixes i386
* Blocked darwin < 10. The product uses Apple frameworks unavailable before Snow Leopard
This commit is contained in:
Eugene Gershnik
2026-07-10 17:22:00 -07:00
committed by Ryan Carsten Schmidt
parent 225a2d0d0c
commit b01e52f394
2 changed files with 28 additions and 11 deletions
+8 -11
View File
@@ -16,6 +16,7 @@ long_description Allows your Mac to be discovered by systems running Wind
or later and to appear in their Explorer \"Network\" view.
license BSD
installs_libs no
platforms {darwin >= 10}
github.tarball_from releases
distname wsddn-src-prefetch-${github.version}
@@ -27,14 +28,12 @@ checksums rmd160 8151bee28c6ba30a3b5e33c9ebed690baa02074b \
worksrcdir wsdd-native-${github.version}
compiler.cxx_standard 2020
compiler.c_standard 2011
patchfiles patch-fmt-uint128-operator-not.diff
# By default, we do not need legacysupport at least as far back as Snow Leopard
legacysupport.newest_darwin_requires_legacy 9
if {${os.major} < 10} {
# Use consistent version of libstdc++ on old ppc systems.
legacysupport.redirect_bins wsddn
} elseif {${os.major} == 10} {
if {${os.major} == 10} {
# Snow Leopard (10.6) has broken ld that crashes on modern clang's Mach-O output.
# Build with gcc and its own libstdc++, whose output the old linker handles.
compiler.blacklist-append *clang*
@@ -44,16 +43,14 @@ if {${os.major} < 10} {
# Use consistent version of libstdc++ on 10.6 ppc
legacysupport.redirect_bins wsddn
}
} elseif {${os.major} < 19 && ${configure.cxx_stdlib} eq "libc++"} {
} elseif {${os.major} < 19 && [regexp {^macports-clang-(\d+)$} ${configure.compiler} -> llvmver]} {
# Neither system libc++ before 10.15 nor the libc++ provided by legacysupport
# have sufficient C++20 support. Use the llvm provided libc++ version.
# The llvm libc++ needs legacysupport.
# have sufficient C++20 support. Use the clang's own libc++ version.
# That libc++ needs legacysupport.
legacysupport.newest_darwin_requires_legacy 18
set llvmver 16
depends_lib-append port:llvm-${llvmver}
# The availability annotations are bogus for the llvm-16 libc++
# The availability annotations are bogus for the non-system libc++
configure.cxxflags-append -D_LIBCPP_DISABLE_AVAILABILITY=1
configure.cxxflags-append -nostdinc++ -isystem ${prefix}/libexec/llvm-${llvmver}/include/c++/v1
configure.ldflags-append -nostdlib++ -L${prefix}/libexec/llvm-${llvmver}/lib/libc++ -Wl,-rpath,${prefix}/libexec/llvm-${llvmver}/lib/libc++ -lc++ -lc++abi
@@ -174,7 +171,7 @@ Daemon logs are located in /var/log/wsddn.log"
}
notes-append "
To customize ${name}, you can edit ${prefix}/etc/wsddn.conf.
To customize ${name}, you can edit ${prefix}/etc/wsddn.conf
An up-to-date sample is provided in ${prefix}/etc/wsddn.conf.sample
${loginfo}
"
@@ -0,0 +1,20 @@
Add the missing operator~ to fmt's software uint128 fallback.
On targets without a native __int128 (e.g. i386), fmt uses its own uint128
class instead of __uint128_t. format_hexfloat() does `f.f &= ~(inc - 1);`,
but the fallback class never defines operator~, so the build fails with
"no match for 'operator~' (operand type is 'fmt::v12::detail::uint128')".
--- external/fmt/include/fmt/format.h.orig
+++ external/fmt/include/fmt/format.h
@@ -531,6 +531,9 @@
friend constexpr auto operator&(const uint128& lhs, const uint128& rhs)
-> uint128 {
return {lhs.hi_ & rhs.hi_, lhs.lo_ & rhs.lo_};
}
+ friend constexpr auto operator~(const uint128& n) -> uint128 {
+ return {~n.hi_, ~n.lo_};
+ }
friend FMT_CONSTEXPR auto operator+(const uint128& lhs, const uint128& rhs)
-> uint128 {
auto result = uint128(lhs);