TIFF_DEPENDENCIES = host-pkgconf
-TIFF_TOOLS_LIST =
-ifeq ($(BR2_PACKAGE_TIFF_TIFF2PDF),y)
- TIFF_TOOLS_LIST += tiff2pdf
+TIFF_TOOLS_TO_DELETE = \
+ bmp2tiff \
+ fax2ps \
+ fax2tiff \
+ gif2tiff \
+ pal2rgb \
+ ppm2tiff \
+ ras2tiff \
+ raw2tiff \
+ rgb2ycbcr \
+ thumbnail \
+ tiff2bw \
+ tiff2ps \
+ tiff2rgba \
+ tiffcmp \
+ tiffcrop \
+ tiffdither \
+ tiffdump \
+ tiffinfo \
+ tiffmedian \
+ tiffset \
+ tiffsplit \
+
+ifeq ($(BR2_PACKAGE_TIFF_TIFF2PDF),)
+ TIFF_TOOLS_TO_DELETE += tiff2pdf
endif
-ifeq ($(BR2_PACKAGE_TIFF_TIFFCP),y)
- TIFF_TOOLS_LIST += tiffcp
+ifeq ($(BR2_PACKAGE_TIFF_TIFFCP),)
+ TIFF_TOOLS_TO_DELETE += tiffcp
endif
ifneq ($(BR2_PACKAGE_TIFF_CCITT),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
+define TIFF_REMOVE_TOOLS_FIXUP
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(TIFF_TOOLS_TO_DELETE))
endef
+TIFF_POST_INSTALL_TARGET_HOOKS += TIFF_REMOVE_TOOLS_FIXUP
+
$(eval $(autotools-package))