diff --git a/baselibs.conf b/baselibs.conf index bcbd8e8..dd02a9e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,3 @@ -libprotobuf9 -libprotoc9 -libprotobuf-lite9 +libprotobuf11 +libprotoc11 +libprotobuf-lite11 diff --git a/protobuf-2.6.1.tar.bz2 b/protobuf-2.6.1.tar.bz2 deleted file mode 100644 index 02d727c..0000000 --- a/protobuf-2.6.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 -size 2021416 diff --git a/protobuf-3.1.0.tar.gz b/protobuf-3.1.0.tar.gz new file mode 100644 index 0000000..6fb99f6 --- /dev/null +++ b/protobuf-3.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 +size 4051503 diff --git a/protobuf-return-no-nonvoid.patch b/protobuf-return-no-nonvoid.patch deleted file mode 100644 index ccc16e1..0000000 --- a/protobuf-return-no-nonvoid.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: protobuf-2.6.1/src/google/protobuf/extension_set.cc -=================================================================== ---- protobuf-2.6.1.orig/src/google/protobuf/extension_set.cc -+++ protobuf-2.6.1/src/google/protobuf/extension_set.cc -@@ -71,6 +71,7 @@ inline bool is_packable(WireFormatLite:: - // Do not add a default statement. Let the compiler complain when someone - // adds a new wire type. - } -+ return true; - } - - // Registry stuff. diff --git a/protobuf-setuptools-2.4.1.patch b/protobuf-setuptools-2.4.1.patch deleted file mode 100644 index c492c68..0000000 --- a/protobuf-setuptools-2.4.1.patch +++ /dev/null @@ -1,14 +0,0 @@ -python tries to auto download a newer version ... o_O -Index: python/ez_setup.py -=================================================================== ---- python/ez_setup.py.orig -+++ python/ez_setup.py -@@ -19,7 +19,7 @@ the appropriate options to ``use_setupto - This file can also be run as a script to install or upgrade setuptools. - """ - import sys --DEFAULT_VERSION = "0.6c11" -+DEFAULT_VERSION = "0.6c8" - DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] - - md5_data = { diff --git a/protobuf.changes b/protobuf.changes index 437436a..0c0da3e 100644 --- a/protobuf.changes +++ b/protobuf.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Sat Jan 7 11:02:55 UTC 2017 - stefan.bruens@rwth-aachen.de + +- Update to protobuf v3.1.0. Protobuf v3.0.0 introduceced a new + version of the protocol buffer language, proto3, which supersedes + proto2. + The protoc compiler is able to read old proto2 protocol definitions, + and defaults to the proto2 syntax if a syntax is not specified, thus + packages can be recompiled to link to the new library. For backwards + compatibility, the old library version is available from the + protobuf2 package. + As the API for proto2 is not compatible to the proto3 API, proto3 + should only be used for new Protocol Buffers, whereas current users + are advised to keep using proto2. For a detailed list of changes, + see https://github.com/google/protobuf/releases +- Drop no longer needed patches: + * protobuf-setuptools-2.4.1.patch + * protobuf-return-no-nonvoid.patch + ------------------------------------------------------------------- Fri Dec 16 03:33:01 UTC 2016 - stefan.bruens@rwth-aachen.de diff --git a/protobuf.spec b/protobuf.spec index fedd9eb..4d1413a 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,7 +1,7 @@ # # spec file for package protobuf # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,26 +16,32 @@ # -%define soname 9 -%bcond_without check +%define soname 11 +%define tarname protobuf +# requires gmock, which is not yet in the distribution +%bcond_with check %bcond_without protobuf_java %bcond_without protobuf_python + Name: protobuf -Version: 2.6.1 +Version: 3.1.0 Release: 0 Summary: Protocol Buffers - Google's data interchange format License: BSD-3-Clause Group: Development/Libraries/C and C++ Url: https://github.com/google/protobuf/ -Source0: https://github.com/google/protobuf/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +Source0: https://github.com/google/protobuf/archive/v%{version}.tar.gz#/%{tarname}-%{version}.tar.gz Source1: manifest.txt.in Source2: baselibs.conf -Patch0: protobuf-setuptools-2.4.1.patch -# fix no-return-in-nonvoid-function google/protobuf/extension_set.cc:74 -Patch1: protobuf-return-no-nonvoid.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf +BuildRequires: automake BuildRequires: fdupes BuildRequires: gcc-c++ +%if %{with check} +BuildRequires: libgmock-devel +%endif +BuildRequires: libtool BuildRequires: pkg-config %if %{with protobuf_java} BuildRequires: java-devel >= 1.6.0 @@ -89,6 +95,7 @@ Requires: libprotobuf%{soname} = %{version} Requires: libprotobuf-lite%{soname} Requires: zlib-devel Provides: libprotobuf-devel = %{version} +Conflicts: protobuf2-devel %description devel Protocol Buffers are a way of encoding structured data in an efficient yet @@ -121,10 +128,9 @@ This package contains the Python bindings for Google Protocol Buffers. %prep -%setup -q -%patch0 -%patch1 -p1 -# +%setup -q -n %{tarname}-%{version} +mkdir gmock + %if %{with protobuf_python} # only needed for test suite which we don't call anyways. # googleapis is broken on sle12 @@ -138,6 +144,7 @@ sed -i '/google_test_dir/d' python/setup.py export PTHREAD_LIBS=-lpthread %endif +./autogen.sh %configure \ --disable-static @@ -145,9 +152,9 @@ make %{?_smp_mflags} %if %{with protobuf_java} pushd java -../src/protoc --java_out=src/main/java -I../src ../src/google/protobuf/descriptor.proto +../src/protoc --java_out=core/src/main/java -I../src ../src/google/protobuf/descriptor.proto mkdir classes -javac -d classes src/main/java/com/google/protobuf/*.java +javac $extra_java_flags -d classes core/src/main/java/com/google/protobuf/*.java sed -e 's/@VERSION@/%{version}/' < %{SOURCE1} > manifest.txt jar cfm %{name}-java-%{version}.jar manifest.txt -C classes com popd