This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

12
package/zstd/Config.in Normal file
View File

@@ -0,0 +1,12 @@
config BR2_PACKAGE_ZSTD
bool "zstd"
help
Zstandard, or zstd as short version, is a fast lossless
compression algorithm, targeting real-time compression
scenarios at zlib-level and better compression ratios
The selection of other packages will enable some features:
xz, lz4 and/or zlib will enable support for corresponding
compression formats
https://facebook.github.io/zstd

View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_HOST_ZSTD
bool "host zstd"
help
Zstandard, or zstd as short version, is a fast lossless
compression algorithm, targeting real-time compression
scenarios at zlib-level and better compression ratios
https://facebook.github.io/zstd

6
package/zstd/zstd.hash Normal file
View File

@@ -0,0 +1,6 @@
# Locally computed
sha256 7a6e1dad34054b35e2e847eb3289be8820a5d378228802239852f913c6dcf6a7 zstd-1.4.2.tar.gz
# License files (locally computed as well)
sha256 2c1a7fa704df8f3a606f6fc010b8b5aaebf403f3aeec339a12048f1ba7331a0b LICENSE
sha256 f9c375a1be4a41f7b70301dd83c91cb89e41567478859b77eef375a52d782505 COPYING

87
package/zstd/zstd.mk Normal file
View File

@@ -0,0 +1,87 @@
################################################################################
#
# zstd
#
################################################################################
ZSTD_VERSION = 1.4.2
ZSTD_SITE = $(call github,facebook,zstd,v$(ZSTD_VERSION))
ZSTD_INSTALL_STAGING = YES
ZSTD_LICENSE = BSD-3-Clause or GPL-2.0
ZSTD_LICENSE_FILES = LICENSE COPYING
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
ZSTD_OPTS += HAVE_THREAD=1
else
ZSTD_OPTS += HAVE_THREAD=0
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
ZSTD_DEPENDENCIES += zlib
ZSTD_OPTS += HAVE_ZLIB=1
else
ZSTD_OPTS += HAVE_ZLIB=0
endif
ifeq ($(BR2_PACKAGE_XZ),y)
ZSTD_DEPENDENCIES += xz
ZSTD_OPTS += HAVE_LZMA=1
else
ZSTD_OPTS += HAVE_LZMA=0
endif
ifeq ($(BR2_PACKAGE_LZ4),y)
ZSTD_DEPENDENCIES += lz4
ZSTD_OPTS += HAVE_LZ4=1
else
ZSTD_OPTS += HAVE_LZ4=0
endif
ifeq ($(BR2_STATIC_LIBS),y)
ZSTD_BUILD_LIBS = libzstd.a
ZSTD_INSTALL_LIBS = install-static
else ifeq ($(BR2_SHARED_LIBS),y)
ZSTD_BUILD_LIBS = libzstd
ZSTD_INSTALL_LIBS = install-shared
else
ZSTD_BUILD_LIBS = libzstd.a libzstd
ZSTD_INSTALL_LIBS = install-static install-shared
endif
define ZSTD_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
-C $(@D)/lib $(ZSTD_BUILD_LIBS)
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
-C $(@D) zstd
endef
define ZSTD_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib \
install-pc install-includes $(ZSTD_INSTALL_LIBS)
endef
define ZSTD_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS)
endef
# note: no 'HAVE_...' options for host library build only
define HOST_ZSTD_BUILD_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
-C $(@D)/lib
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
-C $(@D) zstd
endef
define HOST_ZSTD_INSTALL_CMDS
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/programs install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))