On non-Windows platforms, there is no standard way to get the hash of an
item -- before this PR, what we did was check for the existence of a few
common utility names (shasum, sha1, sha256, sha512), and then call that
utility on a file we created containing the contents we wish to hash.
This PR adds internal hashers for sha1, sha256, and sha512, and
standardizes the interface to allow anyone to implement hashers in the
future.
These hashers are not extremely optimized, so it's likely that in the
future we could get more optimized, but for now we just call out to
BCryptHasher on Windows, since it's standard and easy to use (and about
2x faster for sha1 and sha256, and 1.5x faster for sha512). However,
they are reasonably fast for being unoptimized. I attempted a few minor
optimizations, which actually made the code slower! So as of right now,
it's implemented as just a basic conversion of the code on Wikipedia to
C++. I have tested these on the standard NIST test vectors (and those
test vectors are located in vcpkg-test/hash.cpp).
* [opencv3] uniform CONTROL file with opencv4 port
* [opencv3] uniform portfile with opencv4
* [opencv3] uniform CONTROL file with opencv4 port
* [opencv3] update to 3.4.7 draft
* [OpenCV 3] wip to uniform port to opencv4 standards
* [OpenCV3] fix IPPICV integration, use the same mechanism as in OpenCV4 port
* [OpenCV3] fix sfm module
* [OpenCV3] update hunk references in patches 0001 and 0009
* [OpenCV3] refresh install options to adhere to opencv4 standards
* [opencv3] remove leftovers
* [opencv3] Use OUT_FEATURE_OPTIONS with vcpkg_check_features()
* mp3lame
* "WindowsStore" and "arm" are not supported
* "WindowsStore" and "arm" are not supported
* simplify portfile.cmake
* add ARM
* add /APPCONTAINER
* add MSBUILD_PLATFORM
* remove "mp3lame does not support ARM"
* arm64 support
* arm64 support
Add a `#else` line to `toolsrc/src/vcpkg/base/files.cpp`. On Linux
and macOS, there are specific ways to copy from file descriptor to file
descriptor, but on FreeBSD there isn't (as far as I could tell). This
change does a copy using the POSIX standard `read` and `write` calls.
(This change was to `RealFilesystem::rename_or_copy`).
We expect to have people on FreeBSD install CMake themselves, and use
`./bootstrap.sh -useSystemBinaries`, in order to build vcpkg.
Since CMake 3.15.2 exists in the FreeBSD 12 (latest stable) package
manager, it's trivial to install it.
* [leptonica]Add dependency port libwebp and fix find libwebp in debug/release.
* [leptonica]Add dependency to LeptonicaConfig.cmake.
* [leptonica]Re-fix find libwebp.