package/pigz: add host package support
authorLouis-Paul Cordier <lpdev@cordier.org>
Tue, 10 Mar 2020 09:58:16 +0000 (10:58 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 22 Mar 2020 21:42:32 +0000 (22:42 +0100)
Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/Config.in.host
package/pigz/Config.in
package/pigz/Config.in.host [new file with mode: 0644]
package/pigz/pigz.mk

index 64a88f76306bb36a7fef515bc2ec8d106316417d..eb8f63f6890a2d59c08f7fccfc0d1ce8db3b52e9 100644 (file)
@@ -52,6 +52,7 @@ menu "Host utilities"
        source "package/opkg-utils/Config.in.host"
        source "package/parted/Config.in.host"
        source "package/patchelf/Config.in.host"
+       source "package/pigz/Config.in.host"
        source "package/pkgconf/Config.in.host"
        source "package/pru-software-support/Config.in.host"
        source "package/pwgen/Config.in.host"
index af229060cf5f2c3f846c1c6c012bc110923b422d..a76146d8fcb5b8f582541bd61ecc406ff1039865 100644 (file)
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PIGZ
        bool "pigz"
        depends on BR2_TOOLCHAIN_HAS_THREADS
        select BR2_PACKAGE_ZLIB
+       select BR2_PACKAGE_HOST_ZLIB
        help
          pigz, which stands for parallel implementation of gzip, is a
          fully functional replacement for gzip that exploits multiple
diff --git a/package/pigz/Config.in.host b/package/pigz/Config.in.host
new file mode 100644 (file)
index 0000000..9903cad
--- /dev/null
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_HOST_PIGZ
+       bool "host pigz"
+       help
+         pigz, which stands for parallel implementation of gzip, is a
+         fully functional replacement for gzip that exploits multiple
+         processors and multiple cores to the hilt when compressing
+         data.
+
+         http://www.zlib.net/pigz/
index b4f28c048eb678f437087a2894ed9a5291fc18e2..23df0f5fcb0dd065119201797c4d4c62f954fc52 100644 (file)
@@ -7,6 +7,7 @@
 PIGZ_VERSION = 2.4
 PIGZ_SITE = $(call github,madler,pigz,v$(PIGZ_VERSION))
 PIGZ_DEPENDENCIES = zlib
+HOST_PIGZ_DEPENDENCIES = host-zlib
 PIGZ_LICENSE = Zlib
 PIGZ_LICENSE_FILES = README
 
@@ -14,8 +15,17 @@ define PIGZ_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef
 
+define HOST_PIGZ_BUILD_CMDS
+       $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
+endef
+
 define PIGZ_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0755 $(@D)/pigz $(TARGET_DIR)/usr/bin/pigz
 endef
 
+define HOST_PIGZ_INSTALL_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/pigz $(HOST_DIR)/bin/pigz
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))