Update to 2.6.1

- New URL
- Cleanup spec
- Add patch to fix emacs compilation with emacs 24.4
- Drop java-fixes patch, use pom macros instead
- Add BR on python-google-apputils and mvn(org.easymock:easymock)
- Run make check
- Make -static require -devel (bug #1067475)
This commit is contained in:
Orion Poplawski 2015-04-22 10:13:02 -06:00
parent fb98c873dc
commit 52c0f128cd
5 changed files with 46 additions and 237 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ protobuf-2.3.0.tar.bz2
/protobuf-2.4.1.tar.bz2
/protobuf-2.5.0.tar.bz2
/protobuf-2.6.0.tar.bz2
/protobuf-2.6.1.tar.bz2

View File

@ -0,0 +1,17 @@
Fix build with emacs-24.4.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845
--- protobuf-2.5.0/editors/protobuf-mode.el
+++ protobuf-2.5.0/editors/protobuf-mode.el
@@ -66,6 +66,10 @@
(require 'cc-mode)
(eval-when-compile
+ (and (= emacs-major-version 24)
+ (>= emacs-minor-version 4)
+ (null emacs-repository-version)
+ (require 'cl))
(require 'cc-langs)
(require 'cc-fonts))

View File

@ -1,209 +0,0 @@
--- protobuf-2.6.0/java/pom.xml.orig 2014-08-25 15:52:36.000000000 -0400
+++ protobuf-2.6.0/java/pom.xml 2014-11-06 13:12:04.459524614 -0500
@@ -1,160 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>com.google</groupId>
- <artifactId>google</artifactId>
- <version>1</version>
- </parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.6.0</version>
<packaging>bundle</packaging>
<name>Protocol Buffer Java API</name>
<description>
Protocol Buffers are a way of encoding structured data in an efficient yet
extensible format.
</description>
<inceptionYear>2008</inceptionYear>
<url>http://code.google.com/p/protobuf</url>
<licenses>
<license>
<name>New BSD license</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://code.google.com/p/protobuf/source/browse</url>
<connection>
scm:svn:http://protobuf.googlecode.com/svn/trunk/
</connection>
</scm>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <version>2.2.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<mkdir dir="target/generated-sources" />
<exec executable="../src/protoc">
<arg value="--java_out=target/generated-sources" />
<arg value="--proto_path=../src" />
<arg value="../src/google/protobuf/descriptor.proto" />
</exec>
</tasks>
<sourceRoot>target/generated-sources</sourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
- <execution>
- <id>generate-test-sources</id>
- <phase>generate-test-sources</phase>
- <configuration>
- <tasks>
- <mkdir dir="target/generated-test-sources" />
- <exec executable="../src/protoc">
- <arg value="--java_out=target/generated-test-sources" />
- <arg value="--proto_path=../src" />
- <arg value="--proto_path=src/test/java" />
- <arg value="../src/google/protobuf/unittest.proto" />
- <arg value="../src/google/protobuf/unittest_import.proto" />
- <arg value="../src/google/protobuf/unittest_import_public.proto" />
- <arg value="../src/google/protobuf/unittest_mset.proto" />
- <arg value="src/test/java/com/google/protobuf/lazy_fields_lite.proto" />
- <arg value="src/test/java/com/google/protobuf/lite_equals_and_hash.proto" />
- <arg
- value="src/test/java/com/google/protobuf/multiple_files_test.proto" />
- <arg value="src/test/java/com/google/protobuf/nested_builders_test.proto" />
- <arg value="src/test/java/com/google/protobuf/nested_extension.proto" />
- <arg value="src/test/java/com/google/protobuf/nested_extension_lite.proto" />
- <arg value="src/test/java/com/google/protobuf/non_nested_extension.proto" />
- <arg value="src/test/java/com/google/protobuf/non_nested_extension_lite.proto" />
- <arg value="src/test/java/com/google/protobuf/outer_class_name_test.proto" />
- <arg value="src/test/java/com/google/protobuf/outer_class_name_test2.proto" />
- <arg value="src/test/java/com/google/protobuf/outer_class_name_test3.proto" />
- <arg value="src/test/java/com/google/protobuf/test_bad_identifiers.proto" />
- <arg value="src/test/java/com/google/protobuf/test_check_utf8.proto" />
- <arg value="src/test/java/com/google/protobuf/test_check_utf8_size.proto" />
- <arg value="src/test/java/com/google/protobuf/test_custom_options.proto" />
- <arg
- value="../src/google/protobuf/unittest_optimize_for.proto" />
- <arg
- value="../src/google/protobuf/unittest_custom_options.proto" />
- <arg value="../src/google/protobuf/unittest_lite.proto" />
- <arg value="../src/google/protobuf/unittest_import_lite.proto" />
- <arg value="../src/google/protobuf/unittest_import_public_lite.proto" />
- <arg value="../src/google/protobuf/unittest_lite_imports_nonlite.proto" />
- <arg value="../src/google/protobuf/unittest_enormous_descriptor.proto" />
- <arg value="../src/google/protobuf/unittest_no_generic_services.proto" />
- </exec>
- </tasks>
- <testSourceRoot>target/generated-test-sources</testSourceRoot>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-DocURL>http://code.google.com/p/protobuf</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
<Export-Package>com.google.protobuf;version=2.5.0</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>lite</id>
<build>
@@ -173,45 +92,33 @@
<include>**/Internal.java</include>
<include>**/InvalidProtocolBufferException.java</include>
<include>**/LazyStringArrayList.java</include>
<include>**/LazyStringList.java</include>
<include>**/MessageLite.java</include>
<include>**/MessageLiteOrBuilder.java</include>
<include>**/SmallSortedMap.java</include>
<include>**/UninitializedMessageException.java</include>
<include>**/UnmodifiableLazyStringList.java</include>
<include>**/WireFormat.java</include>
<include>**/Parser.java</include>
<include>**/AbstractParser.java</include>
<include>**/BoundedByteString.java</include>
<include>**/LiteralByteString.java</include>
<include>**/RopeByteString.java</include>
<include>**/Utf8.java</include>
<include>**/LazyField.java</include>
<include>**/LazyFieldLite.java</include>
<include>**/ProtocolStringList.java</include>
</includes>
- <testIncludes>
- <testInclude>**/LiteTest.java</testInclude>
- <testInclude>**/*Lite.java</testInclude>
- </testIncludes>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>**/LiteTest.java</include>
- </includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classifier>lite</classifier>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -5,32 +5,29 @@
# Don't require gtest
%bcond_with gtest
%if %{with python}
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%endif
%global emacs_version %(pkg-config emacs --modversion)
%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
%global emacs_startdir %(pkg-config emacs --variable sitestartdir)
Summary: Protocol Buffers - Google's data interchange format
Name: protobuf
Version: 2.6.0
Release: 4%{?dist}
Version: 2.6.1
Release: 1%{?dist}
License: BSD
Group: Development/Libraries
Source: http://protobuf.googlecode.com/files/protobuf-%{version}.tar.bz2
Source: https://github.com/google/protobuf/releases/download/v%{version}/protobuf-%{version}.tar.bz2
Source1: ftdetect-proto.vim
Source2: protobuf-init.el
Patch0: protobuf-2.5.0-emacs-24.4.patch
Patch1: protobuf-2.5.0-fedora-gtest.patch
Patch2: protobuf-2.6.0-java-fixes.patch
URL: http://code.google.com/p/protobuf/
URL: https://github.com/google/protobuf
BuildRequires: automake autoconf libtool pkgconfig zlib-devel
BuildRequires: emacs(bin)
BuildRequires: emacs-el >= 24.1
%if %{with gtest}
BuildRequires: gtest-devel
%endif
BuildRequires: mvn(org.easymock:easymock)
%description
Protocol Buffers are a way of encoding structured data in an efficient
@ -69,7 +66,7 @@ C++ headers and libraries
%package static
Summary: Static development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
%description static
Static libraries for Protocol Buffers
@ -117,6 +114,8 @@ Summary: Python bindings for Google Protocol Buffers
Group: Development/Languages
BuildRequires: python-devel
BuildRequires: python-setuptools
# For tests
BuildRequires: python-google-apputils
Conflicts: %{name}-compiler > %{version}
Conflicts: %{name}-compiler < %{version}
@ -178,13 +177,15 @@ This package contains the API documentation for %{name}-java.
%prep
%setup -q
%patch0 -p1 -b .emacs
%if %{with gtest}
rm -rf gtest
%patch1 -p1 -b .gtest
%endif
chmod 644 examples/*
%if %{with java}
%patch2 -p1 -b .java-fixes
%pom_remove_parent java/pom.xml
%pom_remove_dep org.easymock:easymockclassextension java/pom.xml
rm -rf java/src/test
%endif
@ -214,7 +215,7 @@ popd
emacs -batch -f batch-byte-compile editors/protobuf-mode.el
%check
#make %{?_smp_mflags} check
make %{?_smp_mflags} check
%install
rm -rf %{buildroot}
@ -252,18 +253,17 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir}
%postun compiler -p /sbin/ldconfig
%files
%defattr(-, root, root, -)
%{_libdir}/libprotobuf.so.*
%doc CHANGES.txt CONTRIBUTORS.txt COPYING.txt README.txt
%doc CHANGES.txt CONTRIBUTORS.txt README.md
%license LICENSE
%files compiler
%defattr(-, root, root, -)
%{_bindir}/protoc
%{_libdir}/libprotoc.so.*
%doc COPYING.txt README.txt
%doc README.md
%license LICENSE
%files devel
%defattr(-, root, root, -)
%dir %{_includedir}/google
%{_includedir}/google/protobuf/
%{_libdir}/libprotobuf.so
@ -272,26 +272,21 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir}
%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.txt
%files static
%defattr(-, root, root, -)
%{_libdir}/libprotobuf.a
%{_libdir}/libprotoc.a
%files lite
%defattr(-, root, root, -)
%{_libdir}/libprotobuf-lite.so.*
%files lite-devel
%defattr(-, root, root, -)
%{_libdir}/libprotobuf-lite.so
%{_libdir}/pkgconfig/protobuf-lite.pc
%files lite-static
%defattr(-, root, root, -)
%{_libdir}/libprotobuf-lite.a
%if %{with python}
%files python
%defattr(-, root, root, -)
%dir %{python_sitelib}/google
%{python_sitelib}/google/protobuf/
%{python_sitelib}/protobuf-%{version}-py2.?.egg-info/
@ -301,29 +296,34 @@ install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{emacs_startdir}
%endif
%files vim
%defattr(-, root, root, -)
%{_datadir}/vim/vimfiles/ftdetect/proto.vim
%{_datadir}/vim/vimfiles/syntax/proto.vim
%files emacs
%defattr(-,root,root,-)
%{emacs_startdir}/protobuf-init.el
%{emacs_lispdir}/protobuf-mode.elc
%files emacs-el
%defattr(-,root,root,-)
%{emacs_lispdir}/protobuf-mode.el
%if %{with java}
%files java -f java/.mfiles
%defattr(-, root, root, -)
%doc examples/AddPerson.java examples/ListPeople.java
%files javadoc -f java/.mfiles-javadoc
%defattr(-, root, root, -)
%endif
%changelog
* Mon Apr 6 2015 Orion Poplawski <orion@cora.nwra.com> - 2.6.1-1
- Update to 2.6.1
- New URL
- Cleanup spec
- Add patch to fix emacs compilation with emacs 24.4
- Drop java-fixes patch, use pom macros instead
- Add BR on python-google-apputils and mvn(org.easymock:easymock)
- Run make check
- Make -static require -devel (bug #1067475)
* Thu Mar 26 2015 Kalev Lember <kalevlember@gmail.com> - 2.6.0-4
- Rebuilt for GCC 5 ABI change

View File

@ -1 +1 @@
78253c509a055dab316a21e754cb278a protobuf-2.6.0.tar.bz2
11aaac2d704eef8efd1867a807865d85 protobuf-2.6.1.tar.bz2