package/libjxl: fix build with libjpeg

Building with libjpeg will raise the following build failure on some
architectures since the addition of the package in commit
e648d399d8:

/tmp/instance-14/output-1/build/libjxl-0.7.0/lib/extras/enc/jpg.cc: In function 'jxl::Status jxl::extras::{anonymous}::EncodeWithLibJpeg(const jxl::extras::PackedImage&, const JxlBasicInfo&, const std::vector<unsigned char>&, std::vector<unsigned char>, size_t, const string&, std::vector<unsigned char>*)':
/tmp/instance-14/output-1/build/libjxl-0.7.0/lib/extras/enc/jpg.cc:126:34: error: invalid conversion from 'long unsigned int*' to 'size_t*' {aka 'unsigned int*'} [-fpermissive]
  126 |   jpeg_mem_dest(&cinfo, &buffer, &size);
      |                                  ^~~~~
      |                                  |
      |                                  long unsigned int*

Upstream advocates to use jpeg-turbo:
https://github.com/libjxl/libjxl/issues/1802

Fixes:
 - http://autobuild.buildroot.org/results/9a2a7c6072876f2562609bf98f32a1ce93631a75

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine 2023-02-19 17:48:20 +01:00 committed by Thomas Petazzoni
parent 1d29799914
commit 92c4589b90

View File

@ -30,4 +30,11 @@ LIBJXL_CONF_OPTS = \
-DJPEGXL_ENABLE_SJPEG=OFF \
-DJPEGXL_ENABLE_SKCMS=OFF
ifeq ($(BR2_PACKAGE_JPEG_TURBO),y)
LIBJXL_DEPENDENCIES += jpeg-turbo
LIBJXL_CONF_OPTS += -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=OFF
else
LIBJXL_CONF_OPTS += -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=ON
endif
$(eval $(cmake-package))