Skip to contentSkip to conversation

package/tiff: Rework tiff utilities handling

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Apr 23, 2015 – Apr 25, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 package/tiff: Rework tiff utilities handling

From: Bernd Kuhls <[email protected]>

Remove all utility-specific options in favour of a generic option which select either all or no packages. If users want something more fine-grained than that, they can always remove the unnecessary tools in a post-build script.

Since tiff has no configure option or Makefile target to prevent the build/install of its utilities specific Makefile targets are called to build the libtiff and, optionally, the utilities.

[Arnout: more compact implementation, slightly extend help text]

---
v5: More compact implementation with SUBDIRS instead of overriding the
autotools _CMDS; extend Config.in text tiffutils -> tiff utilities; extend Config.in help text with capitalization and _all_ utilities.
v4: rebased
v3: rebased
v2: Replaced submenu with a new all-or-nothing option (Thomas)

---
 Config.in.legacy       | 16 ++++++++++++++++
 package/tiff/Config.in | 11 +++--------
 package/tiff/tiff.mk   | 39 +++++----------------------------------
 3 files changed, 24 insertions(+), 42 deletions(-)
Config.in.legacy +16 -0
index 70a9043..90f474c 100644
@@ -107,6 +107,22 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2015.05"
 
+config BR2_PACKAGE_TIFF_TIFF2PDF
+	bool "tiff utility-specific option removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_TIFF_UTILITIES
+	help
+	  utility-specific options have been removed in favour of
+	  the new option BR2_PACKAGE_TIFF_UTILITIES.
+
+config BR2_PACKAGE_TIFF_TIFFCP
+	bool "tiff utility-specific option removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_TIFF_UTILITIES
+	help
+	  utility-specific options have been removed in favour of
+	  the new option BR2_PACKAGE_TIFF_UTILITIES.
+
 config BR2_LINUX_KERNEL_EXT_RTAI_PATCH
 	bool "RTAI patch file path has been removed"
 	help
package/tiff/Config.in +3 -8
index 3a929f7..acb335c 100644
@@ -60,14 +60,9 @@ config BR2_PACKAGE_TIFF_JBIG
 	default y
 endmenu
 
-config BR2_PACKAGE_TIFF_TIFF2PDF
-	bool "tiff2pdf"
+config BR2_PACKAGE_TIFF_UTILITIES
+	bool "tiff utilities"
 	help
-	  tiff2pdf utility
-
-config BR2_PACKAGE_TIFF_TIFFCP
-	bool "tiffcp"
-	help
-	  tiffcp utility
+	  Install all tiff utilities.
 
 endif
package/tiff/tiff.mk +5 -34
index 06f0e34..6db2abd 100644
@@ -15,36 +15,6 @@ TIFF_CONF_OPTS = \
 
 TIFF_DEPENDENCIES = host-pkgconf
 
-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),)
-TIFF_TOOLS_TO_DELETE += tiffcp
-endif
-
 ifneq ($(BR2_PACKAGE_TIFF_CCITT),y)
 TIFF_CONF_OPTS += --disable-ccitt
 endif
@@ -97,10 +67,11 @@ ifneq ($(BR2_PACKAGE_TIFF_JBIG),y)
 TIFF_CONF_OPTS += --disable-jbig
 endif
 
-define TIFF_REMOVE_TOOLS_FIXUP
-	rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(TIFF_TOOLS_TO_DELETE))
-endef
+TIFF_SUBDIRS = port libtiff
+ifeq ($(BR2_PACKAGE_TIFF_UTILITIES),y)
+TIFF_SUBDIRS += tools
+endif
 
-TIFF_POST_INSTALL_TARGET_HOOKS += TIFF_REMOVE_TOOLS_FIXUP
+TIFF_MAKE = $(MAKE) SUBDIRS="$(TIFF_SUBDIRS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.1.4
#1 lore raw

PATCH v5 1/1 package/tiff: Rework tiff utilities handling

Dear Arnout Vandecappelle (Essensium/Mind),

Quoted 21 lines · Arnout Vandecappelle (Essensium/Mind)

From: Bernd Kuhls <[email protected]>

Remove all utility-specific options in favour of a generic option which select either all or no packages. If users want something more fine-grained than that, they can always remove the unnecessary tools in a post-build script.

Since tiff has no configure option or Makefile target to prevent the build/install of its utilities specific Makefile targets are called to build the libtiff and, optionally, the utilities.

[Arnout: more compact implementation, slightly extend help text]

---
v5: More compact implementation with SUBDIRS instead of overriding the
autotools _CMDS; extend Config.in text tiffutils -> tiff utilities; extend Config.in help text with capitalization and _all_ utilities.
v4: rebased
v3: rebased
v2: Replaced submenu with a new all-or-nothing option (Thomas)

Quoted 5 lines
---
 Config.in.legacy       | 16 ++++++++++++++++
 package/tiff/Config.in | 11 +++--------
 package/tiff/tiff.mk   | 39 +++++----------------------------------
 3 files changed, 24 insertions(+), 42 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com