Bläddra i källkod

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
e648d399d8bd609697e78f13f7fa76be06d91a57:

/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>
Fabrice Fontaine 2 år sedan
förälder
incheckning
92c4589b90
1 ändrade filer med 7 tillägg och 0 borttagningar
  1. 7 0
      package/libjxl/libjxl.mk

+ 7 - 0
package/libjxl/libjxl.mk

@@ -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))