2017-07-25 18:56:03 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# zstd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-01-06 18:52:40 +01:00
|
|
|
ZSTD_VERSION = v1.3.3
|
2017-07-25 18:56:03 +02:00
|
|
|
ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
|
2017-09-15 14:39:59 +02:00
|
|
|
ZSTD_LICENSE = BSD-3-Clause, GPL-2.0
|
|
|
|
ZSTD_LICENSE_FILES = LICENSE COPYING
|
2017-07-25 18:56:03 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
define ZSTD_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
|
|
|
-C $(@D) zstd
|
|
|
|
endef
|
|
|
|
|
|
|
|
define ZSTD_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
2017-09-16 02:27:12 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
|
2017-07-25 18:56:03 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|