Skip to contentSkip to conversation

package/tiff: add libdeflate optional dependency

PATCH Superseded Fabrice Fontaine 2 participants 5 messages Dec 22, 2022 – Dec 27, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/tiff: add libdeflate optional dependency

libdeflate is an optional dependency which is enabled by default since version 4.2.0 and
https://gitlab.com/libtiff/libtiff/-/commit/3a2de853a932bd0ea79d1677d319841edb736c38

---
 package/tiff/Config.in | 6 ++++++
 package/tiff/tiff.mk   | 7 +++++++
 2 files changed, 13 insertions(+)
package/tiff/Config.in +6 -0
index f842c2ead8..58e2052ea5 100644
@@ -11,6 +11,12 @@ config BR2_PACKAGE_TIFF_CCITT
 	bool "CCITT Group 3 & 4 support"
 	default y
 
+config BR2_PACKAGE_TIFF_LIBDEFLATE
+	bool "Libdeflate usage (still requires Zlib)"
+	default y
+	select BR2_PACKAGE_LIBDEFLATE
+	select BR2_PACKAGE_TIFF_ZLIB
+
 config BR2_PACKAGE_TIFF_PACKBITS
 	bool "Macintosh PackBits algorithm"
 	default y
package/tiff/tiff.mk +7 -0
index 7981bdf2c9..a753065fde 100644
@@ -33,6 +33,13 @@ ifneq ($(BR2_PACKAGE_TIFF_CCITT),y)
 TIFF_CONF_OPTS += --disable-ccitt
 endif
 
+ifeq ($(BR2_PACKAGE_TIFF_LIBDEFLATE),y)
+TIFF_CONF_OPTS += --enable-libdeflate
+TIFF_DEPENDENCIES += libdeflate
+else
+TIFF_CONF_OPTS += --disable-libdeflate
+endif
+
 ifneq ($(BR2_PACKAGE_TIFF_PACKBITS),y)
 TIFF_CONF_OPTS += --disable-packbits
 endif
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 15 lines · On Thu, 22 Dec 2022 17:51:17 +0100 Fabrice Fontaine…

libdeflate is an optional dependency which is enabled by default since version 4.2.0 and
https://gitlab.com/libtiff/libtiff/-/commit/3a2de853a932bd0ea79d1677d319841edb736c38

---
 package/tiff/Config.in | 6 ++++++
 package/tiff/tiff.mk   | 7 +++++++
 2 files changed, 13 insertions(+)
package/tiff/Config.in +0 -0
index f842c2ead8..58e2052ea5 100644

package/tiff/Config.in config BR2_PACKAGE_TIFF_CCITT · line 16

Quoted 6 lines
package/tiff/Config.in +3 -0
@@ -11,6 +11,12 @@ config BR2_PACKAGE_TIFF_CCITT
 	bool "CCITT Group 3 & 4 support"
 	default y
 
+config BR2_PACKAGE_TIFF_LIBDEFLATE
+	bool "Libdeflate usage (still requires Zlib)"
+	default y

Is there any reason to have this "default y"? We normally try to disable optional features by default, especially if they bring extra dependencies.

I see it's a policy that has not been really applied to the tiff package, but I'm wondering if there's a particular reason to not apply our normal policy to this new option?

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello,

Quoted 30 lines · Thomas Petazzoni
Quoted 3 lines · On Thu, 22 Dec 2022 17:51:17 +0100 Fabrice Fontaine…

libdeflate is an optional dependency which is enabled by default since version 4.2.0 and

https://gitlab.com/libtiff/libtiff/-/commit/3a2de853a932bd0ea79d1677d319841edb736c38

Quoted 12 lines
---
 package/tiff/Config.in | 6 ++++++
 package/tiff/tiff.mk   | 7 +++++++
 2 files changed, 13 insertions(+)
package/tiff/Config.in +0 -0
index f842c2ead8..58e2052ea5 100644

package/tiff/Config.in config BR2_PACKAGE_TIFF_CCITT · line 16

Quoted 6 lines
package/tiff/Config.in +3 -0
@@ -11,6 +11,12 @@ config BR2_PACKAGE_TIFF_CCITT
      bool "CCITT Group 3 & 4 support"
      default y
 
+config BR2_PACKAGE_TIFF_LIBDEFLATE
+     bool "Libdeflate usage (still requires Zlib)"
+     default y

Is there any reason to have this "default y"? We normally try to disable optional features by default, especially if they bring extra dependencies.

Quoted 4 lines

I see it's a policy that has not been really applied to the tiff package, but I'm wondering if there's a particular reason to not apply our normal policy to this new option?

I decided to enable it by default for backward compatibility and because (for an unknown reason) most tiff options are enabled by default but I can send a v2 if needed.

Quoted 9 lines

Best regards,

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

Best Regards,

Fabrice

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 7 lines · On Tue, 27 Dec 2022 22:40:52 +0100 Fabrice Fontaine…
Quoted 3 lines

I see it's a policy that has not been really applied to the tiff package, but I'm wondering if there's a particular reason to not apply our normal policy to this new option?

I decided to enable it by default for backward compatibility and because (for an unknown reason) most tiff options are enabled by default but I can send a v2 if needed.

Could you expand a bit on the backward compatibility reason? Is that feature today enabled by default?

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
Quoted 7 lines · Thomas Petazzoni
Quoted 4 lines · On Tue, 27 Dec 2022 22:40:52 +0100 Fabrice Fontaine…
Quoted 3 lines

I see it's a policy that has not been really applied to the tiff package, but I'm wondering if there's a particular reason to not apply our normal policy to this new option?

Quoted 8 lines
Quoted 2 lines

I decided to enable it by default for backward compatibility and because (for an unknown reason) most tiff options are enabled by default but I

can

Quoted 1 line

send a v2 if needed.

Could you expand a bit on the backward compatibility reason? Is that feature today enabled by default?

Yes, as I wrote in the commit message, libdeflate is enabled by default since its addition in version 4.2.0.
However, obviously, libdeflate has to be built before tiff and libdeflate has only been added to buildroot in August so I assume that most of the time tiff is built without libdeflate support.
So, disabling it by default as you suggested is probably better.

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

Best Regards,

Fabrice

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot