libtiff: enable jpeg and zlib

Change-Id: Ied6ab75342f5cdaadefbff7f75fbe63e9d67e992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134667
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-05-20 09:51:19 +01:00
parent f948108d85
commit 685eff8c9e
3 changed files with 38 additions and 3 deletions

View file

@ -13,33 +13,53 @@ $(eval $(call gb_ExternalProject_register_targets,libtiff,\
build \
))
$(eval $(call gb_ExternalProject_use_externals,libtiff,\
libjpeg \
zlib \
))
$(eval $(call gb_ExternalProject_use_autoconf,libtiff,build))
# using ac_cv_lib_z_inflateEnd=yes to skip test for our
# static windows lib where the name is zlib not z
# using ac_cv_lib_jpeg_jpeg_read_scanlines to skip test
# for our static windows lib where the name is libjpeg-turbo.lib
# not libjpeg.lib
# we're building this statically anyway so the lib isn't
# used during the link done here
$(call gb_ExternalProject_get_state_target,libtiff,build) :
$(call gb_Trace_StartRange,libtiff,EXTERNAL)
$(call gb_ExternalProject_run,build,\
export PKG_CONFIG="" \
&& MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \
--enable-static \
--with-pic \
--enable-jpeg \
--enable-zlib \
--disable-shared \
--disable-cxx \
--disable-libdeflate \
--disable-jbig \
--disable-jpeg \
--disable-lerc \
--disable-lzma \
--disable-mdi \
--disable-webp \
--disable-win32-io \
--disable-zstd \
--with-pic \
--without-x \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,libtiff)" \
$(if $(SYSTEM_ZLIB),,--with-zlib-include-dir="$(call gb_UnpackedTarball_get_dir,zlib)") \
$(if $(SYSTEM_ZLIB),,--with-zlib-lib-dir="$(gb_StaticLibrary_WORKDIR)") \
$(if $(SYSTEM_LIBJPEG),,--with-jpeg-include-dir="$(call gb_UnpackedTarball_get_dir,libjpeg-turbo)") \
$(if $(SYSTEM_LIBJPEG),,--with-jpeg-lib-dir="$(gb_StaticLibrary_WORKDIR)") \
CPPFLAGS="$(CPPFLAGS) $(BOOST_CPPFLAGS)" \
LDFLAGS="$(call gb_ExternalProject_get_link_flags,libtiff)" \
ac_cv_lib_z_inflateEnd=yes \
ac_cv_lib_jpeg_jpeg_read_scanlines=yes \
$(gb_CONFIGURE_PLATFORMS) \
&& $(MAKE) \
&& cd libtiff && $(MAKE) libtiff.la \
)
$(call gb_Trace_EndRange,libtiff,EXTERNAL)

View file

@ -13,4 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libtiff,$(LIBTIFF_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libtiff,0))
$(eval $(call gb_UnpackedTarball_add_patches,libtiff,\
external/libtiff/libtiff.linknolibs.patch \
))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,11 @@
--- libtiff/Makefile.in 2022-05-21 15:32:48.069999327 +0100
+++ libtiff/Makefile.in 2022-05-21 15:32:59.051499293 +0100
@@ -372,7 +372,7 @@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+#LIBS = @LIBS@
LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@