tiff: add utility commands and library options
authorFrank Hunleth <fhunleth@troodon-software.com>
Thu, 12 Jan 2012 03:12:01 +0000 (22:12 -0500)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 12 Jan 2012 10:06:10 +0000 (11:06 +0100)
Added support for compiling tiffcp and tiff2pdf.

Added options for compiling out various libtiff features. By default,
all libtiff features are built so that the result is the same as before
this change.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/tiff/Config.in
package/tiff/tiff.mk

index c6336e23d68337280782babd1b8460b1d63b0674..7850965b318983e13ac20e6be24a0f48ee51015d 100644 (file)
@@ -1,8 +1,75 @@
 config BR2_PACKAGE_TIFF
        bool "tiff"
-       select BR2_PACKAGE_ZLIB
-       select BR2_PACKAGE_JPEG
        help
          Library for handling TIFF (Tag Image File Format) images.
 
          http://www.libtiff.org/
+
+if BR2_PACKAGE_TIFF
+menu "tiff Options"
+
+config BR2_PACKAGE_TIFF_CCITT
+       bool "CCITT Group 3 & 4 support"
+       default y
+
+config BR2_PACKAGE_TIFF_PACKBITS
+       bool "Macintosh PackBits algorithm"
+       default y
+
+config BR2_PACKAGE_TIFF_LZW
+       bool "LZW algorithm"
+       default y
+
+config BR2_PACKAGE_TIFF_THUNDER
+       bool "ThunderScan 4-bit RLE algorithm"
+       default y
+
+config BR2_PACKAGE_TIFF_NEXT
+       bool "NeXT 2-bit RLE algorithm"
+       default y
+
+config BR2_PACKAGE_TIFF_LOGLUV
+       bool "LogLuv high dynamic range encoding"
+       default y
+
+config BR2_PACKAGE_TIFF_MDI
+       bool "Microsoft Document Imaging"
+       default y
+
+config BR2_PACKAGE_TIFF_ZLIB
+       bool "Zlib usage (required for Deflate compression)"
+       select BR2_PACKAGE_ZLIB
+       default y
+
+config BR2_PACKAGE_TIFF_PIXARLOG
+       bool "Pixar log-format algorithm (requires Zlib)"
+       select BR2_PACKAGE_TIFF_ZLIB
+       default y
+
+config BR2_PACKAGE_TIFF_JPEG
+       bool "JPEG compression"
+       select BR2_PACKAGE_JPEG
+       default y
+
+config BR2_PACKAGE_TIFF_OLD_JPEG
+       bool "Old JPEG decompression"
+       default y
+
+config BR2_PACKAGE_TIFF_JBIG
+       bool "JBIG compression"
+       default y
+endmenu
+
+endif
+
+config BR2_PACKAGE_TIFF_TIFF2PDF
+       bool "tiff2pdf"
+       depends on BR2_PACKAGE_TIFF
+       help
+         tiff2pdf utility
+
+config BR2_PACKAGE_TIFF_TIFFCP
+       bool "tiffcp"
+       depends on BR2_PACKAGE_TIFF
+       help
+         tiffcp utility
index 1d57db760247db5f1ddf0865217a8cd999ae08f9..ed05bf1965bc4936e42a536c5300b7f3d3e4cfb3 100644 (file)
@@ -12,10 +12,74 @@ TIFF_CONF_OPT = \
        --disable-cxx \
        --without-x \
 
-TIFF_DEPENDENCIES = host-pkg-config zlib jpeg
+TIFF_DEPENDENCIES = host-pkg-config
+
+TIFF_TOOLS_LIST =
+ifeq ($(BR2_PACKAGE_TIFF_TIFF2PDF),y)
+       TIFF_TOOLS_LIST += tiff2pdf
+endif
+ifeq ($(BR2_PACKAGE_TIFF_TIFFCP),y)
+       TIFF_TOOLS_LIST += tiffcp
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_CCITT),y)
+       TIFF_CONF_OPT += --disable-ccitt
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_PACKBITS),y)
+       TIFF_CONF_OPT += --disable-packbits
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_LZW),y)
+       TIFF_CONF_OPT += --disable-lzw
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_THUNDER),y)
+       TIFF_CONF_OPT += --disable-thunder
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_NEXT),y)
+       TIFF_CONF_OPT += --disable-next
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_LOGLUV),y)
+       TIFF_CONF_OPT += --disable-logluv
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_MDI),y)
+       TIFF_CONF_OPT += --disable-mdi
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_ZLIB),y)
+       TIFF_CONF_OPT += --disable-zlib
+else
+       TIFF_DEPENDENCIES += zlib
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_PIXARLOG),y)
+       TIFF_CONF_OPT += --disable-pixarlog
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_JPEG),y)
+       TIFF_CONF_OPT += --disable-jpeg
+else
+       TIFF_DEPENDENCIES += jpeg
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_OLD_JPEG),y)
+       TIFF_CONF_OPT += --disable-old-jpeg
+endif
+
+ifneq ($(BR2_PACKAGE_TIFF_JBIG),y)
+       TIFF_CONF_OPT += --disable-jbig
+endif
 
 define TIFF_INSTALL_TARGET_CMDS
        -cp -a $(@D)/libtiff/.libs/libtiff.so* $(TARGET_DIR)/usr/lib/
+       for i in $(TIFF_TOOLS_LIST); \
+       do \
+               $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \
+       done
 endef
 
 $(eval $(call AUTOTARGETS))