Currently, the jpeg-turbo tools are forcibly removed, but they can be
usefull (e.g. to test performance on the target, or to script batch
conversions).
Add an option to allow keeping them.
Signed-off-by: Clément Péron <peron.clem@gmail.com>
[yann.morin.1998@free.fr
- move the option out of the choice
- move the option to a Config.in.options
- drop the default 'n', which is ... the default
- use positive logic to define the hook
- move definition of the hook in the conditional block
- don't indent the hook assignment
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
--- /dev/null
+if BR2_PACKAGE_JPEG_TURBO
+
+config BR2_PACKAGE_JPEG_TURBO_TOOLS
+ bool "jpeg-turbo tools"
+ help
+ Libjpeg-turbo can also provide some tools like cjpeg,
+ djpeg, jpegtran, rdjpgcom, tjbench and wrjpgcom.
+
+ If you want to keep them enable this option.
+
+endif
JPEG_TURBO_CONF_OPTS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
endif
-define JPEG_TURBO_REMOVE_USELESS_TOOLS
+ifeq ($(BR2_PACKAGE_JPEG_TURBO_TOOLS),)
+define JPEG_TURBO_REMOVE_TOOLS
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom)
endef
-
-JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS
+JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_TOOLS
+endif
$(eval $(cmake-package))
endchoice
+source "package/jpeg-turbo/Config.in.options"
+
config BR2_PACKAGE_HAS_JPEG
bool