gitlab-ci: build and install LittleCMS version 2.16

When using some features from LittleCMS in our CI, we are seeing some
crashes on the address sanitizer. Bumping the LittleCMS version fixes
that. So build and install a more recent version of LittleCMS on our CI.

We chose version 2.16 because it introduces the function
cmsGetToneCurveSegment(). We already make extensive use of that in our
codebase, so it is a good idea to have that on our CI as well.

Now color-curve-segments.c will start to get build on the CI, as
HAVE_CMS_GET_TONE_CURVE_SEGMENT will be true. So we also fix a minor
issue in which we were comparing int with uint in this file, what was
caught after experimenting bumping the LittleCMS version.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2023-11-16 13:08:10 -03:00
parent 188a3ebd5e
commit 39ada71cb3
4 changed files with 11 additions and 3 deletions

View file

@ -43,7 +43,7 @@
variables:
FDO_UPSTREAM_REPO: wayland/weston
FDO_REPO_SUFFIX: "$BUILD_OS-$FDO_DISTRIBUTION_VERSION/$BUILD_ARCH"
FDO_DISTRIBUTION_TAG: '2024-01-19-wayland-protocols-1.33-7'
FDO_DISTRIBUTION_TAG: '2024-02-14-00-lcms2'
include:

View file

@ -201,3 +201,12 @@ meson build --wrap-mode=nofallback
ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf libdisplay-info
# Build and install lcms2, which we use to support color-management.
git clone --branch master https://github.com/mm2/Little-CMS.git lcms2
cd lcms2
git checkout -b snapshot lcms2.16
meson build --wrap-mode=nofallback
ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf lcms2

View file

@ -66,7 +66,6 @@ apt-get -y --no-install-recommends install \
libjack-jackd2-dev \
libjpeg-dev \
libjpeg-dev \
liblcms2-dev \
libmtdev-dev \
libpam0g-dev \
libpango1.0-dev \

View file

@ -301,7 +301,7 @@ are_segments_equal(const cmsCurveSegment *seg_A, const cmsCurveSegment *seg_B)
/* Parametric curve. Determine the number of params that we should
* compare. */
for (i = 0; i < ARRAY_LENGTH(types); i++) {
if (types[i] == abs(seg_A->Type)) {
if (types[i] == (uint32_t)abs(seg_A->Type)) {
n_params = types_n_params[i];
break;
}