From 60eeddf639efc2a77933e275eb8de6363eea20c0 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 15 Feb 2018 18:59:11 +0100 Subject: [PATCH] Port of libyaml http://pyyaml.org/wiki/LibYAML Ref #2682 --- repos/libports/lib/import/import-libyaml.mk | 2 ++ repos/libports/lib/mk/libyaml.mk | 15 ++++++++++++++ repos/libports/ports/libyaml.hash | 1 + repos/libports/ports/libyaml.port | 23 +++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 repos/libports/lib/import/import-libyaml.mk create mode 100644 repos/libports/lib/mk/libyaml.mk create mode 100644 repos/libports/ports/libyaml.hash create mode 100644 repos/libports/ports/libyaml.port diff --git a/repos/libports/lib/import/import-libyaml.mk b/repos/libports/lib/import/import-libyaml.mk new file mode 100644 index 000000000..02d544fb2 --- /dev/null +++ b/repos/libports/lib/import/import-libyaml.mk @@ -0,0 +1,2 @@ +YAML_PORT_DIR := $(call select_from_ports,libyaml) +INC_DIR += $(YAML_PORT_DIR)/include/yaml diff --git a/repos/libports/lib/mk/libyaml.mk b/repos/libports/lib/mk/libyaml.mk new file mode 100644 index 000000000..1abc7e73b --- /dev/null +++ b/repos/libports/lib/mk/libyaml.mk @@ -0,0 +1,15 @@ +include $(REP_DIR)/lib/import/import-libyaml.mk + +YAML_SRC_DIR := $(YAML_PORT_DIR)/src/lib/yaml/src + +LIBS += libc + +SRC_C += api.c reader.c scanner.c parser.c loader.c writer.c emitter.c dumper.c + +CC_DEF += -DHAVE_CONFIG_H + +CC_OPT += -Wno-unused-but-set-variable -Wno-unused-value + +INC_DIR += $(YAML_SRC_DIR) + +vpath %c $(YAML_SRC_DIR) diff --git a/repos/libports/ports/libyaml.hash b/repos/libports/ports/libyaml.hash new file mode 100644 index 000000000..de89d7964 --- /dev/null +++ b/repos/libports/ports/libyaml.hash @@ -0,0 +1 @@ +8ea4e59e4393072540b6a7a538b369689abec6f4 diff --git a/repos/libports/ports/libyaml.port b/repos/libports/ports/libyaml.port new file mode 100644 index 000000000..930fb5951 --- /dev/null +++ b/repos/libports/ports/libyaml.port @@ -0,0 +1,23 @@ +LICENSE = MIT +DOWNLOADS = libyaml.archive +VERSION = 0.1.7 + +URL(libyaml) := http://pyyaml.org/download/libyaml/yaml-$(VERSION).tar.gz +SHA(libyaml) := 3590cbf092ef4c71bc0a9b404c00a626b1e04dee +DIR(libyaml) := src/lib/yaml + +DIRS := include/yaml +DIR_CONTENT(include/yaml) = src/lib/yaml/include/*.h + +default: src/lib/yaml/src/config.h + +src/lib/yaml/src/config.h: src/lib/yaml/config.h.in + @$(MSG_GENERATE)$(notdir $@) + $(VERBOSE)sed \ + -e 's/undef YAML_VERSION_MAJOR/define YAML_VERSION_MAJOR 0/' \ + -e 's/undef YAML_VERSION_MINOR/define YAML_VERSION_MINOR 1/' \ + -e 's/undef YAML_VERSION_PATCH/define YAML_VERSION_PATCH 7/' \ + -e 's/undef YAML_VERSION_STRING/define YAML_VERSION_STRING "$(VERSION)"/' \ + $< > $@ + +src/lib/yaml/config.h.in: $(DOWNLOADS)