2018-09-25 06:10:07 +02:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=zstd
|
2022-03-03 04:12:59 +01:00
|
|
|
PKG_VERSION:=1.5.2
|
treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.
The following temporary change was made to the core:
diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))
all:
FORCE: ;
And this command used to fix affected packages:
for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
make package/$i/download
done
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 18:32:27 +02:00
|
|
|
PKG_RELEASE:=2
|
2018-09-25 06:10:07 +02:00
|
|
|
|
2022-03-03 04:12:59 +01:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2020-06-03 23:35:39 +02:00
|
|
|
PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
|
2022-03-03 04:12:59 +01:00
|
|
|
PKG_HASH:=7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0
|
2018-09-25 06:10:07 +02:00
|
|
|
|
2020-04-18 09:00:23 +02:00
|
|
|
PKG_MAINTAINER:=
|
2018-09-25 06:10:07 +02:00
|
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
2019-04-30 23:52:57 +02:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2018-09-25 06:10:07 +02:00
|
|
|
|
2019-06-05 20:53:59 +02:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2021-09-08 00:24:45 +02:00
|
|
|
include $(INCLUDE_DIR)/meson.mk
|
2020-04-18 09:00:23 +02:00
|
|
|
|
|
|
|
MESON_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/build/meson/openwrt-build
|
2019-06-05 20:53:59 +02:00
|
|
|
|
2018-09-25 06:10:07 +02:00
|
|
|
define Package/zstd/Default
|
2020-04-18 09:00:23 +02:00
|
|
|
SUBMENU:=Compression
|
|
|
|
URL:=https://github.com/facebook/zstd
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libzstd
|
|
|
|
$(call Package/zstd/Default)
|
2020-04-18 09:00:23 +02:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=zstd library.
|
|
|
|
MENU:=1
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libzstd/description
|
2020-04-18 09:00:23 +02:00
|
|
|
Zstandard - Fast real-time compression algorithm.
|
|
|
|
This package provides libzstd library.
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libzstd/config
|
|
|
|
config ZSTD_OPTIMIZE_O3
|
|
|
|
bool "Use all optimizations (-O3)"
|
2019-07-20 06:08:19 +02:00
|
|
|
depends on PACKAGE_libzstd
|
2018-09-25 06:10:07 +02:00
|
|
|
default y
|
|
|
|
help
|
|
|
|
This enables additional optmizations using the -O3 compilation flag.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zstd
|
|
|
|
$(call Package/zstd/Default)
|
2020-04-18 09:00:23 +02:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=+libzstd
|
|
|
|
TITLE:=Fast real-time compression algorithm.
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zstd/description
|
2020-04-18 09:00:23 +02:00
|
|
|
Zstandard - Fast real-time compression algorithm.
|
|
|
|
This package provides the zstd binaries.
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
2019-07-20 06:08:19 +02:00
|
|
|
ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
|
|
|
|
TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS)) -O3
|
|
|
|
endif
|
|
|
|
|
2020-04-18 09:00:23 +02:00
|
|
|
MESON_ARGS += \
|
2021-10-24 20:34:25 +02:00
|
|
|
-Dlegacy_level=7 \
|
2020-04-18 09:00:23 +02:00
|
|
|
-Ddebug_level=0 \
|
|
|
|
-Dbacktrace=false \
|
|
|
|
-Dstatic_runtime=false \
|
|
|
|
-Dbin_programs=true \
|
|
|
|
-Dbin_tests=false \
|
2021-10-24 20:34:25 +02:00
|
|
|
-Dbin_contrib=false \
|
|
|
|
-Dmulti_thread=enabled \
|
2020-04-18 09:00:23 +02:00
|
|
|
-Dzlib=disabled \
|
|
|
|
-Dlzma=disabled \
|
2020-04-26 04:50:05 +02:00
|
|
|
-Dlz4=disabled \
|
|
|
|
-Db_lto=true
|
2019-07-20 06:08:19 +02:00
|
|
|
|
2019-09-16 20:50:13 +02:00
|
|
|
define Build/InstallDev
|
2020-04-18 09:00:23 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzstd.pc $(1)/usr/lib/pkgconfig
|
2019-09-16 20:50:13 +02:00
|
|
|
endef
|
|
|
|
|
2018-09-25 06:10:07 +02:00
|
|
|
define Package/libzstd/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2020-04-18 09:00:23 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zstd/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2020-04-18 09:00:23 +02:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdgrep,zstdless,zstdmt} $(1)/usr/bin
|
2018-09-25 06:10:07 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libzstd))
|
|
|
|
$(eval $(call BuildPackage,zstd))
|