Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 16:07:44 +02:00
commit 6d0099d1a1
9195 changed files with 1607273 additions and 0 deletions

38
tools/lz4/Makefile Normal file
View File

@@ -0,0 +1,38 @@
#
# Copyright (C) 2022 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=lz4
PKG_VERSION:=1.9.4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE lib/LICENSE
PKG_CPE_ID:=cpe:/a:lz4_project:lz4
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/meson.mk
MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/contrib/meson/openwrt-build
# Always optimize for speed
HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3
MESON_HOST_ARGS += \
-Ddefault_library=static \
-Ddebug-level=0 \
-Dunstable=false \
-Dprograms=true \
-Dtests=false \
-Dcontrib=false \
-Dexamples=false
$(eval $(call HostBuild))

View File

@@ -0,0 +1,60 @@
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -66,6 +66,7 @@ LZ4_VERSION=$(LIBVER)
MD2ROFF = ronn
MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4 $(LZ4_VERSION)"
+ENABLE_DOCS ?= 1
default: lz4-release
@@ -120,6 +121,7 @@ lz4c32: CFLAGS += -m32
lz4c32 : $(SRCFILES)
$(CC) $(FLAGS) $^ -o $@$(EXT)
+ifeq ($(ENABLE_DOCS),1)
lz4.1: lz4.1.md $(LIBVER_SRC)
cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@
@@ -130,6 +132,7 @@ clean-man:
preview-man: clean-man man
man ./lz4.1
+endif
clean:
ifeq ($(WINBASED),yes)
@@ -172,16 +175,19 @@ man1dir ?= $(MAN1DIR)
install: lz4
@echo Installing binaries in $(DESTDIR)$(bindir)
- $(INSTALL_DIR) $(DESTDIR)$(bindir)/ $(DESTDIR)$(man1dir)/
+ $(INSTALL_DIR) $(DESTDIR)$(bindir)/
$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
+ifeq ($(ENABLE_DOCS),1)
@echo Installing man pages in $(DESTDIR)$(man1dir)
+ $(INSTALL_DIR) $(DESTDIR)$(man1dir)/
$(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4cat.1
$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/unlz4.1
+endif
@echo lz4 installation completed
uninstall:
@@ -189,10 +195,12 @@ uninstall:
$(RM) $(DESTDIR)$(bindir)/unlz4$(EXT)
$(RM) $(DESTDIR)$(bindir)/lz4$(EXT)
$(RM) $(DESTDIR)$(bindir)/lz4c$(EXT)
+ifeq ($(ENABLE_DOCS),1)
$(RM) $(DESTDIR)$(man1dir)/lz4.1
$(RM) $(DESTDIR)$(man1dir)/lz4c.1
$(RM) $(DESTDIR)$(man1dir)/lz4cat.1
$(RM) $(DESTDIR)$(man1dir)/unlz4.1
+endif
@echo lz4 programs successfully uninstalled
endif

View File

@@ -0,0 +1,68 @@
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -195,8 +195,8 @@ install: lib liblz4.pc
$(INSTALL_PROGRAM) dll/$(LIBLZ4_EXP) $(DESTDIR)$(libdir)
else
$(INSTALL_PROGRAM) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)
- $(LN_SF) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT_MAJOR)
- $(LN_SF) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT)
+ (cd $(DESTDIR)$(libdir) && $(LN_SF) liblz4.$(SHARED_EXT_VER) liblz4.$(SHARED_EXT_MAJOR))
+ (cd $(DESTDIR)$(libdir) && $(LN_SF) liblz4.$(SHARED_EXT_MAJOR) liblz4.$(SHARED_EXT))
endif
endif
@echo Installing headers in $(DESTDIR)$(includedir)
--- a/Makefile
+++ b/Makefile
@@ -77,12 +77,12 @@ build_tests:
.PHONY: clean
clean:
- $(MAKE) -C $(LZ4DIR) $@ > $(VOID)
- $(MAKE) -C $(PRGDIR) $@ > $(VOID)
- $(MAKE) -C $(TESTDIR) $@ > $(VOID)
- $(MAKE) -C $(EXDIR) $@ > $(VOID)
- $(MAKE) -C $(FUZZDIR) $@ > $(VOID)
- $(MAKE) -C contrib/gen_manual $@ > $(VOID)
+ $(MAKE) -C $(LZ4DIR) $@
+ $(MAKE) -C $(PRGDIR) $@
+ $(MAKE) -C $(TESTDIR) $@
+ $(MAKE) -C $(EXDIR) $@
+ $(MAKE) -C $(FUZZDIR) $@
+ $(MAKE) -C contrib/gen_manual $@
$(RM) lz4$(EXT)
$(RM) -r $(CMAKE_BUILD_DIR)
@echo Cleaning completed
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -138,7 +138,7 @@ clean:
ifeq ($(WINBASED),yes)
$(RM) *.rc
endif
- $(MAKE) -C $(LZ4DIR) $@ > $(VOID)
+ $(MAKE) -C $(LZ4DIR) $@
$(RM) core *.o *.test tmp* \
lz4$(EXT) lz4c$(EXT) lz4c32$(EXT) lz4-wlib$(EXT) \
unlz4$(EXT) lz4cat$(EXT)
@@ -177,16 +177,16 @@ install: lz4
@echo Installing binaries in $(DESTDIR)$(bindir)
$(INSTALL_DIR) $(DESTDIR)$(bindir)/
$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
- $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
- $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
- $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
+ (cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) lz4c$(EXT))
+ (cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) lz4cat$(EXT))
+ (cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) unlz4$(EXT))
ifeq ($(ENABLE_DOCS),1)
@echo Installing man pages in $(DESTDIR)$(man1dir)
$(INSTALL_DIR) $(DESTDIR)$(man1dir)/
$(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
- $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
- $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4cat.1
- $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/unlz4.1
+ (cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 lz4c.1)
+ (cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 lz4cat.1)
+ (cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 unlz4.1)
endif
@echo lz4 installation completed