From 39ada71cb3e0e2d7f082e96b22c2bc61c5774875 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Thu, 16 Nov 2023 13:08:10 -0300 Subject: [PATCH] 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 --- .gitlab-ci.yml | 2 +- .gitlab-ci/build-deps.sh | 9 +++++++++ .gitlab-ci/debian-install.sh | 1 - libweston/color-lcms/color-curve-segments.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c98d5bd53..8789989a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/.gitlab-ci/build-deps.sh b/.gitlab-ci/build-deps.sh index 32fff4ed1..82a41df2d 100755 --- a/.gitlab-ci/build-deps.sh +++ b/.gitlab-ci/build-deps.sh @@ -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 diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh index 5b1d2959a..6f2fffdc0 100644 --- a/.gitlab-ci/debian-install.sh +++ b/.gitlab-ci/debian-install.sh @@ -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 \ diff --git a/libweston/color-lcms/color-curve-segments.c b/libweston/color-lcms/color-curve-segments.c index 3ed4bfafe..2ce585828 100644 --- a/libweston/color-lcms/color-curve-segments.c +++ b/libweston/color-lcms/color-curve-segments.c @@ -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; }