summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Brewer (Gentoo Key) <tomboy64@sina.cn>2016-04-13 20:21:39 +0200
committerIan Delaney <idella4@gentoo.org>2016-04-21 17:51:59 +0800
commit88c7324a377aa965facacc0b8a2704d59bf76cf4 (patch)
tree4ebea2b86cc4a021da8a46dcf06b4863a84d5b25 /dev-libs
parentros-meta/gazebo_ros_pkgs: Bump to 2.5.3. (diff)
downloadgentoo-88c7324a377aa965facacc0b8a2704d59bf76cf4.tar.gz
gentoo-88c7324a377aa965facacc0b8a2704d59bf76cf4.tar.bz2
gentoo-88c7324a377aa965facacc0b8a2704d59bf76cf4.zip
dev-libs/protobuf: version bump, 3.0.0_beta2
- bump to EAPI6 - outsourced official implementations in java and python Package-Manager: portage-2.2.28 RepoMan-Options: --ignore-arches Closes: https://github.com/gentoo/gentoo/pull/1295 Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/protobuf/Manifest1
-rw-r--r--dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch89
-rw-r--r--dev-libs/protobuf/metadata.xml10
-rw-r--r--dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild100
4 files changed, 200 insertions, 0 deletions
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 5cda08f0e35f..058a0c27f401 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,3 +1,4 @@
DIST protobuf-2.4.1.tar.bz2 1440188 SHA256 cf8452347330834bbf9c65c2e68b5562ba10c95fa40d4f7ec0d2cb332674b0bf SHA512 52b0208c685e44126cb3915a74bde692ef91430f0407144b6c30b72a9f143b1ee4f1eea47a550184c689a1758b92582e7f26f0683c2d387205b957a69830f2f3 WHIRLPOOL e5462ff35f63413aff58640c24b9b561ac55749c489803ae009de21bf5d954a77516714361353ef02cfeb3c2d762620c89dc08a5fdee571e3a33b6f5c20edf6e
DIST protobuf-2.5.0.tar.bz2 1866763 SHA256 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 SHA512 5994b3669808b82fef5c860ecad36358c0767f84acac877e7bfcf722e59d972835a955714149bdd4158fbd1328a51d01397a563991d26475351ee72be48142ee WHIRLPOOL 7e6786e1f20bf253d0e386a95c2bbfe1b443f484d492f97552cadcea62c24461436aa88130e3ff20b4dc9f352c101458cb8c03686f1cc4e6e2133b6e78f5b70d
DIST protobuf-2.6.1.tar.bz2 2021416 SHA256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 SHA512 8b092b87fcd79223db199cd3d330f3d43689b47f345aa4e34028dcf1680d609a5d5a89ab08588e817b566d3b265834c38f1db580bc1c144b512ce74d35f2a174 WHIRLPOOL b8d7f5e6b85670520435fd1107eb67035c822c2dad9689dadc29754de3bf8076ac256cf3fe3e719e99c0ccb03ed78edecb91afbe96b611073b60ae3fb3f29b1a
+DIST protobuf-3.0.0_beta2.tar.gz 3333054 SHA256 be224d07ce87f12e362cff3df02851107bf92a4e4604349b1d7a4b1f0c3bfd86 SHA512 3a9329603226dabeaae7c28eb7463fb4403383e7774d53742e9e38a0426f5ef370803c68e4d4bc0d37585618fb340befe4f812731db0984b12032c3d931cdca7 WHIRLPOOL 0e77105c24d71c0269f4375ebfaef38175d762e1a90cdd81f594c13bbece9f390ada9291f722e8e0227952a1f5cd94976037f069b86703c7a3a37a9277cb66f8
diff --git a/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch b/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch
new file mode 100644
index 000000000000..341d1128aa1a
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch
@@ -0,0 +1,89 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2015-12-30 22:21:46.000000000 +0100
++++ b/configure.ac 2016-04-16 17:46:54.858904639 +0200
+@@ -176,9 +176,9 @@
+ # HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+ # since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+ # too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([gmock])
++#export CFLAGS
++#export CXXFLAGS
++#AC_CONFIG_SUBDIRS([gmock])
+
+ AC_CONFIG_FILES([Makefile src/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+diff -Naur a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2015-12-30 22:21:46.000000000 +0100
++++ b/Makefile.am 2016-04-16 17:46:25.355751203 +0200
+@@ -17,9 +17,10 @@
+ # want "make install" to recurse into gmock since we don't want to overwrite
+ # the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
++ @echo "Making of gmock disabled"
++# @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
++# @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
++# @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+
+ # We would like to clean gmock when "make clean" is invoked. But we have to
+ # be careful because clean-local is also invoked during "make distclean", but
+diff -Naur a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am 2015-12-30 22:21:46.000000000 +0100
++++ b/src/Makefile.am 2016-04-16 17:47:07.026967535 +0200
+@@ -669,11 +669,8 @@
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
+- -I$(srcdir)/../gmock/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_test_CPPFLAGS = -I/usr/include
+ # 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.
+@@ -753,11 +750,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include \
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lazy_descriptor_test_CPPFLAGS = -I/usr/include \
+ -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+@@ -788,11 +782,8 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lite_arena_test_CPPFLAGS = -I/usr/include
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -801,8 +792,8 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest
++test_plugin_CPPFLAGS = -I/usr/include
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml
index 5f0a96f49a03..ca1ce7e978cb 100644
--- a/dev-libs/protobuf/metadata.xml
+++ b/dev-libs/protobuf/metadata.xml
@@ -4,6 +4,16 @@
<maintainer type='person'>
<email>vapier@gentoo.org</email>
</maintainer>
+<maintainer type='person'>
+ <email>tomboy64@sina.cn</email>
+</maintainer>
+<slots>
+ <subslots>soname major version number</subslots>
+</slots>
+<use>
+ <flag name="java">Builds the Java implementation. This is not needed for Java support in protoc.</flag>
+ <flag name="python">Builds the Python implementation. This is not needed for Python support in protoc.</flag>
+</use>
<upstream>
<remote-id type='github'>google/protobuf</remote-id>
</upstream>
diff --git a/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild b/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild
new file mode 100644
index 000000000000..17a7d537ecde
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 python3_5 )
+inherit python-r1 autotools flag-o-matic toolchain-funcs elisp-common multilib-minimal
+
+# If you bump this package, also consider bumping the official language bindings!
+# At the current time these are java and python.
+MY_PV=${PV/_beta2/-beta-2}
+
+DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
+HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
+SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/10"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="emacs examples java python static-libs test vim-syntax zlib"
+
+DEPEND="emacs? ( virtual/emacs )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ test? ( dev-cpp/gmock[${MULTILIB_USEDEP}] )"
+# This is provided for backwards compatibility due to (likely incorrect) use in consumers.
+PDEPEND="java? ( dev-java/protobuf-java )
+ python? ( dev-python/protobuf-python[${PYTHON_USEDEP}] )"
+S="${WORKDIR}/${PN}-${MY_PV}"
+PATCHES=( "${FILESDIR}/${PN}-2.5.0-emacs-24.4.patch"
+ "${FILESDIR}/${PN}-2.6.1-protoc-cmdline.patch"
+ "${FILESDIR}/${P}-disable-local-gmock.patch" )
+
+src_prepare() {
+ append-cxxflags -DGOOGLE_PROTOBUF_NO_RTTI
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_with zlib)
+ )
+ if tc-is-cross-compiler; then
+ # The build system wants `protoc` when building, so we need a copy that
+ # runs on the host. This is more hermetic than relying on the version
+ # installed in the host being the exact same version.
+ mkdir -p "${WORKDIR}"/build || die
+ pushd "${WORKDIR}"/build >/dev/null || die
+ ECONF_SOURCE=${S} econf_build "${myeconfargs[@]}"
+ myeconfargs+=( --with-protoc="${PWD}"/src/protoc )
+ popd >/dev/null || die
+ fi
+ ECONF_SOURCE=${S} econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if tc-is-cross-compiler; then
+ emake -C "${WORKDIR}"/build/src protoc
+ fi
+
+ default
+
+ if use emacs; then
+ elisp-compile "${S}"/editors/protobuf-mode.el
+ fi
+}
+
+multilib_src_test() {
+ emake check
+}
+
+src_install() {
+ multilib-minimal_src_install
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins editors/proto.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ doins "${FILESDIR}/proto.vim"
+ fi
+
+ if use emacs; then
+ elisp-install "${PN}" editors/protobuf-mode.el*
+ elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
+ fi
+
+ if use examples; then
+ DOCS+=( examples )
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}