From 4d1095947687c042fd306b3d0435cb9f2fcc1ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 25 Sep 2018 22:19:50 +0200 Subject: [PATCH] Port of protobuf-c 1.3.1 Issue #118. --- lib/import/import-protobuf-c.mk | 3 +++ lib/mk/protobuf-c.mk | 11 +++++++++++ lib/symbols/protobuf-c | 19 +++++++++++++++++++ ports/protobuf-c.hash | 1 + ports/protobuf-c.port | 19 +++++++++++++++++++ recipes/api/protobuf-c/content.mk | 13 +++++++++++++ recipes/api/protobuf-c/hash | 1 + recipes/src/protobuf-c/api | 1 + recipes/src/protobuf-c/content.mk | 17 +++++++++++++++++ recipes/src/protobuf-c/hash | 1 + recipes/src/protobuf-c/used_apis | 2 ++ 11 files changed, 88 insertions(+) create mode 100644 lib/import/import-protobuf-c.mk create mode 100644 lib/mk/protobuf-c.mk create mode 100644 lib/symbols/protobuf-c create mode 100644 ports/protobuf-c.hash create mode 100644 ports/protobuf-c.port create mode 100644 recipes/api/protobuf-c/content.mk create mode 100644 recipes/api/protobuf-c/hash create mode 100644 recipes/src/protobuf-c/api create mode 100644 recipes/src/protobuf-c/content.mk create mode 100644 recipes/src/protobuf-c/hash create mode 100644 recipes/src/protobuf-c/used_apis diff --git a/lib/import/import-protobuf-c.mk b/lib/import/import-protobuf-c.mk new file mode 100644 index 0000000..f7ff8fa --- /dev/null +++ b/lib/import/import-protobuf-c.mk @@ -0,0 +1,3 @@ +PROTOBUF_C_PORT_DIR := $(call select_from_ports,protobuf-c) + +INC_DIR += $(PROTOBUF_C_PORT_DIR)/include diff --git a/lib/mk/protobuf-c.mk b/lib/mk/protobuf-c.mk new file mode 100644 index 0000000..98e8801 --- /dev/null +++ b/lib/mk/protobuf-c.mk @@ -0,0 +1,11 @@ +include $(REP_DIR)/lib/import/import-protobuf-c.mk + +PROTOBUF_C_SRC_DIR := $(PROTOBUF_C_PORT_DIR)/src/lib/protobuf-c/protobuf-c + +SRC_C := protobuf-c.c + +LIBS := libc + +SHARED_LIB := yes + +vpath %.c $(PROTOBUF_C_SRC_DIR) diff --git a/lib/symbols/protobuf-c b/lib/symbols/protobuf-c new file mode 100644 index 0000000..e243708 --- /dev/null +++ b/lib/symbols/protobuf-c @@ -0,0 +1,19 @@ +protobuf_c_buffer_simple_append T +protobuf_c_empty_string R 1 +protobuf_c_enum_descriptor_get_value T +protobuf_c_enum_descriptor_get_value_by_name T +protobuf_c_message_check T +protobuf_c_message_descriptor_get_field T +protobuf_c_message_descriptor_get_field_by_name T +protobuf_c_message_free_unpacked T +protobuf_c_message_get_packed_size T +protobuf_c_message_init T +protobuf_c_message_pack T +protobuf_c_message_pack_to_buffer T +protobuf_c_message_unpack T +protobuf_c_service_descriptor_get_method_by_name T +protobuf_c_service_destroy T +protobuf_c_service_generated_init T +protobuf_c_service_invoke_internal T +protobuf_c_version T +protobuf_c_version_number T diff --git a/ports/protobuf-c.hash b/ports/protobuf-c.hash new file mode 100644 index 0000000..5ca066c --- /dev/null +++ b/ports/protobuf-c.hash @@ -0,0 +1 @@ +97fddbba1e7713358117e7dae4188bb4ebcdc200 diff --git a/ports/protobuf-c.port b/ports/protobuf-c.port new file mode 100644 index 0000000..d04545f --- /dev/null +++ b/ports/protobuf-c.port @@ -0,0 +1,19 @@ +LICENSE := BSDv2 +VERSION := 1.3.1 +DOWNLOADS := protobuf-c.archive + +BASE_URL := https://github.com/protobuf-c/protobuf-c/releases/download +URL(protobuf-c) := $(BASE_URL)/v$(VERSION)/protobuf-c-$(VERSION).tar.gz +SHA(protobuf-c) := 51472d3a191d6d7b425e32b612e477c06f73fe23e07f6a6a839b11808e9d2267 +DIR(protobuf-c) := src/lib/protobuf-c + +DIRS := include/protobuf-c + +DIR_CONTENT(include/protobuf-c) := src/lib/protobuf-c/protobuf-c/protobuf-c.h + +default: change_path + +# make building as a recipe easier +change_path: _dirs + $(VERBOSE)sed -i 's;de "protobuf-c.h";de ;' \ + src/lib/protobuf-c/protobuf-c/protobuf-c.c diff --git a/recipes/api/protobuf-c/content.mk b/recipes/api/protobuf-c/content.mk new file mode 100644 index 0000000..b780de8 --- /dev/null +++ b/recipes/api/protobuf-c/content.mk @@ -0,0 +1,13 @@ +content: include/protobuf-c lib/symbols/protobuf-c LICENSE + +PORT_DIR := $(call port_dir,$(REP_DIR)/ports/protobuf-c) + +include/protobuf-c: + mkdir -p $@ + cp -r $(PORT_DIR)/$@/* $@ + +lib/symbols/protobuf-c: + $(mirror_from_rep_dir) + +LICENSE: + cp $(PORT_DIR)/src/lib/protobuf-c/LICENSE $@ diff --git a/recipes/api/protobuf-c/hash b/recipes/api/protobuf-c/hash new file mode 100644 index 0000000..fe0ea40 --- /dev/null +++ b/recipes/api/protobuf-c/hash @@ -0,0 +1 @@ +2018-09-26 a3bc354e7ab019a6a71db3e52cbdca42bba53859 diff --git a/recipes/src/protobuf-c/api b/recipes/src/protobuf-c/api new file mode 100644 index 0000000..83d99bc --- /dev/null +++ b/recipes/src/protobuf-c/api @@ -0,0 +1 @@ +protobuf-c diff --git a/recipes/src/protobuf-c/content.mk b/recipes/src/protobuf-c/content.mk new file mode 100644 index 0000000..62e894e --- /dev/null +++ b/recipes/src/protobuf-c/content.mk @@ -0,0 +1,17 @@ +MIRROR_FROM_REP_DIR = lib/import/import-protobuf-c.mk lib/mk/protobuf-c.mk + +content: $(MIRROR_FROM_REP_DIR) src/lib/protobuf-c/target.mk LICENSE + +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) + +PORT_DIR := $(call port_dir,$(REP_DIR)/ports/protobuf-c) + +src/lib/protobuf-c/target.mk: + mkdir -p src/lib/protobuf-c/protobuf-c + cp -r $(PORT_DIR)/src/lib/protobuf-c/protobuf-c/*.c \ + src/lib/protobuf-c/protobuf-c/ + echo "LIBS := protobuf-c" > $@ + +LICENSE: + cp $(PORT_DIR)/src/lib/protobuf-c/LICENSE $@ diff --git a/recipes/src/protobuf-c/hash b/recipes/src/protobuf-c/hash new file mode 100644 index 0000000..ecffff1 --- /dev/null +++ b/recipes/src/protobuf-c/hash @@ -0,0 +1 @@ +2018-09-26 6f7eb33e1013562ee36e9009390d35ac062bd83a diff --git a/recipes/src/protobuf-c/used_apis b/recipes/src/protobuf-c/used_apis new file mode 100644 index 0000000..dccf4f6 --- /dev/null +++ b/recipes/src/protobuf-c/used_apis @@ -0,0 +1,2 @@ +base +libc