From b34f70d312f2030f553f721b77391009c84ebbcd Mon Sep 17 00:00:00 2001 From: Ben Larson Date: Tue, 7 Nov 2017 17:44:50 -0700 Subject: [PATCH] port library: lz4 Issue #2528 --- repos/libports/lib/import/import-lz4.mk | 1 + repos/libports/lib/mk/lz4.mk | 15 +++++++++++++++ repos/libports/ports/lz4.hash | 1 + repos/libports/ports/lz4.port | 10 ++++++++++ repos/libports/src/test/lz4/main.c | 7 +++++++ repos/libports/src/test/lz4/target.mk | 3 +++ 6 files changed, 37 insertions(+) create mode 100644 repos/libports/lib/import/import-lz4.mk create mode 100644 repos/libports/lib/mk/lz4.mk create mode 100644 repos/libports/ports/lz4.hash create mode 100644 repos/libports/ports/lz4.port create mode 100644 repos/libports/src/test/lz4/main.c create mode 100644 repos/libports/src/test/lz4/target.mk 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