Download raw body.
opencolorio build "fix" for libc++19
I don't really know what the patch to NumberUtils.h in opencolorio is
about. I also don't really know why it works with -current and not with
libc++19 (there's some locale-related weirdness in that update).
This fixes the build, and likely only the last hunk is needed. This
also builds with -current. Leaving that here so that someone with more
interest in this port can pick it up, think about it and commit a
correct version of it.
In file included from /usr/obj/ports/opencolorio-2.4.2/OpenColorIO-2.4.2/src/OpenColorIO/fileformats/xmlutils/XMLReaderUtils.h:17:
/usr/obj/ports/opencolorio-2.4.2/OpenColorIO-2.4.2/src/utils/../utils/NumberUtils.h:237:17: error: no member named 'strtol_l' in the global namespace; did you mean 'strtoll_l'?
237 | tempval = ::strtol_l(first, &endptr, 0, loc.local);
| ~~^
/usr/include/c++/v1/__support/xlocale/__strtonum_fallback.h:37:40: note: 'strtoll_l' declared here
37 | inline _LIBCPP_HIDE_FROM_ABI long long strtoll_l(const char* __nptr, char** __endptr, int __base, locale_t) {
| ^
1 error generated.
Index: patches/patch-src_utils_NumberUtils_h
===================================================================
RCS file: /cvs/ports/graphics/opencolorio/patches/patch-src_utils_NumberUtils_h,v
diff -u -p -r1.9 patch-src_utils_NumberUtils_h
--- patches/patch-src_utils_NumberUtils_h 29 May 2025 23:46:23 -0000 1.9
+++ patches/patch-src_utils_NumberUtils_h 3 Jul 2025 08:33:22 -0000
@@ -6,7 +6,7 @@ Index: src/utils/NumberUtils.h
#ifdef _WIN32
tempval = _strtod_l(first, &endptr, loc.local);
-#else
-+#elif defined(__GLIBC__) || defined(_LIBCPP_VERSION)
++#elif defined(__GLIBC__)
tempval = ::strtod_l(first, &endptr, loc.local);
+#else
+ tempval = ::strtod(first, &endptr);
@@ -18,7 +18,7 @@ Index: src/utils/NumberUtils.h
// On OSX, strtod_l is for some reason drastically faster than strtof_l.
tempval = static_cast<float>(::strtod_l(first, &endptr, loc.local));
-#else
-+#elif defined(__GLIBC__) || defined(_LIBCPP_VERSION)
++#elif defined(__GLIBC__)
tempval = ::strtof_l(first, &endptr, loc.local);
+#else
+ tempval = ::strtof(first, &endptr);
@@ -30,7 +30,7 @@ Index: src/utils/NumberUtils.h
#ifdef _WIN32
tempval = _strtol_l(first, &endptr, 0, loc.local);
-#elif defined(__GLIBC__)
-+#elif defined(__GLIBC__) || defined(_LIBCPP_VERSION)
++#elif defined(__GLIBC__)
tempval = ::strtol_l(first, &endptr, 0, loc.local);
#else
tempval = ::strtol(first, &endptr, 0);
opencolorio build "fix" for libc++19