Skip to content

Commit f29a0d0

Browse files
authored
Add libultrahdr dependency (lovell#307)
For Ultra HDR support.
1 parent 747699d commit f29a0d0

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ used under the terms of the following licences:
2525
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
2626
| librsvg | LGPLv3 |
2727
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
28+
| libultrahdr | Apache-2.0 License |
2829
| libvips | LGPLv3 |
2930
| libwebp | New BSD License |
3031
| libxml2 | MIT Licence |

build/posix.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,22 @@ CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=r
356356
-Dexamples=false -Dtests=false
357357
meson install -C _build --tag devel
358358

359+
mkdir ${DEPS}/uhdr
360+
$CURL https://github.com/google/libultrahdr/archive/v${VERSION_UHDR}.tar.gz | tar xzC ${DEPS}/uhdr --strip-components=1
361+
cd ${DEPS}/uhdr
362+
# [PATCH] improper use of clamp macro
363+
$CURL https://github.com/google/libultrahdr/commit/5ed39d67cd31d254e84ebf76b03d4b7bcc12e2f7.patch | patch -p1
364+
# [PATCH] Add ppc64le and s390x to recognized architectures
365+
$CURL https://github.com/google/libultrahdr/pull/376.patch | patch -p1
366+
# Avoid architecture-specific compile flags
367+
sed -i'.bak' '/add_compile_options(-[mf]/d' CMakeLists.txt
368+
# Ensure install targets are enabled when cross-compiling
369+
sed -i'.bak' 's/CMAKE_CROSSCOMPILING AND UHDR_ENABLE_INSTALL/FALSE/' CMakeLists.txt
370+
CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" cmake -G"Unix Makefiles" \
371+
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release \
372+
-DBUILD_SHARED_LIBS=FALSE -DUHDR_BUILD_EXAMPLES=FALSE -DUHDR_MAX_DIMENSION=65500 ${WITHOUT_NEON:+-DUHDR_ENABLE_INTRINSICS=FALSE}
373+
make install/strip
374+
359375
mkdir ${DEPS}/vips
360376
$CURL https://github.com/libvips/libvips/releases/download/v${VERSION_VIPS}/vips-${VERSION_VIPS}.tar.xz | tar xJC ${DEPS}/vips --strip-components=1
361377
cd ${DEPS}/vips
@@ -460,6 +476,7 @@ printf "{\n\
460476
\"proxy-libintl\": \"${VERSION_PROXY_LIBINTL}\",\n\
461477
\"rsvg\": \"${VERSION_RSVG}\",\n\
462478
\"tiff\": \"${VERSION_TIFF}\",\n\
479+
\"uhdr\": \"${VERSION_UHDR}\",\n\
463480
\"vips\": \"${VERSION_VIPS}\",\n\
464481
\"webp\": \"${VERSION_WEBP}\",\n\
465482
\"xml2\": \"${VERSION_XML2}\",\n\

check-latest-versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ version_latest "png" "$VERSION_PNG" "1705"
4848
version_latest "proxy-libintl" "$VERSION_PROXY_LIBINTL" "frida/proxy-libintl"
4949
version_latest "rsvg" "$VERSION_RSVG" "5420" "unstable"
5050
version_latest "tiff" "$VERSION_TIFF" "1738"
51+
version_latest "uhdr" "$VERSION_UHDR" "375187"
5152
#version_latest "vips" "$VERSION_VIPS" "5097" # Temporarily disabled to allow version 8.18.0 to roll in
5253
version_latest "webp" "$VERSION_WEBP" "1761"
5354
version_latest "xml2" "$VERSION_XML2" "1783"

versions.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ VERSION_PNG=1.6.53
2121
VERSION_PROXY_LIBINTL=0.5
2222
VERSION_RSVG=2.61.3
2323
VERSION_TIFF=4.7.1
24+
VERSION_UHDR=1.4.0
2425
VERSION_VIPS=8.17.3
2526
VERSION_WEBP=1.6.0
2627
VERSION_XML2=2.15.1

0 commit comments

Comments
 (0)