Add patch to fix build on ppc64 (big-endian)

This commit is contained in:
Orion Poplawski 2017-01-25 17:13:28 -07:00
parent 868b0db52d
commit 49fd1826c5
2 changed files with 19 additions and 0 deletions

17
protobuf-ppc64.patch Normal file
View File

@ -0,0 +1,17 @@
diff -up protobuf-3.2.0rc2/src/google/protobuf/wire_format_lite.cc.ppc64 protobuf-3.2.0rc2/src/google/protobuf/wire_format_lite.cc
--- protobuf-3.2.0rc2/src/google/protobuf/wire_format_lite.cc.ppc64 2017-01-18 16:14:38.000000000 -0700
+++ protobuf-3.2.0rc2/src/google/protobuf/wire_format_lite.cc 2017-01-25 17:02:59.643176129 -0700
@@ -357,11 +357,11 @@ void EncodeFixedSizeValue(uint64 v, uint
WireFormatLite::WriteFixed64NoTagToArray(v, dest);
}
-void EncodeSFixedSizeValue(int32 v, uint8* dest) {
+void EncodeFixedSizeValue(int32 v, uint8* dest) {
WireFormatLite::WriteSFixed32NoTagToArray(v, dest);
}
-void EncodeSFixedSizeValue(int64 v, uint8* dest) {
+void EncodeFixedSizeValue(int64 v, uint8* dest) {
WireFormatLite::WriteSFixed64NoTagToArray(v, dest);
}

View File

@ -21,6 +21,7 @@ Source2: protobuf-init.el
# For tests
Source3: https://github.com/google/googlemock/archive/release-1.7.0.tar.gz#/googlemock-1.7.0.tar.gz
Source4: https://github.com/google/googletest/archive/release-1.7.0.tar.gz#/googletest-1.7.0.tar.gz
Patch0: protobuf-ppc64.patch
BuildRequires: autoconf
BuildRequires: automake
@ -223,6 +224,7 @@ Protocol Buffer Parent POM.
%prep
%setup -q -n %{name}-%{version}%{?rcver} -a 3 -a 4
%patch0 -p1 -b .ppc64
mv googlemock-release-1.7.0 gmock
mv googletest-release-1.7.0 gmock/gtest
find -name \*.cc -o -name \*.h | xargs chmod -x