summaryrefslogtreecommitdiff
path: root/dev-libs/protobuf-c/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/protobuf-c/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/protobuf-c/files')
-rw-r--r--dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch29
-rw-r--r--dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch30
-rw-r--r--dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch30
-rw-r--r--dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch33
4 files changed, 122 insertions, 0 deletions
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch
new file mode 100644
index 000000000000..4e611d710705
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/518440
+
+avoid compiling tests when we aren't actually testing, especially since it
+requires a compiler to execute which fails when cross-compiling
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -135,7 +135,7 @@ t_generated_code2_test_generated_code2_SOURCES = \
+ t_generated_code2_test_generated_code2_LDADD = \
+ protobuf-c/libprotobuf-c.la
+
+-noinst_PROGRAMS += \
++check_PROGRAMS += \
+ t/generated-code2/cxx-generate-packed-data
+
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+@@ -160,12 +160,6 @@ t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+
+-BUILT_SOURCES += \
+- t/test.pb-c.c t/test.pb-c.h \
+- t/test-full.pb-c.c t/test-full.pb-c.h \
+- t/test-full.pb.cc t/test-full.pb.h \
+- t/generated-code2/test-full-cxx-output.inc
+-
+ t_version_version_SOURCES = \
+ t/version/version.c
+ t_version_version_LDADD = \
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
new file mode 100644
index 000000000000..c11e98df5784
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/518440
+
+avoid compiling tests when we aren't actually testing, especially since it
+requires a compiler to execute which fails when cross-compiling
+
+--- protobuf-c-1.2.0/Makefile.am
++++ protobuf-c-1.2.0/Makefile.am
+@@ -142,7 +142,7 @@
+ t_generated_code2_test_generated_code2_LDADD = \
+ protobuf-c/libprotobuf-c.la
+
+-noinst_PROGRAMS += \
++check_PROGRAMS += \
+ t/generated-code2/cxx-generate-packed-data
+
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+@@ -170,13 +170,6 @@
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+
+-BUILT_SOURCES += \
+- t/test.pb-c.c t/test.pb-c.h \
+- t/test-full.pb-c.c t/test-full.pb-c.h \
+- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \
+- t/test-full.pb.cc t/test-full.pb.h \
+- t/generated-code2/test-full-cxx-output.inc
+-
+ t_version_version_SOURCES = \
+ t/version/version.c
+ t_version_version_LDADD = \
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch
new file mode 100644
index 000000000000..55116c67e416
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/518440
+
+avoid compiling tests when we aren't actually testing, especially since it
+requires a compiler to execute which fails when cross-compiling
+
+--- protobuf-c-1.3.0/Makefile.am
++++ protobuf-c-1.3.0/Makefile.am
+@@ -150,7 +150,7 @@
+ t_generated_code2_test_generated_code2_LDADD = \
+ protobuf-c/libprotobuf-c.la
+
+-noinst_PROGRAMS += \
++check_PROGRAMS += \
+ t/generated-code2/cxx-generate-packed-data
+
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+@@ -178,13 +178,6 @@
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+
+-BUILT_SOURCES += \
+- t/test.pb-c.c t/test.pb-c.h \
+- t/test-full.pb-c.c t/test-full.pb-c.h \
+- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \
+- t/test-full.pb.cc t/test-full.pb.h \
+- t/generated-code2/test-full-cxx-output.inc
+-
+ if BUILD_PROTO3
+
+ check_PROGRAMS += \
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch
new file mode 100644
index 000000000000..962341b6540d
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch
@@ -0,0 +1,33 @@
+From 4302266b45303094616685c7997a6e6015ddadba Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Mon, 7 Aug 2017 12:31:55 -0400
+Subject: [PATCH] Restore protobuf-2.x compatibility
+
+The change in commit 712154b912de824741381c0bb26c2fbed54515a3 ("Bump
+minimum required header version for proto3 syntax") uses functionality
+only exposed by protobuf-3.x, breaking the build when compiling against
+protobuf-2.x.
+
+Since we still want to support building against protobuf-2.x, this
+commit makes the proto3 syntax check in the file generator dependent on
+building against protobuf-3.x.
+---
+ protoc-c/c_file.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
+index 9851768..0f1d770 100644
+--- a/protoc-c/c_file.cc
++++ b/protoc-c/c_file.cc
+@@ -120,9 +120,11 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
+ string filename_identifier = FilenameIdentifier(file_->name());
+
+ int min_header_version = 1000000;
++#if defined(HAVE_PROTO3)
+ if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
+ min_header_version = 1003000;
+ }
++#endif
+
+ // Generate top of header.
+ printer->Print(