.gear/protobuf-2.4.1-java-fixes.patch | 120 +++++++++ .gear/protobuf.spec | 258 ++++++++++++++++++++ .gear/rules | 4 + .../tags/df66f12ada4955c9346dc7c008242d100978977a | 6 + .gear/tags/list | 1 + Makefile.am | 21 -- autogen.sh | 9 - python/setup.py | 8 +- src/Makefile.am | 14 +- 9 files changed, 398 insertions(+), 43 deletions(-) diff --git a/.gear/protobuf-2.4.1-java-fixes.patch b/.gear/protobuf-2.4.1-java-fixes.patch new file mode 100644 index 0000000..cb0e300 --- /dev/null +++ b/.gear/protobuf-2.4.1-java-fixes.patch @@ -0,0 +1,120 @@ +--- protobuf-2.4.1/java/pom.xml.orig 2011-04-30 12:23:04.000000000 -0500 ++++ protobuf-2.4.1/java/pom.xml 2011-06-09 14:47:09.554188809 -0500 +@@ -3,11 +3,6 @@ + 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"> + 4.0.0 +- +- com.google +- google +- 1 +- + com.google.protobuf + protobuf-java + 2.4.1 +@@ -32,26 +27,6 @@ + scm:svn:http://protobuf.googlecode.com/svn/trunk/ + + +- +- +- junit +- junit +- 4.4 +- test +- +- +- org.easymock +- easymock +- 2.2 +- test +- +- +- org.easymock +- easymockclassextension +- 2.2.1 +- test +- +- + + + +@@ -62,14 +37,6 @@ + + + +- maven-surefire-plugin +- +- +- **/*Test.java +- +- +- +- + maven-antrun-plugin + + +@@ -90,44 +57,6 @@ + run + + +- +- generate-test-sources +- generate-test-sources +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- target/generated-test-sources +- +- +- run +- +- + + + +@@ -159,18 +88,6 @@ + **/UnmodifiableLazyStringList.java + **/WireFormat.java + +- +- **/LiteTest.java +- **/*Lite.java +- +- +- +- +- maven-surefire-plugin +- +- +- **/LiteTest.java +- + + + diff --git a/.gear/protobuf.spec b/.gear/protobuf.spec new file mode 100644 index 0000000..33824de --- /dev/null +++ b/.gear/protobuf.spec @@ -0,0 +1,258 @@ +# find-requires: message.h:112:18: fatal error: vector: No such file or directory +%add_findreq_skiplist /usr/include/google/protobuf/message.h +%add_findprov_skiplist /usr/include/google/protobuf/message.h + +%def_with java +%define soversion 7 + +Name: protobuf +Version: 2.4.1 +Release: alt2 +Summary: Protocol Buffers - Google's data interchange format +License: Apache License 2.0 +Group: System/Libraries +Url: http://code.google.com/p/protobuf/ +Packager: Mikhail A Pokidko + +Source: %name-%version.tar +Patch: %name-%version-%release.patch +Patch2: protobuf-2.4.1-java-fixes.patch + +Obsoletes: libprotobuf <= 2.0.0-alt1 + +# Automatically added by buildreq on Wed Nov 19 2008 +BuildRequires: gcc-c++ python-devel libnumpy-devel zlib-devel + +%description +Protocol Buffers are a way of encoding structured data in +an efficient yet extensible format. Google uses Protocol Buffers for +almost all of its internal RPC protocols and file formats. + +%package compiler +Summary: Protocol Buffers Compiler +Group: Development/Other +Requires: lib%{name}%{soversion} = %version-%release + +%description compiler +Compiler for protocol buffer definition files + +%package -n lib%{name}%{soversion} +Summary: Protocol Buffer c++ library. +Group: System/Libraries + +Provides: libprotobuf = %version-%release + +%description -n lib%{name}%{soversion} +Protocol Buffers are a way of encoding structured data in +an efficient yet extensible format. Google uses Protocol Buffers for +almost all of its internal RPC protocols and file formats. + +%package -n lib%{name}%{soversion}-lite +Summary: Protocol Buffers LITE_RUNTIME libraries +Group: System/Libraries +Provides: libprotobuf-lite = %version-%release + +%description -n lib%{name}%{soversion}-lite +Protocol Buffers built with optimize_for = LITE_RUNTIME. + +The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code +which only depends libprotobuf-lite, which is much smaller than libprotobuf but +lacks descriptors, reflection, and some other features. + +%package -n lib%{name}-devel +Summary: Development files for %name +Group: Development/C +Requires: lib%{name}%{soversion} = %version-%release + +%description -n lib%{name}-devel +This package contains development files required for packaging +%name. + +%package -n lib%{name}-lite-devel +Summary: Protocol Buffers LITE_RUNTIME development libraries +Group: Development/C +Requires: lib%{name}%{soversion}-lite = %version-%release +Requires: lib%{name}-devel = %version-%release + +%description -n lib%{name}-lite-devel +This package contains development libraries built with +optimize_for = LITE_RUNTIME. + +The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code +which only depends libprotobuf-lite, which is much smaller than libprotobuf but +lacks descriptors, reflection, and some other features. + +%package -n python-module-%name +Summary: Python module files for %name +Group: Development/Python +Requires: lib%{name}%{soversion} = %version-%release +BuildArch: noarch + +%description -n python-module-%name +Python bindings for protocol buffers + +%if_with java +%package java +Summary: Java Protocol Buffers runtime library +Group: Development/Java +BuildRequires: jpackage-core +BuildRequires: maven +BuildRequires: maven-compiler-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-resources-plugin +BuildRequires: maven-surefire-plugin +BuildRequires: maven-antrun-plugin +BuildRequires: maven-doxia +BuildRequires: maven-doxia-sitetools +Requires: java +Requires: jpackage-utils +Conflicts: %{name}-compiler > %{version} +Conflicts: %{name}-compiler < %{version} + +%description java +This package contains Java Protocol Buffers runtime library. + +%package javadoc +Summary: Javadocs for %{name}-java +Group: Development/Documentation +BuildArch: noarch +Requires: %{name}-java = %{version}-%{release} + +%description javadoc +This package contains the API documentation for %{name}-java. +%endif + +%prep +%setup -q +%patch -p1 +rm -rf java/src/test + +# without gtest +rm -rf gtest + +%if_with java +%patch2 -p1 -b .java-fixes +rm -rf java/src/test +%endif + +%build +iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8 +mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt + +rm -f m4/{lt*,libtool*}.m4 +export PTHREAD_LIBS="-lpthread" +%autoreconf +%configure --disable-static +%make_build +pushd python +%python_build +popd + +%if_with java +pushd java +mvn-rpmbuild install javadoc:javadoc +popd +%endif + +%install +%makeinstall_std +mkdir -p %buildroot%python_sitelibdir/google/ + +pushd python +%python_install --optimize=2 --record=INSTALLED_FILES +popd + +%if_with java +pushd java +install -d -m 755 %{buildroot}%{_javadir} +install -pm 644 target/%{name}-java-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar + +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -rp target/site/apidocs %{buildroot}%{_javadocdir}/%{name} + +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom %{name}.jar +%endif + +%files compiler +%_bindir/protoc + +%files -n lib%{name}%{soversion} +%doc CONTRIBUTORS.txt README.txt examples/ +%_libdir/*.so.* +%exclude %_libdir/libprotobuf-lite.so.* + +%files -n lib%{name}-devel +%dir %_includedir/google/ +%_includedir/google/protobuf/ +%_pkgconfigdir/protobuf.pc +%_libdir/*.so +%exclude %_libdir/libprotobuf-lite.so + +%files -n lib%{name}%{soversion}-lite +%_libdir/libprotobuf-lite.so.* + +%files -n lib%{name}-lite-devel +%_libdir/libprotobuf-lite.so +%_pkgconfigdir/protobuf-lite.pc + +%files -n python-module-%name -f python/INSTALLED_FILES +#python_sitelibdir/google/ + +%if_with java +%files java +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} +%{_javadir}/%{name}.jar +%doc examples/AddPerson.java examples/ListPeople.java + +%files javadoc +%{_javadocdir}/%{name} +%endif + +%changelog +* Sun Sep 09 2012 Igor Vlasenko 2.4.1-alt2 +- added protobuf-java subpackage (required for maven dependencies) + +* Thu Nov 24 2011 Alexey Shabalin 2.4.1-alt1 +- 2.4.1 + +* Sat Oct 22 2011 Vitaly Kuznetsov 2.3.0-alt1.1.1 +- Rebuild with Python-2.7 + +* Sun Mar 27 2011 Eugeny A. Rostovtsev (REAL) 2.3.0-alt1.1 +- Rebuilt for debuginfo + +* Mon Sep 20 2010 Alexey Shabalin 2.3.0-alt1 +- 2.3.0 +- changed soname + +* Fri Apr 30 2010 Alexey Shabalin 2.2.0a-alt1 +- 2.2.0a +- changed soname +- added export PTHREAD_LIBS="-lpthread" +- add libprotobuf-lite subpackage + +* Fri Apr 30 2010 Alexey Shabalin 2.2.0-alt1 +- 2.2.0 + +* Fri Feb 19 2010 Eugeny A. Rostovtsev (REAL) 2.1.0-alt1.2 +- Rebuild with reformed NumPy + +* Fri Nov 13 2009 Eugeny A. Rostovtsev (REAL) 2.1.0-alt1.1 +- Rebuilt with python 2.6 + +* Thu Jun 18 2009 Mikhail Pokidko 2.1.0-alt1 +- Version up. libprotobuf->libprotobuf4. Preparings for java separation. + +* Thu Jun 18 2009 Mikhail Pokidko 2.0.2-alt2 +- Fixed gcc4.4 build errors. + +* Mon Nov 17 2008 Mikhail Pokidko 2.0.2-alt1 +- Building protobuf with new subpackages structure and with python binding + +* Wed Jul 23 2008 Vitaly Lipatov 2.0.0-alt1 +- initial build for ALT Linux Sisyphus (2.0.0 beta) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..9297dc8 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,4 @@ +tar: v@version@:. +diff: v@version@:. . +copy: .gear/*.patch +spec: .gear/protobuf.spec diff --git a/.gear/tags/df66f12ada4955c9346dc7c008242d100978977a b/.gear/tags/df66f12ada4955c9346dc7c008242d100978977a new file mode 100644 index 0000000..ee47b19 --- /dev/null +++ b/.gear/tags/df66f12ada4955c9346dc7c008242d100978977a @@ -0,0 +1,6 @@ +object 48069ce33076ea2290caaf4bb05c60e268dc30ca +type commit +tag v2.4.1 +tagger Alexey Shabalin 1322133377 +0400 + +v2.4.1 diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..c4f739b --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +df66f12ada4955c9346dc7c008242d100978977a v2.4.1 diff --git a/Makefile.am b/Makefile.am index 9b960fc..c87f593 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,27 +11,6 @@ SUBDIRS = . src # Always include gtest in distributions. DIST_SUBDIRS = $(subdirs) src -# Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS -# because then "make check" would also build and run all of gtest's own tests, -# which takes a lot of time and is generally not useful to us. Also, we don't -# want "make install" to recurse into gtest since we don't want to overwrite -# the installed version of gtest if there is one. -check-local: - @echo "Making lib/libgtest.a lib/libgtest_main.a in gtest" - @cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la - -# We would like to clean gtest when "make clean" is invoked. But we have to -# be careful because clean-local is also invoked during "make distclean", but -# "make distclean" already recurses into gtest because it's listed among the -# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to -# cd to the directory again and "make clean" it will fail. So, check that the -# Makefile exists before recursing. -clean-local: - @if test -e gtest/Makefile; then \ - echo "Making clean in gtest"; \ - cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \ - fi - pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = protobuf.pc protobuf-lite.pc diff --git a/autogen.sh b/autogen.sh index 04d65b1..724bba7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -25,15 +25,6 @@ fi set -ex -# Temporary hack: Must change C runtime library to "multi-threaded DLL", -# otherwise it will be set to "multi-threaded static" when MSVC upgrades -# the project file to MSVC 2005/2008. vladl of Google Test says gtest will -# probably change their default to match, then this will be unnecessary. -# One of these mappings converts the debug configuration and the other -# converts the release configuration. I don't know which is which. -sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g; - s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj - # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings. autoreconf -f -i -Wall,no-obsolete diff --git a/python/setup.py b/python/setup.py index 5df0df8..3c0d1f1 100755 --- a/python/setup.py +++ b/python/setup.py @@ -4,10 +4,10 @@ # We must use setuptools, not distutils, because we need to use the # namespace_packages option for the "google" package. -from ez_setup import use_setuptools -use_setuptools() - -from setuptools import setup, Extension +#from ez_setup import use_setuptools +#use_setuptools() +from distutils.core import setup +#from setuptools import setup, Extension from distutils.spawn import find_executable import sys import os diff --git a/src/Makefile.am b/src/Makefile.am index 327339a..112c505 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -277,10 +277,9 @@ COMMON_TEST_SOURCES = \ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ protobuf-lite-test test_plugin $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ - $(top_builddir)/gtest/lib/libgtest.la \ - $(top_builddir)/gtest/lib/libgtest_main.la -protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ - -I$(top_builddir)/gtest/include + -lgtest -lgtest_main +protobuf_test_CPPFLAGS = + # Disable optimization for tests unless the user explicitly asked for it, # since test_util.cc takes forever to compile with optimization (with GCC). # See configure.ac for more info. @@ -320,11 +319,8 @@ nodist_protobuf_test_SOURCES = $(protoc_outputs) # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ - $(top_builddir)/gtest/lib/libgtest.la \ - $(top_builddir)/gtest/lib/libgtest_main.la -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ - -I$(top_builddir)/gtest/include \ - -DPROTOBUF_TEST_NO_DESCRIPTORS + -lgtest -lgtest_main +protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) protobuf_lazy_descriptor_test_SOURCES = \ google/protobuf/compiler/cpp/cpp_unittest.cc \