* [Buildroot] [PATCH 1/3 v3] zlib-ng: new package
@ 2017-11-28 23:29 Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 2/3 v3] rename zlib to libzlib Stefan Fröberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Fröberg @ 2017-11-28 23:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
Changes v2 -> v3:
- Add myself to DEVELOPERS files (by Thomas).
- Update github download url.
- Keep only sha256 of the locally computed hashes.
- Add few cmake switches and also check for ARM support.
- Convert to use virtual package infrastructure (by Thomas).
---
DEVELOPERS | 1 +
package/zlib-ng/zlib-ng.hash | 6 ++++++
package/zlib-ng/zlib-ng.mk | 22 ++++++++++++++++++++++
3 files changed, 29 insertions(+)
create mode 100644 package/zlib-ng/zlib-ng.hash
create mode 100644 package/zlib-ng/zlib-ng.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 20fe70253d..9438981de5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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 <stefan.sorensen@spectralink.com>
F: package/cracklib/
diff --git a/package/zlib-ng/zlib-ng.hash b/package/zlib-ng/zlib-ng.hash
new file mode 100644
index 0000000000..b86bcd6a40
--- /dev/null
+++ b/package/zlib-ng/zlib-ng.hash
@@ -0,0 +1,6 @@
+# Locally calculated
+
+sha256 e76d90720373b0e06de10541dc5ae6b12f967239782da43840a9cadf4a08549c zlib-ng-860d7a30f20f0c1e71bc0d8b0d84b88293326f6c.tar.gz
+
+sha256 d3c80be055d94d798eaa786116e84fa0b010bc11420b5d2060d978ea77845436 LICENSE.md
+
diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk
new file mode 100644
index 0000000000..a6f3df4774
--- /dev/null
+++ b/package/zlib-ng/zlib-ng.mk
@@ -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))
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/3 v3] rename zlib to libzlib
2017-11-28 23:29 [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Stefan Fröberg
@ 2017-11-28 23:29 ` Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 3/3 v3] zlib-ng: make zlib a virtual package Stefan Fröberg
2017-11-29 9:44 ` [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Fröberg @ 2017-11-28 23:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
- Rename zlib to libzlib to prevent name clash with coming
virtual zlib package
- Convert libzlib to use virtual package infrastructure
---
package/{zlib/zlib.hash => libzlib/libzlib.hash} | 0
package/{zlib/zlib.mk => libzlib/libzlib.mk} | 43 ++++++++++++------------
package/zlib/Config.in | 7 ----
3 files changed, 22 insertions(+), 28 deletions(-)
rename package/{zlib/zlib.hash => libzlib/libzlib.hash} (100%)
rename package/{zlib/zlib.mk => libzlib/libzlib.mk} (66%)
delete mode 100644 package/zlib/Config.in
diff --git a/package/zlib/zlib.hash b/package/libzlib/libzlib.hash
similarity index 100%
rename from package/zlib/zlib.hash
rename to package/libzlib/libzlib.hash
diff --git a/package/zlib/zlib.mk b/package/libzlib/libzlib.mk
similarity index 66%
rename from package/zlib/zlib.mk
rename to package/libzlib/libzlib.mk
index 9b5f52e807..153ef0fe90 100644
--- a/package/zlib/zlib.mk
+++ b/package/libzlib/libzlib.mk
@@ -4,36 +4,37 @@
#
################################################################################
-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
+LIBZLIB_VERSION = 1.2.11
+LIBZLIB_SOURCE = zlib-$(LIBZLIB_VERSION).tar.xz
+LIBZLIB_SITE = http://www.zlib.net
+LIBZLIB_LICENSE = Zlib
+LIBZLIB_LICENSE_FILES = README
+LIBZLIB_INSTALL_STAGING = YES
+LIBZLIB_PROVIDES = zlib
# 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
+LIBZLIB_PIC =
+LIBZLIB_SHARED = --static
else
-ZLIB_PIC = -fPIC
-ZLIB_SHARED = --shared
+LIBZLIB_PIC = -fPIC
+LIBZLIB_SHARED = --shared
endif
-define ZLIB_CONFIGURE_CMDS
+define LIBZLIB_CONFIGURE_CMDS
(cd $(@D); rm -rf config.cache; \
$(TARGET_CONFIGURE_ARGS) \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \
+ CFLAGS="$(TARGET_CFLAGS) $(LIBZLIB_PIC)" \
./configure \
- $(ZLIB_SHARED) \
+ $(LIBZLIB_SHARED) \
--prefix=/usr \
)
endef
-define HOST_ZLIB_CONFIGURE_CMDS
+define HOST_LIBZLIB_CONFIGURE_CMDS
(cd $(@D); rm -rf config.cache; \
$(HOST_CONFIGURE_ARGS) \
$(HOST_CONFIGURE_OPTS) \
@@ -43,19 +44,19 @@ define HOST_ZLIB_CONFIGURE_CMDS
)
endef
-define ZLIB_BUILD_CMDS
+define LIBZLIB_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)
endef
-define HOST_ZLIB_BUILD_CMDS
+define HOST_LIBZLIB_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D)
endef
-define ZLIB_INSTALL_STAGING_CMDS
+define LIBZLIB_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) LDCONFIG=true install
endef
-define ZLIB_INSTALL_TARGET_CMDS
+define LIBZLIB_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) LDCONFIG=true install
endef
@@ -63,13 +64,13 @@ endef
# 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
+define LIBZLIB_RM_STATIC_STAGING
rm -f $(STAGING_DIR)/usr/lib/libz.a
endef
-ZLIB_POST_INSTALL_STAGING_HOOKS += ZLIB_RM_STATIC_STAGING
+LIBZLIB_POST_INSTALL_STAGING_HOOKS += LIBZLIB_RM_STATIC_STAGING
endif
-define HOST_ZLIB_INSTALL_CMDS
+define HOST_LIBZLIB_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) LDCONFIG=true install
endef
diff --git a/package/zlib/Config.in b/package/zlib/Config.in
deleted file mode 100644
index 6201aba142..0000000000
--- a/package/zlib/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_ZLIB
- bool "zlib"
- help
- Standard (de)compression library. Used by things like
- gzip and libpng.
-
- http://www.zlib.net
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 3/3 v3] zlib-ng: make zlib a virtual package
2017-11-28 23:29 [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 2/3 v3] rename zlib to libzlib Stefan Fröberg
@ 2017-11-28 23:29 ` Stefan Fröberg
2017-11-29 9:44 ` [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Fröberg @ 2017-11-28 23:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Stefan Fr?berg <stefan.froberg@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/3 v3] zlib-ng: new package
2017-11-28 23:29 [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 2/3 v3] rename zlib to libzlib Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 3/3 v3] zlib-ng: make zlib a virtual package Stefan Fröberg
@ 2017-11-29 9:44 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-11-29 9:44 UTC (permalink / raw)
To: buildroot
Hello,
Thanks for this new iteration!
On Wed, 29 Nov 2017 01:29:34 +0200, Stefan Fr?berg wrote:
> Signed-off-by: Stefan Fr?berg <stefan.froberg@petroprogram.com>
>
> Changes v2 -> v3:
>
> - Add myself to DEVELOPERS files (by Thomas).
> - Update github download url.
> - Keep only sha256 of the locally computed hashes.
> - Add few cmake switches and also check for ARM support.
> - Convert to use virtual package infrastructure (by Thomas).
Changes should go after the --- mark, i.e...
>
> ---
... here.
However, there's a bigger problem with your series: it's not bisectable.
If I apply just PATCH 1/3, then zlib-ng is available, but will
conflict/overwrite files installs by zlib. Not good.
If I apply just PATCH 1/3 and PATCH 2/3, then all packages that use
zlib are broken because it's now called libzlib.
So basically, you need to squash PATCH 2/3 and 3/3 into a single patch,
and make that the first patch of the series (of course removing the
zlib-ng support in it).
And then as a second patch, introduce the zlib-ng package, as a new
provider for zlib.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-29 9:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 23:29 [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 2/3 v3] rename zlib to libzlib Stefan Fröberg
2017-11-28 23:29 ` [Buildroot] [PATCH 3/3 v3] zlib-ng: make zlib a virtual package Stefan Fröberg
2017-11-29 9:44 ` [Buildroot] [PATCH 1/3 v3] zlib-ng: new package Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox