[Buildroot] [PATCH 3/3 v3] zlib-ng: make zlib a virtual package
Stefan Fröberg
stefan.froberg at petroprogram.com
Tue Nov 28 23:29:36 UTC 2017
Signed-off-by: Stefan Fröberg <stefan.froberg at petroprogram.com>
- Convert zlib to virtual package
---
package/zlib/Config.in | 42 ++++++++++++++++++++++++++++++++++++++++++
package/zlib/zlib.mk | 7 +++++++
2 files changed, 49 insertions(+)
create mode 100644 package/zlib/Config.in
create mode 100644 package/zlib/zlib.mk
diff --git a/package/zlib/Config.in b/package/zlib/Config.in
new file mode 100644
index 0000000000..877916594a
--- /dev/null
+++ b/package/zlib/Config.in
@@ -0,0 +1,42 @@
+config BR2_PACKAGE_ZLIB
+ bool "zlib support"
+ help
+ Select the desired Zlib library provider.
+
+if BR2_PACKAGE_ZLIB
+
+choice
+ prompt "zlib variant"
+ default BR2_PACKAGE_LIBZLIB
+ help
+ Select the normal zlib or zlib-ng.
+
+config BR2_PACKAGE_LIBZLIB
+ bool "zlib"
+ select BR2_PACKAGE_HAS_ZLIB
+ help
+ Standard (de)compression library. Used by things like
+ gzip and libpng.
+
+ http://www.zlib.net
+
+config BR2_PACKAGE_ZLIB_NG
+ bool "zlib-ng"
+ select BR2_PACKAGE_HAS_ZLIB
+ help
+ zlib replacement with optimizations for
+ "next generation" systems.
+
+ https://github.com/Dead2/zlib-ng
+
+endchoice
+
+config BR2_PACKAGE_HAS_ZLIB
+ bool
+
+config BR2_PACKAGE_PROVIDES_ZLIB
+ string
+ default "libzlib" if BR2_PACKAGE_LIBZLIB
+ default "zlib-ng" if BR2_PACKAGE_ZLIB_NG
+
+endif
diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk
new file mode 100644
index 0000000000..48f6e20ecd
--- /dev/null
+++ b/package/zlib/zlib.mk
@@ -0,0 +1,7 @@
+################################################################################
+#
+# zlib
+#
+################################################################################
+
+$(eval $(virtual-package))
--
2.13.6
More information about the buildroot
mailing list