diff options
author | brahmajit das <listout@protonmail.com> | 2022-08-23 14:55:51 +0530 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-01 03:05:26 +0100 |
commit | 855ef95061367779af0f38f7afd291af21616403 (patch) | |
tree | 0bf821f6f00c0f5666820131a115eef2dca24d12 /media-libs/opencolorio | |
parent | sys-libs/libhugetlbfs: fix musl build errors (diff) | |
download | gentoo-855ef95061367779af0f38f7afd291af21616403.tar.gz gentoo-855ef95061367779af0f38f7afd291af21616403.tar.bz2 gentoo-855ef95061367779af0f38f7afd291af21616403.zip |
media-libs/opencolorio: Fix strtol_l on musl
Fix strtol_l missing on musl. On musl libc use strtol
Taken from Alpine Linux, please refer:
https://git.alpinelinux.org/aports/tree/community/opencolorio/0002-fix-strtol.patch
Closes: https://bugs.gentoo.org/829453
Signed-off-by: brahmajit das <listout@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26855
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/opencolorio')
-rw-r--r-- | media-libs/opencolorio/files/opencolorio-2.1.2-musl-strtol.patch | 27 | ||||
-rw-r--r-- | media-libs/opencolorio/opencolorio-2.1.2.ebuild | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/media-libs/opencolorio/files/opencolorio-2.1.2-musl-strtol.patch b/media-libs/opencolorio/files/opencolorio-2.1.2-musl-strtol.patch new file mode 100644 index 000000000000..87059614ff03 --- /dev/null +++ b/media-libs/opencolorio/files/opencolorio-2.1.2-musl-strtol.patch @@ -0,0 +1,27 @@ +# Fix strtol_l missing on musl. On musl libc use strtol +# Taken from Alpine Linux, please refer: +# https://git.alpinelinux.org/aports/tree/community/opencolorio/0002-fix-strtol.patch?id=dd7ba461824ab0618f0493cbb450b221fdc2513c +# Please refer: https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1624 +--- a/src/utils/NumberUtils.h ++++ b/src/utils/NumberUtils.h +@@ -68,7 +68,7 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + tempval = ::strtod_l(first, &endptr, loc.local); + #endif + +- if (errno != 0) ++ if (errno != 0 && errno != EINVAL) + { + return {first + (endptr - first), std::errc::result_out_of_range}; + } +@@ -139,8 +139,10 @@ really_inline from_chars_result from_chars(const char *first, const char *last, + long int + #ifdef _WIN32 + tempval = _strtol_l(first, &endptr, 0, loc.local); +-#else ++#elif defined(__GLIBC__) + tempval = ::strtol_l(first, &endptr, 0, loc.local); ++#else ++ tempval = ::strtol(first, &endptr, 0); + #endif + + if (errno != 0) diff --git a/media-libs/opencolorio/opencolorio-2.1.2.ebuild b/media-libs/opencolorio/opencolorio-2.1.2.ebuild index 17b4b7fb8e1f..eda322b00de6 100644 --- a/media-libs/opencolorio/opencolorio-2.1.2.ebuild +++ b/media-libs/opencolorio/opencolorio-2.1.2.ebuild @@ -55,6 +55,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}"/${PN}-2.1.1-gcc12.patch + "${FILESDIR}"/${PN}-2.1.2-musl-strtol.patch ) pkg_setup() { |