pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/openimageio
Module Name: pkgsrc
Committed By: ryoon
Date: Sun Oct 15 19:52:09 UTC 2023
Modified Files:
pkgsrc/graphics/openimageio: Makefile PLIST buildlink3.mk distinfo
pkgsrc/graphics/openimageio/patches: patch-src_cmake_compiler.cmake
Added Files:
pkgsrc/graphics/openimageio/patches:
patch-src_include_OpenImageIO_strutil.h
patch-src_libutil_strutil.cpp
Log Message:
openimageio: Update to 2.5.4.0
Changelog:
Release 2.5 (2.5.4.0, Oct 1, 2023) -- compared to 2.4
New minimum dependencies and compatibility changes:
CMake: minimum needed to build OpenImageIO has been raised from 3.12 to
3.15. #3924 (2.5.2.1)
LibRaw: minimum has ben raised from 0.15 to 0.18.
#3921 (2.5.2.1)
The new OpenEXR minimum is 2.4 (raised from 2.3).
#3928 (2.5.2.1)
The new fmt library minimum is 7.0 (raised from 6.1)
#3973 (2.5.3.0)
The new libjpeg-turbo (if used; it is optional) has been raised to
2.1. #3987 (2.5.3.1-beta2)
️ New features and public API changes:
TextureSystem color management: #3761 (2.5.1.0)
TextureOpt and TextureOptBatch have a new field, colortransformid,
which supplies an integer ID for a requested color space transformation
to be applied as texture tiles are read. The default value 0 means no
transformation because the texture is presumed to be in the working
color space (this is the old behavior, and most performant). Tiles from
the same texture file but using different color transformations are
allowed and will not interfere with each other in the cache.
New TextureSystem::get_colortransform_id(from, to) maps from/to named
color spaces to a color transform ID that can be passed to texture
lookup calls.
ImageCache::get_image_handle and TextureSystem::get_texture_handle
now take an optional TextureOpt* parameter that can supply additional
constraints (such as color transformation) that TS/IC implementations
may wish to split into separate handles. This is currently not used, but
is reserved so that the API doesn't need to be changed if we use it in
the future.
texture.h defines symbol OIIO_TEXTURESYSTEM_SUPPORTS_COLORSPACE that
can be tested for existence to know if the new fields are in the
TextureOpt structure.
Extensive support for OpenColorIO 2.2 functionality and improved color
management:
When building against OCIO 2.2, you can specify/use the new "built-in"
configs, including using ocio://default, which will automatically be
usd if no config is specified and the $OCIO variable is not set #3662
#3707 (2.5.0.0)
OIIO tries to find and honor the common color space aliases
"scene_linear", "srgb", "lin_srgb", and "ACEScg". When building against
OCIO 2.2+, it will know which of any config's color spaces are
equivalent to these, even if they are named something totally different,
thanks to the magic of OCIO 2.2 built-in configs. For older OCIO (2.1 or
older), it is less robust and may have to make best guesses based on the
name of the color spaces it finds. #3707 (2.5.0.0)
#3995 (2.5.3.2-rc1)
New ColorConfig methods: getAliases() #3662; isColorSpaceLinear()
#3662; resolve(name) turns any color space name, alias, role, or OIIO
name (like "sRGB") into a canonical color space name;
equivalent(n1,n2) returns true if it can tell that the two names
refer, ultimately, to equivalent color spaces #3707 (2.5.0.0)
New ImageSpec::set_colorspace() method is a more thorough way to set
the color space data than simply setting the "oiio:ColorSpace" metadata
(though it also does that). #3734 (2.5.0.1)
Improve OIIO's ability to guess which of the config's color space names
are aliases for common spaces such as srgb, lin_srgb, and acescg (quite
robustly if using OCIO >= 2.2, even for totally nonstandard names in the
config). #3755 (2.5.0.1)
New ColorConfig::getColorSpaceIndex() looks up a color space index by
its name, alias, or role. #3758 (2.5.0.1)
oiiotool new commands and features:
New --iccread and --iccwrite add an ICC profile from an external
file to the metadata of an image, or extract the ICC profile metadata
and save it as a separate file. #3550 (2.5.0.0)
New --parallel-frames parallelizes execution over a frame range rather
than over regions within each image operation. This should be used with
caution, as it will give incorrect results for an oiiotool command line
involving a frame range where the iterations have a data dependency on
each other and must be executed in order. But in cases where the order
of frame processing doesn't matter and there are many more frames in the
sequence than cores, you can get a substantial performance improvement
using this flag. #3849 (2.5.2.0)
New --no-error-exit causes an error to not exit immediately, but
rather to try to execute the remaining command line operations. This is
intended primarily for unit tests and debugging. #3643 (2.5.0.0)
New --colorconfiginfo prints the full inventory of color management
information, including color space aliases, roles, and with improved
readability of output for larger configs. #3707 (2.5.0.0)
The --resize command takes new optional :from=, :to=, and
:edgeclamp= modifiers to give more general and fine control over the
specific correspondence between display windows in the input image and
resized destination image (including allowing partial pixel offsets).
#3751 #3752 (2.5.0.1)
New expression substitution additions:
New syntax for retrieving metadata {TOP[foo]} is similar to the
existing {TOP.foo}, if there is no foo metadata found, the
former evaluates to an empty string, whereas the latter is an error.
#3619 (2.4.5/2.5.0.0)
{NIMAGES} gives current stack depth
#3822 (2.5.2.0)
{nativeformat} is the pixel data format of the file, whereas the
existing format has always returned the data type used in memory.
Also, METANATfull metadata
keywords for native file metadata, comapred to the previously
existing META and METABRIEF which we now clarify reflect the
in-memory representation. #3639 (2.5.0.0)
--ociodisplay now takes an optio (2.5.0.0)
New -otex optional modifier forcefloat=0 can improve memory use for
enormous texture conversion.
#3829 (2.5.2.0)
--printinfo now takes new optional modifiers: :native=1 ensures
that the metadata printed the file, not changed by the way the
image is stored in memory (for example, it may have been converted to
a more convenient in-memory data type); :verbose=1 prints verbose
stats even if -v is not used; :stats=1 prints full pixel ul for normal maps.
#3945 (by Vlad (Kuzmin) Erium) (2.5.3.0)
ImageBufAlgo additions:
A new flavor of ociodisplay() now contains an inverse parameter.
#3650 (2.5.0.0)
New normalize() normalizes image that represent 3D vehelpful for normal maps.
#3945 (by Vlad (Kuzmin)
Erium) #3963 (2.5.3.0)
ImageBuf changes:
ImageBuf: Only back IB with IC when passed an IC
#3986 (2.5.3.1-beta2)
ImageInput / ImageOutput:
New ImageOutput::check_open() method can be used by format writers
authors to centralize certain validity tests so they don't need to be
implemented separately for each file type. This is not meant to be
called by client application code, only by format writer authors. #3686
(2.5.0.0)
Add an ImageInput::valid_file(IOProxy) overload
#3826 (by Jesse Y)
(2.5.2.0) and implement its overloads for DDS, PSD, and WEBP
#3831 (by Jesse Y)
(2.5.2.0)
New ImageOutput::check_open() and ImageInput::open_check() can be
used by format reader/writer authors to centralize certain validity
tests so they don't need to be implemented separately for each file
type. This is not meant to be called by client application code, only by
format reader/writer authors.
#3686 (2.5.0.0)
#3967 (2.5.3.0)
ImageInput: Add an ImageInput::valid_file(IOProxy) overload
#3826 (by Jesse Y) (2.5.2.0)
ImageInput: Implement valid_file(IOProxy) overloads for DDS, PSD, and
WEBP #3831 (by Jesse
Y) (2.5.2.0)
New top-level namespace OIIO functions:
OIIO::shutdown() method #3882 (by Ray Molenkamp)
OIIO::default_thread_pool_shutdown() #2382
OIIO::print() exposes Strutil::print() in the main OIIO namespace.
#3667 (2.4.6/2.5.0.0)
OIIO::getattribute() new queries:
font_list, font_file_list, font_dir_list return, respectively, the
list of fonts that OIIO found, the list of full paths to font files, and
the list of directories searched for fonts. All return a single string
that is a semicolon-separated list of the items. #3633 (2.5.0.0)
opencolorio_version returns the human-readable (e.g. "2.2.0") version
of OpenColorIO that is being used. #3662 (2.5.0.0)
Python bindings:
Implement ImageCache.get_imagespec() #3982 (2.5.3.1-beta2)
IOProxy support for additional file formats: SGI #3641, RLA #3642, IFF #3647
(2.5.0.0), ICO input #3919
(by jasonbaumeister) (2.5.2.0)
Remove long deprecated/nonfunctional C API headers #3567
Performance improvements:
Fixed some ImageBuf and IBA internals to avoid unnecessary/redundant zeroing
out of newly allocated buffer memory. #3754 (2.5.0.1)
oiiotool: --parallel-frames parallelizes execution over a frame
range rather than over regions within each image operation.
#3849 (2.5.2.0)
psd: Improve memory efficiency of PSD read
#3807 (2.5.2.0)
Improvements to performance and memory when making very large textures
#3829 (2.5.2.0)
OpenEXR: Change to using exr-core for reading by default #3788
TextureSystem: Improve texture lookup performance by remove redundant
instructions from tile hash #3898 (by Curtis Black) (2.5.2.0)
oiiotool: --mosaic improvements to type conversion avoid unnecessary
copies and format conversions. #3979 (2.5.3.1-beta2)
Fixes and feature enhancements:
ImageInput: fix typo in debug output #3956 (by Jesse Yurkovich)
Python bindings:
Add ability to getattribute() of int64 and uint64 data #3555 (2.5.0.0)
Fixed ability to add and retrieve uint8[] metadata, which on the
python side will be numpy arrays of type uint8 (dtype='B'). This is
important for being able to set and retrieve "ICCProfile" metadata.
#3556 (2.5.0.0)
Eliminate redundant code in Python IBA bindings #3615
Improve error messages for when passing incorrect python array sizes.
#3801 (2.5.1.0)
Fix arithmetic overflow in oiio_bufinfo (Python interop) #3931 (by Jesse Yurkovich) (2.5.2.0)
ImageBuf improvements:
Fixes to subtle bugs when ImageBuf is used with IOProxy. #3666
(2.4.6/2.5.0.0)
Auto print uncaught ImageBuf errors. When an IB is destroyed, any errors
that were never retrieved via geterror() will be printed, to aid users
who would not notice the errors otherwise.
#3949 (2.5.3.0)
oiiotool now does immediate reads without relying on an ImageCache,
unless the --cache option is used, which now both enables the use of
an underlying IC as well as setting its size.
#3986 (2.5.3.1-beta2)
ImageBufAlgo improvements:
IBAPrep should not zero out deep images when creating a new destination
image. #3724 (2.5.0.0/2.4.8.0)
Improve error message for IBA::ocio functions #3887
UTF-8 text rendering fixes #3935
(by Nicolas) (2.5.3.0)
make_texture() / maketx / TextureSystem / ImageCache:
Ensure proper setting of certain metadata when using a texture as a
source to build another texture. #3634 (2.4.5/2.5.0.0)
Minor improvements in statistics printing for IC. #3654 (2.5.0.0)
When creating a texture, don't overwrite an existing DateTime metadata
in the source file. #3692 (2.5.0.0)
Fix environment mapping in batch mode when >4 channels are requested in
a lookup. #3694 (2.5.0.0)
Fixed maketx --lightprobe, which never worked properly for images
that weren't float pixel data type. #3732 (2.5.0.0/2.4.7.0)
Fix bad handling of maketx --cdf, which was trying to take an extra
command line argument that it didn't need. #3748 (2.5.0.1)
Improve IC statistics appearance by omitting certain meaningless stats
when no files wer
scenarios with very high thread contention. #3784 (2.4.10.0/2.5.0.3)
maketx and oiiotool --otex: Add support for CDFs of bumpslopes channels.
Previously, if you used both --bumpslopes and --cdf at the same time,
the CDFs we) is used, and when an error occurs, only print the
error message and not the full help message. #3649 (2.5.0.0)
Fix problems with --point when there is no alpha channel. #3684
(2.4.6/2.5.0.0)
--dumpdata fix channel name od config file). Use the new --colorconfiginfo argument
to print the full color management information, which is both more
readable and more detailed than what --help used to print. #3707
(2.5.0.0)
Don't propagate unsupporte�ius)
ICC Profiles found in JPEG, JPEG-2000, PSN, PSD, and TIFF files are now
examined and several key fields are extracted as separate metadata. #3554
(2.5.0.0)
Various protections against corrupted files #3954 (2.5.3.0)
BMP:
Fix reading 16bpp images. #3592 (by Aras Pranckevičius) (2.4.5/2.5.0.0)
Protect against corrupt pixel coordinates. (TALOS-2022-1630,
CVE-2022-38143) #3620 (2.4.5/2.5.0.0)
Fix possible write errors, fixes TALOS-2022-1653 / CVE-2022-43594,
CVE-2022-43595. #3673 (2.4.6/2.5.0.0)
Mark color space as sRGB, which seems likely to be true of any BMP
files anybody encounters. #3701 (2.5.0.0)
Fix signed integer overflow when computing total number of pixels
#3948 (by xiaoxiaoafeifei) (2.5.3.0)
DDS:
Fix heap overflow in DDS input. #3542 (2.5.0.0)
Improved support for DTX5, ATI2/BC5 normal maps, R10G10B10A2
format, RXGB, BC4U, BC5U, A8, improved low bit expansion to 8 bits.
#3573
(by Aras Pranckevičius)(2.4.4.2/2.5.0.0)
Fix alpha/luminance files, better testing. #3581 (by Aras Pranckevičius) (2.4.5/2.5.0.0)
Optimize loading of compressed images, improves 3-5x. #3583 (by Aras Pranckevičius) #3584
(2.4.5/2.5.0.0)
Honor ImageInput thread policy #3584
Fix crashes for cubemap files when a cube face was not present, and
check for invalid bits per pixel. (TALOS-2022-1634, CVE-2022-41838)
(TALOS-2022-1635, CVE-2022-41999) #3625 (2.4.5/2.5.0.0)
(TALOS-2022-1635, CVE-2022-41999) #3625 (2.4.5/2.5.0.0)
Fix divide-by-0 during DXT4 DDS load #3959 (by Jesse Yurkovich) (2.5.3.0)
DPX:
Fix possible write errors, fixes TALOS-2022-1651 / CVE-2022-43592 and
TALOS-2022-1652 / CVE-2022-43593. #3672 (2.4.6/2.5.0.0)
FITS:
Ensure that the file is closed if open fails to find the right magic
number. #3771 (2.5.1.0)
GIF:
Fix potential array overrun when writing GIF files. #3789
(2.4.10.0/2.5.1.0)
Prevent heap-buffer-overflow
#3841 (2.5.2.0) (by
xiaoxiaoafeifei)
HEIC:
Support the ".hif" extension, which seems to be used by some Canon
cameras instead of .heif.
#3813(by AdamMainsTL)
HDR:
Fix a 8x (!) read performance regression for HDR files that was
introduced in OIIO in 2.4. On top of that, speed up by another 4x beyond
what we ever did before by speeding up the RGBE->float conversion.
#3588 #3590
(by Aras Pranckevičius) (2.4.5/2.5.0.0)
ICO:
Heap-buffer-overflow #3872 (by xiaoxiaoafeifei) Fixes CVE-2023-36183.
IFF:
Protect against 0-sized allocations. #3603 (2.5.0.0)
IOProxy support. #3647 (2.4.6/2.5.0.0)
FIXME Temporarily disable IOProxy support to avoid bugs in #3760
(2.5.0.1)
Fix possible write errors, fixes TALOS-2022-1654 / CVE-2022-43596,
TALOS-2022-1655 / CVE-2022-43597 CVE-2022-43598, TALOS-2022-1656 /
CVE-2022-43599 CVE-2022-43600 CVE-2022-43601 CVE-2022-43602 #3676
(2.4.6/2.5.0.0)
Catch possible exception, identified by static analysis #3681
JPEG
jpeg: Fix density calculation for jpeg output
#3861 (2.5.2.0) (by
Loïc Vital)
JPEG2000:
Better pixel type promotion logic #3878 (2.5.2.0)
OpenEXR:
Fix potential use of uninitialized value when closing. #3764 (2.5.0.1)
Try to improve exr thread pool weirdness
#3864 (2.5.2.0)
Controlled shutdown of IlmThread pool in all apps in which we use it.
#3805 (2.5.2.0)
Correction to dwa vs zip logic when outputting OpenEXR #3884 (2.5.2.0)
Enable openexr core library by default when recent enough
#3942 (2.5.3.0)
PBM:
Fix accidental inversion for 1-bit bitmap pbm files. #3731
(2.5.0.0/2.4.8.0)
PNG:
Fix memory leaks for error conditions. #3543 #3544 (2.5.0.0)
Add EXIF write support to PNG output. #3736 (by Joris Nijs) (2.5.0.1)
Write out proper tiff header version in png EXIF blobs
#3984 (by Jesse
Yurkovich) (2.5.3.1-beta2)
A variety of minor optimizations to the PNG writer
#3980 (2.5.3.2-rc1)
Improve PNG write data quality when alpha is low
#3985 (2.5.3.2-rc1)
PSD:
Fix a PSD read error on ARM architecture. #3589 (2.4.5/2.5.0.0)
Protect against corrupted embedded thumbnails. (TALOS-2022-1626,
CVE-2022-41794) #3629 (2.4.5/2.5.0.0)
Fix thumbnail extraction. #3668 (2.4.6/2.5.0.0)
When reading, don't reject padded thumbnails. #3677 (2.4.6/2.5.0.0)
Fix wrong "oiio:UnassociatedAlpha" metadata. #3750 (2.5.0.1)
Handle very wide images with more than 64k resolution in either
direction. #3806 (2.5.1.0/2.4.11)
Improve memory efficiency of PSD read #3807 (2.5.2.0)
Prevent simultaneous psd thumbnail reads from clashing #3877
CMYK PSD files now copy alpha correctly #3918 (by jasonbaumeister) (2.5.2.0)
RAW:
Add color metadata: pre_mul, cam_mul, cam_xyz, rgb_cam. #3561 #3569
#3572 (2.5.0.0)
Update Exif orientation if user flip is set. #3669 (2.4.6/2.5.0.0)
Correctly handle 1-channel raw images. #3798 (2.5.1.0/2.4.11.0)
Fix LibRaw flip to Exif orientation conversion
#3847
#3858 (2.5.2.0) (by
Loïc Vital)
RLA:
Fix potential buffer overrun. (TALOS-2022-1629, CVE-2022-36354) #3624
( Fix possible invalid read from an empty vector during RLA load
#3960 (by Jesse Yurkovich) (2.5.3.0)
SGI:
IOProxy support. #3641 (2.5.0.0)
Targa:
Fix incorrect unique_ptr allocation. #3541 (2.5.0.0)
Fix string ovted tga files Fixes TALOS-2023-1707 /
CVE-2023-24473, TALOS-2023-1708 / CVE-2023-22845. #3768 (2.5.1.0/2.4.8.1)
TIFF:
Guard against corrupt files with buffer overflows. (TALOS-2022-1627,
CVE-2022-41977) #3628 (2.4.5/2.5.0.0)
#3632 (2.4.5/2.5.0.0)
While building against the new libtiff 4.5, use its new per-tiff error
handlers to ensure better thread safety. #3719 (2.5.0.0/2.4.8.0)
Better logic for making TIFF PhotometricInterpretation tag and
oiio:ColorSpace metadata correspond to each other correctly for TIFF
files. #3746 (2.5.0.1)
Fix: race condition in TIFF reader, fixes TALOS-2023-1709 /
CVE-2023-24472. #3772 (2.5.1.0/2.4.8.1)
Disable writing TIFF files with JPEG compression -- it never worked
properly and we can't seem to fix it. The fact that nobody noticed that
it never worked is taken as evidence that nobody needs it. If asked for,
it just uses the default ZIP compression instead. The TIFF reader can
still read JPEG-compressed TIFF files just fine, it's only writing that
appears problematic. #3791 (2.5.0.4)
Zfile:
Zfile write safety, fixes TALOS-2022-1657 / CVE-2022-43603. #3670
(2.4.6/2.5.0.0)
Exif (all formats that support it, TIFF/JPEG/PSD):
Fix EXIF bugs where corrupted exif blocks could overrun memory.
(TALOS-2022-1626, CVE-2022-41794) (TALOS-2022-1632, CVE-2022-41684)
(TALOS-2022-1636 CVE-2022-41837) #3627 (2.4.5/2.5.0.0)
Fix typo that prevented us from correctly naming Exif
"CameraElevationAngle" metadata.
#3783 (by Fabien
Castan) (2.4.10.0/2.5.1.0)
Convert paramvalue string to integer when needed #3886 (by Fabien Servant @ TCS) (2.5.2.0)
Squash some alignment problems caught by ubsan #3646
Fix missing OIIO::getattribute support for limits:channels and
limits:imagesize_MB. #3617 (2.4.5/2.5.0.0)
IBA::render_text and oiiotool --text now can find ".ttc" font files. #3633
(2.5.0.0)
Fix ImageOutput::check_open error conditions. #3769 (2.5.1.0)
Fix thread safety issue when reading ICC profiles from multiple files
simultaneously. This could affect any files with ICC profiles. #3767
(2.5.1.0)
Improve searching for fonts for the text rendering functionality. #3802
#3803 (2.5.1.0)
Improve OpenCV support -- errors, version, half
#3853 (2.5.2.0)
Prevent possible deadlock when reading files with wrong extensions
#3845
Wait for terminated threads to join in thread_pool::Impl::resize #3879 (by Ray Molenkamp)
Internals and developer goodies
filesystem.h:
Add an optional size parameter to read_text_file() to limit the
maximum size that will be allocated and read (default to a limit of
16MB). New read_text_from_command() is similar to read_text_file,
but reads from the console output of a shell command. #3635 (2.5.0.0)
New Filesystem::is_executable() and find_program(). #3638
(2.4.6/2.5.0.0)
Change IOMemReader constructor to take a const buffer pointer. #3665
(2.4.6/2.5.0.0)
IOMemReader::pread now detects and correctly handles out-of-range
read positions. #3712 (2.4.7/2.5.0.0)
fmath.h:
Fix a wrong result with fast_exp2() with MSVS and sse4.2.
#3804 (by Eric Mehl)
(2.5.1.0/2.4.11)
Prevent infinite loop in bit_range_convert #3996 (by Jesse Yurkovich) (2.5.3.2-rc1)
platform.h:
New macros for detecting MSVS 2019 and 2022. #3727 (2.5.0.0/2.4.8.0)
simd.h:
Fixes to ensure safe compilation for Cuda. #3810 (2.5.1.0/2.4.11)
Fix sense of hiding deprecated type names #3870 (2.5.2.0)
Fix broken OIIO_NO_NEON definition #3911
span.h:
cspan<> template now allows for Extent template argument (as span<>
already did). #3685 (2.5.0.0)
New custom fmt formatter can print spans. #3685 (2.5.0.0)
string_view.h:
Avoid sanitizer warning unsigned integer overflow #3678(by wayne-arnold-adsk)
strutil.h:
Add a new flavor of utf16_to_utf8() to convert between std::u16string
and std::string (UTF-8 encoded). Note the contrast between this and the
existing flavor that takes a std::wstring with UTF-16 encoding
(std::wchar/wstring is not guaranteed to 16 bits on all platforms, but
u16char/u16string is). #3553 (2.5.0.0)
New trimmed_whitspace(). #3636 (2.4.5/2.5.0.0)
Use std::forward properly for sync::print().
#3825 (2.5.2.0)
Ensure proper constexpr of string hashing #3901
timer.h:
Minor improvements to Timer and LoggedTimer classes. #3753 (2.5.0.1)
tiffutils.h:
decode_icc_profile extracts several fields from an ICC profile binary
blob and adds them as metadata to an ImageSpec. #3554 (2.5.0.0)
typedesc.h:
Extend TypeDescFromC template to the full set of pixel types. #3726
(2.5.0.0/2.4.8.0)
ustring.h:
Make std::hash work for ustring, add operator< for ustringhash, add
from_hash() to ustringhash, make ustringhash == and != be
constexpr for C++17 and beyond. #3577 (2.4.5/2.5.0.0)
Custom fmt formatter for ustringhash that prints the string rather than
the hash. #3614 (2.4.5/2.5.0.0)
Ensure that ustring hashes are always 64 bits, even on 32-bit
architectures. #3606 (2.5.0.0)
Ensure safe use of this header from Cuda. #3718 (2.4.7/2.5.0.0)
ustringhash: Make an explicit constructor from a hash value.
#3778 (2.4.9.0/2.5.1.0)
String literal operator for ustring and ustringhash
#3939 (2.5.3.0)
Fix Cuda warnings #3978 (2.5.3.1-beta2)
Safety: excise the last instances of unsafe sprintf. #3705 (2.5.0.0)
Root out stray uses of deprecated simd type names; OIIO_DISABLE_DEPRECATED
#3830 (2.5.2.0)
Convert iconvert.cpp stream io and sprintf to modern #3925
oiiotool: Refactor to get rid of the global Oiiotool singleton.
#3848 (2.5.2.0)
🏗 Build/test/CI and platform ports:
CMake build system and scripts:
It is now possible to -DOpenImageIO_VERSION to override the version
number being built (use with extreme caution). #3549 #3653 (2.5.0.0)
Perform parallel builds with MSVS. #3571 (2.5.0.0)
New CMake cache variable FORTIFY_SOURCE, if enabled, builds with the
specified gcc _FORTIFY_SOURCE option defined. This may be desirable
for people deploying OIIO in security-sensitive environments. #3575
(2.4.5/2.5.0.0)
CMake config should not include a find of fmt if it's internalized.
#3739 (2.4.7.1/2.5.0.0)
New CMake cache variable OIIO_DISABLE_BOOST_STACKTRACE to disable the
stacktrace functionality for users who want to avoid the Boost
stacktrace library. #3777 (by jreichel-nvidia) (2.4.9.0/2.5.1.0)
Check need for libatomic with check_cxx_source_compiles instead of the
more expensive check_cxx_source_runs. #3774 (2.4.9.0/2.5.1.0)
Fix incorrect CMake variable name to control symbol visibility
#3834 (2.5.2.0)
Make sure use of ${PROJECT_NAME} doesn't occur before the call to
project(). #3651
Fix use of OIIO_LOCAL_DEPS_PATH #3865
Added check for Boost_NO_BOOST_CMAKE, ignore if already set
#3961 (by Mikael Sundell) (2.5.3.0)
Remove unnecessary headers from strutil.cpp causing build trouble
#3976 (by Jesse Yurkovich) (2.5.3.1-beta2)
Print build-time warnings for LGPL gotchas
#3958 (by Danny Greenstein) (2.5.3.1-beta2)
Dependency support:
Support for OpenColorIO 2.2. #3644 (2.5.0.0)
New CMake option INTERNALIZE_FMT (default ON), if set to OFF, will
force OIIO clients to use the system fmt library and will not copy the
necessary fmt headers into the OIIO include area. #3598 (2.4.7/2.5.0.0)
build_libtiff.bash changed to build shared library by default. #3586
(2.5.0.0)
build_openexr.bash changed to build v3.1.5 by default. #3703 (by Michael Oliver) (2.5.0.0)
Qt6 support for iv. #3779 (2.4.9.0/2.5.1.0)
Fmt 10.0 support #3836 (2.5.2.0)
FFmpeg 6.0 support #3812 (2.5.2.0)
Disable new warning for fmt headers in gcc13
#3827 (2.5.2.0)
Raise minimum CMake dependency from 3.12 to 3.15 #3924 (2.5.2.0)
Raise minimum libraw to 0.18 #3921 (2.5.2.0)
Raise OpenEXR minimum from 2.3 to 2.4 #3928 (2.5.2.0)
Fix WebP linking if CMAKE_FIND_PACKAGE_PREFER_CONFIG is ON #3863 (by Benjamin Buch)
Find OpenEXR equally well with our FindOpenEXR and exr's exported config
file #3862 (by Benjamin
Buch)
Fix fmt vs gcc warning that had version typo #3874
Fix broken libheif < 1.13 #3970 (2.5.3.0)
Use exported targets for libjpeg-turbo and bump min to 2.1
#3987 (2.5.3.1-beta2)
Testing and Continuous integration (CI) systems:
Restored sanitizer tests which had been inadvertently disabled. #3545
(2.5.0.0)
Added tests for undefined behavior sanitizer. #3565 (2.5.0.0)
n files #3607, iinfo
#3605 #3613 #3688 #3706, texture statistics #3612, oiiotool unit tests
#3616, oiiotool expression substitution #3636, various oiiotool #3626
#3637 #3643 #3649, oiiotool control flow #3643, oiiotool sequence errors
and selecting out of range subimages or mip levels #3649, Strutil
functionality #3655, ImageCache #3654, environment mapping #3694,
texture3d #3699, term output #3714, igrep #3715, oiiotool --pdiff #3723,
zover, fixnan ep images, 2D filters #3730, pbm files #3731, maketx
--lightprobe #3732 (2.5.0.0), TypeDesc::tostring, python ImageCache and
ImageBuf #3745, maketx #3748 (2.5.0.1), ImageBufAlgo python functions
#3766 (2.5.1.0), etc. #3745
CI color related tests use the OCIO buit-in configs, when OCIO 2.2+ is
available. #3662 (2.5.0.0)
Fix compiler warnings #3833 (2.5.2.0)
Fix package name for icc #3860 (2.5.2.0)
Change the few symbolic links to copies to help Windows
#3818 (2.5.2.0)
Fix incorrect branch name when cloning openexr-images for the tests
#3814 (2.5.2.0) (by
Jesse Y)
Sonar analysis should exclude stb_sprintf.h #3609
Eliminate xxhash and farmhash code from coverage analysis #3621
No longer add the ppa:ubuntu-toolchain-r/test repository #3671
Test against latest webp, and deal with its master->main repo change #3695
Fix broken Mac CI with proper numpy install #3702
Lock down to older icc so it's not broken #3744
Updates to runners, dependencies #3786
Bump 'latest versions' test to the newest openexr release #3796
Fix broken heif dependency and test #3894
Add test with new aswf containers for VFX Platform 2023 #3875
Simplify build_llvm.bash script #3892
Get rid of long-unused install_test_images.bash #3895
Test against pybind11 v2.11 #3912
Lock down icx version #3929
Fix missing simd test due to copy paste typo #3896
Bump build_openexr and build_opencolorio defaults to latest versions #3920
Test both openexr old and core versions #3604
Add benchmarking of strutil.h ways to concatenate strings. #3787
Make timer_test more robust #3953 (2.5.3.0)
Tests for ABI compliance #3983, #3988 (2.5.3.1-beta2)
Platform support:
Windows: protect against OpenEXR thread deadlock on shutdown. #3582
(2.4.5/2.5.0.0)
Windows: Work around a static destruction order issue. #3591
(2.4.5/2.5.0.0)
Windows: define NOGDI to keep the inclusion of windows.h from adding
as many unneeded symbols. #3596 (by Aras Pranckevičius) (2.4.5/2.5.0.0)
Windows: Stop including Windows.h from public OIIO headers. #3597 (by Aras Pranckevičius) (2.5.0.0)
Windows: Fix windows.h pre-definitions
#3965 (2.5.3.0)
Windows on ARM64 build fixes. #3690 (2.4.6/2.5.0.0)
Windows: Fix unresolved external symbol for MSVS 2017.
#3763 (by Latios96) (2.5.0.1)
Windows: Fix build error with MSVC #3832 (by Ray Molenkamp) (2.5.2.0)
MinGW: fix incorrect symbol visibility issue for ImageBuf iterators. #3578
Mac: Suppress warnings about deprecated std::codecvt on newest Apple
clang. #3709 #3710 (2.4.7/2.5.0.0)
Mac: Fixes to make a clean build using Apple Clang 11.0.
#3795 (by johnfea) (2.4.10.0/2.5.1.0)
Mac: Fixes for latest xcode on MacOS 13.3 Ventura #3854 (2.5.2.0)
Mac: Suppress Xcode warnings #3940 (by Anton Dukhovnikov) (2.5.3.0)
#3722 (2.4.7/2.5.0.0)
Mac: Fixes for latest xcode on MacOS 13.3 Ventura #3854 (2.5.2.0)
Fixes to make a clean build on Mac using Apple Clang 11.0.
ARM: Fix signed/unsigned mismatch compiler errors in vbool4 methods.
ARM: improve SIMD operations for ARM NEON. #3599 (2.4.5/2.5.0.0)
ARM: Fix signed/unsigned mismatch compiler errors in vbool4 methods.
ARM Mac: Fix build break. #3735 (2.5.0.0/2.4.7.1)
Fixes to build properly on OpenBSD. #3808 (by Brad Smith) (2.5.1.0/2.4.11)
Squash warning in gcc 12.1 + C++20 #3679
Work around problems with fmt library + NVPTX relating to unknown
float128 type. #3823
(by Edoardo Dominici)
Silence gcc new/delete warnings for texturesys #3944 (by Shootfast) (2.5.3.0)
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 pkgsrc/graphics/openimageio/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/graphics/openimageio/PLIST
cvs rdiff -u -r1.65 -r1.66 pkgsrc/graphics/openimageio/buildlink3.mk
cvs rdiff -u -r1.29 -r1.30 pkgsrc/graphics/openimageio/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake
cvs rdiff -u -r0 -r1.3 \
pkgsrc/graphics/openimageio/patches/patch-src_include_OpenImageIO_strutil.h
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/openimageio/patches/patch-src_libutil_strutil.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/openimageio/Makefile
diff -u pkgsrc/graphics/openimageio/Makefile:1.95 pkgsrc/graphics/openimageio/Makefile:1.96
--- pkgsrc/graphics/openimageio/Makefile:1.95 Mon Aug 14 05:24:36 2023
+++ pkgsrc/graphics/openimageio/Makefile Sun Oct 15 19:52:09 2023
@@ -1,30 +1,24 @@
-# $NetBSD: Makefile,v 1.95 2023/08/14 05:24:36 wiz Exp $
+# $NetBSD: Makefile,v 1.96 2023/10/15 19:52:09 ryoon Exp $
-DISTNAME= oiio-2.2.20.0
-PKGNAME= ${DISTNAME:S/oiio/openimageio/}
-PKGREVISION= 11
+DISTNAME= OpenImageIO-2.5.4.0
+PKGNAME= ${DISTNAME:tl}
CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_GITHUB:=OpenImageIO/}
-GITHUB_PROJECT= oiio
+MASTER_SITES= ${MASTER_SITE_GITHUB:=AcademySoftwareFoundation/}
+GITHUB_PROJECT= OpenImageIO
GITHUB_TAG= v${PKGVERSION_NOREV}
-GITHUB_SUBMODULES+= fmtlib fmt 7.1.3 ext/fmt
-
MAINTAINER= ryoon%NetBSD.org@localhost
-HOMEPAGE= https://sites.google.com/site/openimageio/
+HOMEPAGE= https://openimageio.readthedocs.io/
COMMENT= C++ library for reading and writing images
LICENSE= modified-bsd
UNLIMIT_RESOURCES= datasize virtualsize
-USE_CMAKE= yes
USE_TOOLS+= pkg-config
USE_LANGUAGES= c c++
TEST_TARGET= test
CMAKE_ARGS+= -DSTOP_ON_WARNING=OFF # Disable -Werror
-# XXX: cannot use fmtlib from pkgsrc, too new
-CMAKE_ARGS+= -DBUILD_FMT_FORCE=ON
CMAKE_ARGS+= -DBUILD_MISSING_ROBINMAP=OFF
CMAKE_ARGS+= -DUSE_EXTERNAL_PUGIXML=ON
CMAKE_ARGS+= -DUSE_PYTHON:BOOL=OFF
@@ -48,18 +42,12 @@ CMAKE_ARGS+= -DUSE_HDF5=OFF
CMAKE_ARGS+= -DUSE_FFmpeg=OFF
CMAKE_ARGS+= -DUSE_OpenCV=OFF
-OBJDIR= ../build
-CONFIGURE_DIRS= ${OBJDIR}
-CMAKE_ARG_PATH= ${WRKSRC}
-
# We're using cmake...
CHECK_PORTABILITY_SKIP+= Makefile
-pre-configure:
- ${MKDIR} ${WRKDIR}/build
-
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
.include "../../devel/robin-map/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/giflib/buildlink3.mk"
@@ -72,8 +60,8 @@ pre-configure:
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.include "../../parallel/threadingbuildingblocks/buildlink3.mk"
-# XXX: requiring specific version currently
-#.include "../../textproc/fmtlib/buildlink3.mk"
+.include "../../textproc/fmtlib/buildlink3.mk"
.include "../../textproc/pugixml/buildlink3.mk"
+.include "../../textproc/tinyxml/buildlink3.mk"
.include "../../mk/atomic64.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/graphics/openimageio/PLIST
diff -u pkgsrc/graphics/openimageio/PLIST:1.10 pkgsrc/graphics/openimageio/PLIST:1.11
--- pkgsrc/graphics/openimageio/PLIST:1.10 Fri Jul 1 16:18:44 2022
+++ pkgsrc/graphics/openimageio/PLIST Sun Oct 15 19:52:09 2023
@@ -1,10 +1,11 @@
-@comment $NetBSD: PLIST,v 1.10 2022/07/01 16:18:44 adam Exp $
+@comment $NetBSD: PLIST,v 1.11 2023/10/15 19:52:09 ryoon Exp $
bin/iconvert
bin/idiff
bin/igrep
bin/iinfo
bin/maketx
bin/oiiotool
+bin/testtex
include/OpenImageIO/Imath.h
include/OpenImageIO/argparse.h
include/OpenImageIO/array_view.h
@@ -15,11 +16,13 @@ include/OpenImageIO/color.h
include/OpenImageIO/dassert.h
include/OpenImageIO/deepdata.h
include/OpenImageIO/detail/farmhash.h
+include/OpenImageIO/detail/fmt.h
include/OpenImageIO/detail/fmt/core.h
include/OpenImageIO/detail/fmt/format-inl.h
include/OpenImageIO/detail/fmt/format.h
include/OpenImageIO/detail/fmt/ostream.h
include/OpenImageIO/detail/fmt/printf.h
+include/OpenImageIO/detail/fmt/std.h
include/OpenImageIO/errorhandler.h
include/OpenImageIO/export.h
include/OpenImageIO/filesystem.h
@@ -27,6 +30,7 @@ include/OpenImageIO/filter.h
include/OpenImageIO/fmath.h
include/OpenImageIO/fstream_mingw.h
include/OpenImageIO/function_view.h
+include/OpenImageIO/half.h
include/OpenImageIO/hash.h
include/OpenImageIO/image_view.h
include/OpenImageIO/imagebuf.h
@@ -46,30 +50,32 @@ include/OpenImageIO/simd.h
include/OpenImageIO/span.h
include/OpenImageIO/strided_ptr.h
include/OpenImageIO/string_view.h
+include/OpenImageIO/strongparam.h
include/OpenImageIO/strutil.h
include/OpenImageIO/sysutil.h
include/OpenImageIO/texture.h
include/OpenImageIO/thread.h
include/OpenImageIO/tiffutils.h
include/OpenImageIO/timer.h
+include/OpenImageIO/type_traits.h
include/OpenImageIO/typedesc.h
include/OpenImageIO/unittest.h
include/OpenImageIO/unordered_map_concurrent.h
include/OpenImageIO/ustring.h
include/OpenImageIO/varyingref.h
+include/OpenImageIO/vecparam.h
include/OpenImageIO/version.h
lib/cmake/OpenImageIO/OpenImageIOConfig.cmake
lib/cmake/OpenImageIO/OpenImageIOConfigVersion.cmake
lib/cmake/OpenImageIO/OpenImageIOTargets-release.cmake
lib/cmake/OpenImageIO/OpenImageIOTargets.cmake
lib/libOpenImageIO.so
-lib/libOpenImageIO.so.2.2
-lib/libOpenImageIO.so.2.2.20
+lib/libOpenImageIO.so.2.5
+lib/libOpenImageIO.so.2.5.4
lib/libOpenImageIO_Util.so
-lib/libOpenImageIO_Util.so.2.2
-lib/libOpenImageIO_Util.so.2.2.20
+lib/libOpenImageIO_Util.so.2.5
+lib/libOpenImageIO_Util.so.2.5.4
lib/pkgconfig/OpenImageIO.pc
-share/cmake/Modules/FindOpenImageIO.cmake
share/doc/OpenImageIO/CHANGES-0.x.md
share/doc/OpenImageIO/CHANGES-1.x.md
share/doc/OpenImageIO/CHANGES.md
Index: pkgsrc/graphics/openimageio/buildlink3.mk
diff -u pkgsrc/graphics/openimageio/buildlink3.mk:1.65 pkgsrc/graphics/openimageio/buildlink3.mk:1.66
--- pkgsrc/graphics/openimageio/buildlink3.mk:1.65 Mon Aug 14 05:24:36 2023
+++ pkgsrc/graphics/openimageio/buildlink3.mk Sun Oct 15 19:52:09 2023
@@ -1,12 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.65 2023/08/14 05:24:36 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.66 2023/10/15 19:52:09 ryoon Exp $
BUILDLINK_TREE+= openimageio
.if !defined(OPENIMAGEIO_BUILDLINK3_MK)
OPENIMAGEIO_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.openimageio+= openimageio>=1.8.15
-BUILDLINK_ABI_DEPENDS.openimageio+= openimageio>=2.2.20.0nb11
+BUILDLINK_API_DEPENDS.openimageio+= openimageio>=2.4.12.0
BUILDLINK_PKGSRCDIR.openimageio?= ../../graphics/openimageio
.include "../../devel/boost-libs/buildlink3.mk"
Index: pkgsrc/graphics/openimageio/distinfo
diff -u pkgsrc/graphics/openimageio/distinfo:1.29 pkgsrc/graphics/openimageio/distinfo:1.30
--- pkgsrc/graphics/openimageio/distinfo:1.29 Mon Dec 26 17:59:30 2022
+++ pkgsrc/graphics/openimageio/distinfo Sun Oct 15 19:52:09 2023
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.29 2022/12/26 17:59:30 nia Exp $
+$NetBSD: distinfo,v 1.30 2023/10/15 19:52:09 ryoon Exp $
-BLAKE2s (fmtlib-fmt-7.1.3.tar.gz) = 7b522ae0e5390aad8233c40f33aac066fc23da6514e893c48ed402c237d2e321
-SHA512 (fmtlib-fmt-7.1.3.tar.gz) = cfb2431de822202f17a6f34a302b1922b9cd696d8d4c27ad50ea08add781d2af9944db987603c2eb294ee7d73054a60cc11d3a0693f7f6db61949f3041cb9517
-Size (fmtlib-fmt-7.1.3.tar.gz) = 770029 bytes
-BLAKE2s (oiio-2.2.20.0.tar.gz) = df9abfff664dfa32500bce970085f5fbab86f7f6f77890a0e9fa19d1c202861f
-SHA512 (oiio-2.2.20.0.tar.gz) = 0c02f79973ac66633cadfe7159112fe5007b8af96d25e5aa7586fd5543472e8a63b384574bdd6af4236e18092e53e6bf318b47fa36b4c25afe5ce41c5c71b3ff
-Size (oiio-2.2.20.0.tar.gz) = 29253646 bytes
-SHA1 (patch-src_cmake_compiler.cmake) = 8c06e8e22eb927bbdec288c166a5dc44fbef5acb
+BLAKE2s (OpenImageIO-2.5.4.0.tar.gz) = 5655cacf85bc7e60c64e8eb060b6f5ea0115a55dc5abc24e3dc6b88d5e88afd7
+SHA512 (OpenImageIO-2.5.4.0.tar.gz) = db9576bbc0b77da19db957710e86d8979e9987e91ff6246b513197fa98545904a7d34873cc2ba3ee60deed0a00a757dafb8dfa604f1e52097a1848aef43427cd
+Size (OpenImageIO-2.5.4.0.tar.gz) = 48107518 bytes
+SHA1 (patch-src_cmake_compiler.cmake) = f7a670d437d7336bbf9317b41f5c951cee757b11
+SHA1 (patch-src_include_OpenImageIO_strutil.h) = 90efe95bf763881478aea851cce0ea67a9de9c1a
+SHA1 (patch-src_libutil_strutil.cpp) = fd63f4648cd9750d7b9e496c183886d348c2cff5
Index: pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake
diff -u pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake:1.1 pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake:1.2
--- pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake:1.1 Tue Jan 19 16:02:25 2021
+++ pkgsrc/graphics/openimageio/patches/patch-src_cmake_compiler.cmake Sun Oct 15 19:52:09 2023
@@ -1,16 +1,16 @@
-$NetBSD: patch-src_cmake_compiler.cmake,v 1.1 2021/01/19 16:02:25 nia Exp $
+$NetBSD: patch-src_cmake_compiler.cmake,v 1.2 2023/10/15 19:52:09 ryoon Exp $
Disable custom rpath handling that conflicts with pkgsrc.
---- src/cmake/compiler.cmake.orig 2021-01-08 07:41:40.000000000 +0000
+--- src/cmake/compiler.cmake.orig 2023-10-02 01:17:00.000000000 +0000
+++ src/cmake/compiler.cmake
-@@ -542,32 +542,6 @@ endif ()
+@@ -600,30 +600,6 @@ endif ()
###########################################################################
-# Rpath handling at the install step
-#
--set (MACOSX_RPATH ON)
+-# set (MACOSX_RPATH ON)
-if (CMAKE_SKIP_RPATH)
- # We need to disallow the user from truly setting CMAKE_SKIP_RPATH, since
- # we want to run the generated executables from the build tree in order to
@@ -26,9 +26,7 @@ Disable custom rpath handling that confl
- # add the automatically determined parts of the RPATH that
- # point to directories outside the build tree to the install RPATH
- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-- if (VERBOSE)
-- message (STATUS "CMAKE_INSTALL_RPATH = ${CMAKE_INSTALL_RPATH}")
-- endif ()
+- message (VERBOSE "CMAKE_INSTALL_RPATH = ${CMAKE_INSTALL_RPATH}")
-endif ()
-
-
Added files:
Index: pkgsrc/graphics/openimageio/patches/patch-src_include_OpenImageIO_strutil.h
diff -u /dev/null pkgsrc/graphics/openimageio/patches/patch-src_include_OpenImageIO_strutil.h:1.3
--- /dev/null Sun Oct 15 19:52:09 2023
+++ pkgsrc/graphics/openimageio/patches/patch-src_include_OpenImageIO_strutil.h Sun Oct 15 19:52:09 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_include_OpenImageIO_strutil.h,v 1.3 2023/10/15 19:52:09 ryoon Exp $
+
+* For va_list.
+
+--- src/include/OpenImageIO/strutil.h.orig 2023-06-01 17:26:37.000000000 +0000
++++ src/include/OpenImageIO/strutil.h
+@@ -15,6 +15,7 @@
+ #pragma once
+
+ #include <cstdio>
++#include <cstdarg>
+ #include <map>
+ #include <sstream>
+ #include <string>
Index: pkgsrc/graphics/openimageio/patches/patch-src_libutil_strutil.cpp
diff -u /dev/null pkgsrc/graphics/openimageio/patches/patch-src_libutil_strutil.cpp:1.1
--- /dev/null Sun Oct 15 19:52:09 2023
+++ pkgsrc/graphics/openimageio/patches/patch-src_libutil_strutil.cpp Sun Oct 15 19:52:09 2023
@@ -0,0 +1,50 @@
+$NetBSD: patch-src_libutil_strutil.cpp,v 1.1 2023/10/15 19:52:09 ryoon Exp $
+
+* For NetBSD
+
+--- src/libutil/strutil.cpp.orig 2023-06-01 17:26:37.000000000 +0000
++++ src/libutil/strutil.cpp
+@@ -63,7 +63,7 @@ static std::mutex output_mutex;
+ // On systems that support it, get a location independent locale.
+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
+ || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) \
+- || defined(__GLIBC__)
++ || defined(__GLIBC__) || defined(__NetBSD__)
+ static locale_t c_loc = newlocale(LC_ALL_MASK, "C", nullptr);
+ #elif defined(_WIN32)
+ static _locale_t c_loc = _create_locale(LC_ALL, "C");
+@@ -452,6 +452,14 @@ strcasecmp(const char* a, const char* b)
+ return strcasecmp_l(a, b, c_loc);
+ #elif defined(_WIN32)
+ return _stricmp_l(a, b, c_loc);
++#elif defined(__NetBSD__)
++ const unsigned char *us1 = (const unsigned char *)a,
++ *us2 = (const unsigned char *)b;
++
++ while (tolower_l(*us1, c_loc) == tolower_l(*us2++, c_loc))
++ if (*us1++ == '\0')
++ return (0);
++ return (tolower_l(*us1, c_loc) - tolower_l(*--us2, c_loc));
+ #else
+ # error("need equivalent of strcasecmp_l on this platform");
+ #endif
+@@ -467,6 +475,19 @@ strncasecmp(const char* a, const char* b
+ return strncasecmp_l(a, b, size, c_loc);
+ #elif defined(_WIN32)
+ return _strnicmp_l(a, b, size, c_loc);
++#elif defined(__NetBSD__)
++ if (size != 0) {
++ const unsigned char *us1 = (const unsigned char *)a,
++ *us2 = (const unsigned char *)b;
++
++ do {
++ if (tolower_l(*us1, c_loc) != tolower_l(*us2++, c_loc))
++ return (tolower_l(*us1, c_loc) - tolower_l(*--us2, c_loc));
++ if (*us1++ == '\0')
++ break;
++ } while (--size != 0);
++ }
++ return (0);
+ #else
+ # error("need equivalent of strncasecmp_l on this platform");
+ #endif
Home |
Main Index |
Thread Index |
Old Index