diff options
Diffstat (limited to 'recipes-devtools/protobuf/files')
3 files changed, 89 insertions, 0 deletions
diff --git a/recipes-devtools/protobuf/files/disable_tests.patch b/recipes-devtools/protobuf/files/disable_tests.patch new file mode 100644 index 00000000..f5e71ca6 --- /dev/null +++ b/recipes-devtools/protobuf/files/disable_tests.patch | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | diff -Naur protobuf-c-0.15.old/src/Makefile.am protobuf-c-0.15/src/Makefile.am | ||
| 2 | --- protobuf-c-0.15.old/src/Makefile.am 2012-11-28 14:59:57.845251943 +0100 | ||
| 3 | +++ protobuf-c-0.15/src/Makefile.am 2012-11-28 15:00:23.549252632 +0100 | ||
| 4 | @@ -1,5 +1,5 @@ | ||
| 5 | if BUILD_PROTOC_C | ||
| 6 | -SUBDIRS = . test | ||
| 7 | + | ||
| 8 | bin_PROGRAMS = protoc-c | ||
| 9 | protoc_c_SOURCES = \ | ||
| 10 | google/protobuf/compiler/c/c_service.cc \ | ||
| 11 | @@ -23,7 +23,7 @@ | ||
| 12 | lib_LTLIBRARIES = libprotobuf-c.la | ||
| 13 | protobufcincludedir = $(includedir)/google/protobuf-c | ||
| 14 | |||
| 15 | -EXTRA_DIST = CMakeLists.txt test/CMakeLists.txt | ||
| 16 | +EXTRA_DIST = CMakeLists.txt | ||
| 17 | |||
| 18 | libprotobuf_c_la_SOURCES = \ | ||
| 19 | google/protobuf-c/protobuf-c-dispatch.c \ | ||
diff --git a/recipes-devtools/protobuf/files/protobuf-allow-running-python-scripts-from-anywhere.patch b/recipes-devtools/protobuf/files/protobuf-allow-running-python-scripts-from-anywhere.patch new file mode 100644 index 00000000..8b293428 --- /dev/null +++ b/recipes-devtools/protobuf/files/protobuf-allow-running-python-scripts-from-anywhere.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 46e331263eb92e47510e88478b255f226d30245c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
| 3 | Date: Mon, 18 Aug 2014 15:19:35 -0400 | ||
| 4 | Subject: [PATCH] protobuf: allow running python scripts from anywhere | ||
| 5 | |||
| 6 | The Makefile to generate the examples with Google Protocol Buffers | ||
| 7 | generates some scripts for python. However, these generated scripts | ||
| 8 | only work if they are ran in the same directory as the source files. | ||
| 9 | This fix generates scripts to execute from anywhere on the system. | ||
| 10 | |||
| 11 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
| 12 | --- | ||
| 13 | examples/Makefile | 6 ++++-- | ||
| 14 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/examples/Makefile b/examples/Makefile | ||
| 17 | index 8dc9083..a993d63 100644 | ||
| 18 | --- a/examples/Makefile | ||
| 19 | +++ b/examples/Makefile | ||
| 20 | @@ -48,11 +48,13 @@ list_people_java: javac_middleman | ||
| 21 | add_person_python: add_person.py protoc_middleman | ||
| 22 | @echo "Writing shortcut script add_person_python..." | ||
| 23 | @echo '#! /bin/sh' > add_person_python | ||
| 24 | - @echo './add_person.py "$$@"' >> add_person_python | ||
| 25 | + @echo 'SCRIPT_DIR=$$(dirname $$0)' >> add_person_python | ||
| 26 | + @echo '$$SCRIPT_DIR/add_person.py "$$@"' >> add_person_python | ||
| 27 | @chmod +x add_person_python | ||
| 28 | |||
| 29 | list_people_python: list_people.py protoc_middleman | ||
| 30 | @echo "Writing shortcut script list_people_python..." | ||
| 31 | @echo '#! /bin/sh' > list_people_python | ||
| 32 | - @echo './list_people.py "$$@"' >> list_people_python | ||
| 33 | + @echo 'SCRIPT_DIR=$$(dirname $$0)' >> list_people_python | ||
| 34 | + @echo '$$SCRIPT_DIR/list_people.py "$$@"' >> list_people_python | ||
| 35 | @chmod +x list_people_python | ||
| 36 | -- | ||
| 37 | 1.9.3 | ||
| 38 | |||
diff --git a/recipes-devtools/protobuf/files/run-ptest b/recipes-devtools/protobuf/files/run-ptest new file mode 100755 index 00000000..a5a7b0f9 --- /dev/null +++ b/recipes-devtools/protobuf/files/run-ptest | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
| 3 | TEST_FILE="/tmp/test.data" | ||
| 4 | |||
| 5 | RETVAL=0 | ||
| 6 | # Test every writing test application | ||
| 7 | for write_exe_full_path in ${DIR}/add_person_*; do | ||
| 8 | if [ -x "${write_exe_full_path}" ]; then | ||
| 9 | write_exe=`basename ${write_exe_full_path}` | ||
| 10 | echo "Generating new test file using ${write_exe}..." | ||
| 11 | ${write_exe_full_path} "${TEST_FILE}" | ||
| 12 | RETVAL=$? | ||
| 13 | |||
| 14 | # Test every reading test application | ||
| 15 | for read_exe_full_path in ${DIR}/list_people_*; do | ||
| 16 | read_exe=`basename ${read_exe_full_path}` | ||
| 17 | echo "Test: Write with ${write_exe}; Read with ${read_exe}..." | ||
| 18 | if [ -x "${read_exe_full_path}" ]; then | ||
| 19 | ${read_exe_full_path} "${TEST_FILE}" | ||
| 20 | RETVAL=$? | ||
| 21 | fi | ||
| 22 | done | ||
| 23 | |||
| 24 | # Cleanup... | ||
| 25 | if [ -e "${TEST_FILE}" ]; then | ||
| 26 | rm "${TEST_FILE}" | ||
| 27 | fi | ||
| 28 | fi | ||
| 29 | done | ||
| 30 | |||
| 31 | exit $RETVAL | ||
| 32 | |||
