Skip to contentSkip to conversation

zlib-ng: rename zlib to libzlib

PATCH Superseded Stefan Fröberg 1 participant 2 messages Nov 29, 2017

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 zlib-ng: rename zlib to libzlib

Rename zlib to libzlib and make zlib a virtual package.

---

Changes v3->v4:

- Merge and reorder patches (by Thomas Petazzoni)

 package/{zlib/zlib.hash => libzlib/libzlib.hash} |  0
 package/libzlib/libzlib.mk                       | 78 ++++++++++++++++++++++++
 package/zlib/Config.in                           | 25 ++++++++
 package/zlib/zlib.mk                             | 72 +---------------------
 4 files changed, 104 insertions(+), 71 deletions(-)
 rename package/{zlib/zlib.hash => libzlib/libzlib.hash} (100%)
 create mode 100644 package/libzlib/libzlib.mk
package/libzlib/libzlib.hash renamed from package/zlib/zlib.hash +0 -0
similarity index 100%
rename from package/zlib/zlib.hash
rename to package/libzlib/libzlib.hash
package/libzlib/libzlib.mk new file +78 -0

78 lines not on this page · raw message

package/zlib/Config.in +25 -0
index 6201aba142..043c3cefa4 100644
@@ -1,7 +1,32 @@
 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 desired Zlib library provider.
+
+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
+
+endchoice
+
+config BR2_PACKAGE_HAS_ZLIB
+	bool
+
+config BR2_PACKAGE_PROVIDES_ZLIB
+	string
+	default "libzlib" if BR2_PACKAGE_LIBZLIB
+
+endif
package/zlib/zlib.mk +1 -71

75 lines not on this page · raw message

Signature · 1 line
2.13.6
#1 lore raw

PATCH v4 2/2 zlib-ng: new package

zlib-ng, fast Zlib replacement

---

Changes v3 -> v4:

- Reorder patches (by Thomas Petazzoni)

 DEVELOPERS                   |  1 +
 package/zlib-ng/zlib-ng.hash |  6 ++++++
 package/zlib-ng/zlib-ng.mk   | 22 ++++++++++++++++++++++
 package/zlib/Config.in       | 10 ++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/zlib-ng/zlib-ng.hash
 create mode 100644 package/zlib-ng/zlib-ng.mk
DEVELOPERS +1 -0
index 20fe70253d..9438981de5 100644
@@ -1541,6 +1541,7 @@ F:	package/elfutils/
 F:	package/libtasn1/
 F:	package/proxychains-ng/
 F:	package/yasm/
+F:	package/zlib-ng/
 
 N:	Stefan S?rensen <[email protected]>
 F:	package/cracklib/
package/zlib-ng/zlib-ng.hash new file +6 -0
new file mode 100644
index 0000000000..b86bcd6a40
@@ -0,0 +1,6 @@
+# Locally calculated
+
+sha256	e76d90720373b0e06de10541dc5ae6b12f967239782da43840a9cadf4a08549c  zlib-ng-860d7a30f20f0c1e71bc0d8b0d84b88293326f6c.tar.gz
+
+sha256	d3c80be055d94d798eaa786116e84fa0b010bc11420b5d2060d978ea77845436 LICENSE.md
+
package/zlib-ng/zlib-ng.mk new file +22 -0
new file mode 100644
index 0000000000..2ed29f3b2e
@@ -0,0 +1,22 @@
+################################################################################
+#
+# zlib-ng
+#
+################################################################################
+
+ZLIB_NG_VERSION = 860d7a30f20f0c1e71bc0d8b0d84b88293326f6c
+ZLIB_NG_SITE = $(call github,Dead2,zlib-ng,$(ZLIB_NG_VERSION))
+ZLIB_NG_LICENSE = Zlib
+ZLIB_NG_LICENSE_FILES = LICENSE.md
+ZLIB_NG_INSTALL_STAGING = YES
+ZLIB_NG_PROVIDES = zlib
+
+# Build with zlib compatible API, gzFile support and optimizations on
+ZLIB_NG_CONF_OPTS += -DZLIB_COMPAT=1 -DWITH_GZFILEOP=1 -DWITH_OPTIM=1 -DCC=$(TARGET_CC)
+
+# Enable NEON and ACLE on ARM
+ifeq ($(BR2_arm),y)
+ZLIB_NG_CONF_OPTS += -DWITH_ACLE=1 -DWITH_NEON=1
+endif
+
+$(eval $(cmake-package))
package/zlib/Config.in +10 -0
index 043c3cefa4..5ca3365462 100644
@@ -20,6 +20,15 @@ config BR2_PACKAGE_LIBZLIB
 
 	  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
@@ -28,5 +37,6 @@ config BR2_PACKAGE_HAS_ZLIB
 config BR2_PACKAGE_PROVIDES_ZLIB
 	string
 	default "libzlib" if BR2_PACKAGE_LIBZLIB
+	default "zlib-ng" if BR2_PACKAGE_ZLIB_NG
 
 endif
Signature · 1 line
2.13.6