diff --git a/repos/libports/lib/import/import-lz4.mk b/repos/libports/lib/import/import-lz4.mk new file mode 100644 index 0000000000..cc2e006fc2 --- /dev/null +++ b/repos/libports/lib/import/import-lz4.mk @@ -0,0 +1 @@ +INC_DIR += $(call select_from_ports,lz4)/include/lz4 diff --git a/repos/libports/lib/mk/lz4.mk b/repos/libports/lib/mk/lz4.mk new file mode 100644 index 0000000000..f9f83944cc --- /dev/null +++ b/repos/libports/lib/mk/lz4.mk @@ -0,0 +1,15 @@ +LZ4_PORT_DIR := $(call select_from_ports,lz4) +LZ4_DIR := $(LZ4_PORT_DIR)/src/lib/lz4/lib + +SRC_C = lz4.c \ + lz4frame.c \ + lz4hc.c \ + xxhash.c + +vpath %.c $(LZ4_DIR) + +INC_DIR += $(LZ4_DIR) + +LIBS += libc + +SHARED_LIB = yes diff --git a/repos/libports/ports/lz4.hash b/repos/libports/ports/lz4.hash new file mode 100644 index 0000000000..476b70fa2c --- /dev/null +++ b/repos/libports/ports/lz4.hash @@ -0,0 +1 @@ +3328c266215d8ee160d99b415ad5d1161b2eac86 diff --git a/repos/libports/ports/lz4.port b/repos/libports/ports/lz4.port new file mode 100644 index 0000000000..bc775cd7cf --- /dev/null +++ b/repos/libports/ports/lz4.port @@ -0,0 +1,10 @@ +LICENSE := BSD +DOWNLOADS := lz4.archive +VERSION := 1.8.0 + +URL(lz4) := https://github.com/lz4/lz4/archive/v$(VERSION).tar.gz +SHA(lz4) := 3ef95c78f14ac26a806518846e4a24a2b0d825b4 +DIR(lz4) := src/lib/lz4 + +DIRS := include/lz4 +DIR_CONTENT(include/lz4) := $(addprefix src/lib/lz4/lib/,lz4.h lz4frame.h lz4hc.h) diff --git a/repos/libports/src/test/lz4/main.c b/repos/libports/src/test/lz4/main.c new file mode 100644 index 0000000000..4018122a95 --- /dev/null +++ b/repos/libports/src/test/lz4/main.c @@ -0,0 +1,7 @@ +#include +#include +#include + +int main() { + return 0; +} diff --git a/repos/libports/src/test/lz4/target.mk b/repos/libports/src/test/lz4/target.mk new file mode 100644 index 0000000000..37a9f4ebce --- /dev/null +++ b/repos/libports/src/test/lz4/target.mk @@ -0,0 +1,3 @@ +TARGET = test-lz4 +LIBS = lz4 posix +SRC_C = main.c