zlib-ng: rename zlib to libzlib
PATCH v5 1/2 zlib-ng: rename zlib to libzlib
---
Changes v4 -> v5:
- Added host-zlib support to virtual zlib package
package/{zlib/zlib.hash => libzlib/libzlib.hash} | 0
package/libzlib/libzlib.mk | 78 ++++++++++++++++++++++++
package/zlib/Config.in | 25 ++++++++
package/zlib/zlib.mk | 73 +---------------------
4 files changed, 105 insertions(+), 71 deletions(-)
rename package/{zlib/zlib.hash => libzlib/libzlib.hash} (100%)
create mode 100644 package/libzlib/libzlib.mkpackage/libzlib/libzlib.hash renamed from package/zlib/zlib.hash +0 -0
package/libzlib/libzlib.mk new file +78 -0
78 lines not on this page · raw message
package/zlib/Config.in +25 -0
@@ -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 +2 -71
76 lines not on this page · raw message
Signature · 1 line
2.13.6
PATCH v5 2/2 zlib-ng: new package
zlib-ng, a fast Zlib replacement
---
Changes v4 -> v5:
- Added support for host-zlib-ng
- Updated github url to use latest commit from:
https://github.com/mtl1979/zlib-ng/tree/renamelib
That fixes the following issues:
https://github.com/Dead2/zlib-ng/issues/136
DEVELOPERS | 1 + package/zlib-ng/zlib-ng.hash | 6 ++++++ package/zlib-ng/zlib-ng.mk | 26 ++++++++++++++++++++++++++ package/zlib/Config.in | 10 ++++++++++ 4 files changed, 43 insertions(+) create mode 100644 package/zlib-ng/zlib-ng.hash create mode 100644 package/zlib-ng/zlib-ng.mk
DEVELOPERS +1 -0
@@ -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
@@ -0,0 +1,6 @@ +# Locally calculated + +sha256 2ec78c8c13530bffaebfc10be2f4695c47cf50fe2fbc2104606467703836fa0e zlib-ng-a17fefa147942edbf80ab22a16bcbc2419def12d.tar.gz + +sha256 d3c80be055d94d798eaa786116e84fa0b010bc11420b5d2060d978ea77845436 LICENSE.md +
package/zlib-ng/zlib-ng.mk new file +26 -0
@@ -0,0 +1,26 @@ +################################################################################ +# +# zlib-ng +# +################################################################################ + +ZLIB_NG_VERSION = a17fefa147942edbf80ab22a16bcbc2419def12d +ZLIB_NG_SITE = $(call github,mtl1979,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 + +# For host zlib-ng, we don't care about optimizations +HOST_ZLIB_NG_CONF_OPTS += -DZLIB_COMPAT=1 -DWITH_GZFILEOP=1 + +$(eval $(cmake-package)) +$(eval $(host-cmake-package))
package/zlib/Config.in +10 -0
@@ -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/mtl1979/zlib-ng/tree/renamelib + 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
PATCH v5 2/2 zlib-ng: new package
Hello,
Quoted 5 lines · Stefan Fr?berg
zlib-ng, a fast Zlib replacement
Signed-off-by Stefan Fr?berg <[email protected]>---
Changes v4 -> v5:
I've applied, after dropping the host variant of zlib-ng, since host-zlib always builds host-libzlib.
I've also dropped empty newlines in the hash file.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 2/2 zlib-ng: new package
Hi Thomas
Okay.
Thank you :-)
-S-
Thomas Petazzoni kirjoitti 03.01.2018 klo 23:52:
Quoted 16 lines
Hello,
Quoted 5 lines · Stefan Fr?berg
zlib-ng, a fast Zlib replacement
Signed-off-by Stefan Fr?berg <[email protected]>---
Changes v4 -> v5:I've applied, after dropping the host variant of zlib-ng, since host-zlib always builds host-libzlib.
I've also dropped empty newlines in the hash file.
Thanks!
Thomas
PATCH v5 1/2 zlib-ng: rename zlib to libzlib
In reply to Stefan FröbergStfean, All,
On 2017-11-29 23:17 +0200, Stefan Fr?berg spake thusly:
Quoted 5 lines
Signed-off-by Stefan Fr?berg <[email protected]>---
Changes v4 -> v5:- Added host-zlib support to virtual zlib package
Indeed. ;-) But see below...
[--SNIP--]
Quoted 27 lines
package/zlib/Config.in +15
-0@@ -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 +
package/zlib/Config.in line 32
Quoted 10 lines
package/zlib/Config.in +10
-0+endchoice + +config BR2_PACKAGE_HAS_ZLIB + bool + +config BR2_PACKAGE_PROVIDES_ZLIB + string + default "libzlib" if BR2_PACKAGE_LIBZLIB + +endif
So far, only zlib is a target provider, so a host provider.
But when you add zlib-ng, selecting zlib-ng for the target will imply zlib-ng for the host.
It sounds weird that the choice of a target package has an impact on the host package.
Besides, if zlib is not enabled in the configuration, then there will be no host variant either.
So, we want to do something similar to what was done for openssl: always use one variant for the host (and I think we want it to be zlib, not zlib-ng).
See for reference: 915a627f (openssl: unconditionally define BR2_PACKAGE_PROVIDES_HOST_OPENSSL)
Regards,
Yann E. MORIN.
Quoted 84 lines
package/zlib/zlib.mk +2
-71@@ -4,74 +4,5 @@ # ################################################################################ -ZLIB_VERSION = 1.2.11 -ZLIB_SOURCE = zlib-$(ZLIB_VERSION).tar.xz -ZLIB_SITE = http://www.zlib.net -ZLIB_LICENSE = Zlib -ZLIB_LICENSE_FILES = README -ZLIB_INSTALL_STAGING = YES - -# It is not possible to build only a shared version of zlib, so we build both -# shared and static, unless we only want the static libs, and we eventually -# selectively remove what we do not want -ifeq ($(BR2_STATIC_LIBS),y) -ZLIB_PIC = -ZLIB_SHARED = --static -else -ZLIB_PIC = -fPIC -ZLIB_SHARED = --shared -endif - -define ZLIB_CONFIGURE_CMDS - (cd $(@D); rm -rf config.cache; \ - $(TARGET_CONFIGURE_ARGS) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \ - ./configure \ - $(ZLIB_SHARED) \ - --prefix=/usr \ - ) -endef - -define HOST_ZLIB_CONFIGURE_CMDS - (cd $(@D); rm -rf config.cache; \ - $(HOST_CONFIGURE_ARGS) \ - $(HOST_CONFIGURE_OPTS) \ - ./configure \ - --prefix="$(HOST_DIR)" \ - --sysconfdir="$(HOST_DIR)/etc" \ - ) -endef - -define ZLIB_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) -endef - -define HOST_ZLIB_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE1) -C $(@D) -endef - -define ZLIB_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) LDCONFIG=true install -endef - -define ZLIB_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) LDCONFIG=true install -endef - -# We don't care removing the .a from target, since it not used at link -# time to build other packages, and it is anyway removed later before -# assembling the filesystem images anyway. -ifeq ($(BR2_SHARED_LIBS),y) -define ZLIB_RM_STATIC_STAGING - rm -f $(STAGING_DIR)/usr/lib/libz.a -endef -ZLIB_POST_INSTALL_STAGING_HOOKS += ZLIB_RM_STATIC_STAGING -endif - -define HOST_ZLIB_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE1) -C $(@D) LDCONFIG=true install -endef - -$(eval $(generic-package)) -$(eval $(host-generic-package)) +$(eval $(virtual-package)) +$(eval $(host-virtual-package))Signature · 1 line
2.13.6
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v5 1/2 zlib-ng: rename zlib to libzlib
In reply to Stefan FröbergHello,
Quoted 3 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg <[email protected]>---
Changes v4 -> v5:
I've applied, after adding BR2_PACKAGE_PROVIDES_HOST_ZLIB as suggested by Yann E. Morin, and reworking the commit title and commit log.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com