pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import protobuf-3.0.0 as wip/protobuf.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Aug 6 13:22:47 2016 +0200
Changeset:	aeb5dbf4f846f2b1b5bfdcd053782591a918cfaf

Added Files:
	protobuf/DESCR
	protobuf/Makefile
	protobuf/Makefile.common
	protobuf/PLIST
	protobuf/buildlink3.mk
	protobuf/distinfo
	protobuf/patches/patch-gmock_configure
	protobuf/patches/patch-gmock_configure.ac
	protobuf/patches/patch-src_google_protobuf_stubs_atomicops.h
	protobuf/patches/patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h

Log Message:
Import protobuf-3.0.0 as wip/protobuf.

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.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=aeb5dbf4f846f2b1b5bfdcd053782591a918cfaf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 protobuf/DESCR                                     |   3 +
 protobuf/Makefile                                  |  32 ++++++
 protobuf/Makefile.common                           |  19 +++
 protobuf/PLIST                                     | 128 +++++++++++++++++++++
 protobuf/buildlink3.mk                             |  14 +++
 protobuf/distinfo                                  |  10 ++
 protobuf/patches/patch-gmock_configure             |  27 +++++
 protobuf/patches/patch-gmock_configure.ac          |  22 ++++
 .../patch-src_google_protobuf_stubs_atomicops.h    |  16 +++
 ...protobuf_stubs_atomicops__internals__arm__gcc.h |  89 ++++++++++++++
 10 files changed, 360 insertions(+)

diffs:
diff --git a/protobuf/DESCR b/protobuf/DESCR
new file mode 100644
index 0000000..73df6ac
--- /dev/null
+++ b/protobuf/DESCR
@@ -0,0 +1,3 @@
+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.
diff --git a/protobuf/Makefile b/protobuf/Makefile
new file mode 100644
index 0000000..a634017
--- /dev/null
+++ b/protobuf/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.9 2015/06/10 01:31:51 wiedi Exp $
+#
+
+.include "Makefile.common"
+
+DISTNAME=	protobuf-cpp-${PROTOBUFVER}
+PKGNAME=	${DISTNAME:S/-cpp//}
+
+MAINTAINER=	aran%100acres.us@localhost
+COMMENT=	Google protocol buffers
+
+GNU_CONFIGURE=	yes
+USE_LIBTOOL=	yes
+USE_LANGUAGES=	c++ c
+USE_TOOLS+=	autoreconf automake autoconf
+
+SET_LIBDIR=	yes
+
+PKGCONFIG_OVERRIDE+=	protobuf-lite.pc.in
+PKGCONFIG_OVERRIDE+=	protobuf.pc.in
+
+TEST_TARGET=	check
+
+pre-configure:
+	${RUN} cd ${WRKSRC} && ./autogen.sh
+
+
+.include "../../devel/gmock/buildlink3.mk"
+BUILDLINK_API_DEPENDS.zlib+=	zlib>=1.2.0.4
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/protobuf/Makefile.common b/protobuf/Makefile.common
new file mode 100644
index 0000000..bef8101
--- /dev/null
+++ b/protobuf/Makefile.common
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile.common,v 1.2 2015/06/10 09:02:06 wiedi Exp $
+#
+# used by devel/protobuf/Makefile
+# used by devel/py-protobuf/Makefile
+
+PROTOBUFVER=	3.0.0
+
+MASTER_SITES=	${MASTER_SITE_GITHUB:=google/}
+GITHUB_PROJECT=	protobuf
+GITHUB_RELEASE=	v${PKGVERSION_NOREV}
+
+CATEGORIES=	devel
+HOMEPAGE=       http://code.google.com/p/protobuf/
+
+LICENSE=	modified-bsd
+
+WRKSRC=		${WRKDIR}/protobuf-${PKGVERSION_NOREV}
+
+PATCHDIR=	${.CURDIR}/../../wip/protobuf/patches
diff --git a/protobuf/PLIST b/protobuf/PLIST
new file mode 100644
index 0000000..af007e1
--- /dev/null
+++ b/protobuf/PLIST
@@ -0,0 +1,128 @@
+@comment $NetBSD$
+bin/protoc
+include/google/protobuf/any.h
+include/google/protobuf/any.pb.h
+include/google/protobuf/any.proto
+include/google/protobuf/api.pb.h
+include/google/protobuf/api.proto
+include/google/protobuf/arena.h
+include/google/protobuf/arenastring.h
+include/google/protobuf/compiler/code_generator.h
+include/google/protobuf/compiler/command_line_interface.h
+include/google/protobuf/compiler/cpp/cpp_generator.h
+include/google/protobuf/compiler/csharp/csharp_generator.h
+include/google/protobuf/compiler/csharp/csharp_names.h
+include/google/protobuf/compiler/importer.h
+include/google/protobuf/compiler/java/java_generator.h
+include/google/protobuf/compiler/java/java_names.h
+include/google/protobuf/compiler/javanano/javanano_generator.h
+include/google/protobuf/compiler/js/js_generator.h
+include/google/protobuf/compiler/objectivec/objectivec_generator.h
+include/google/protobuf/compiler/objectivec/objectivec_helpers.h
+include/google/protobuf/compiler/parser.h
+include/google/protobuf/compiler/plugin.h
+include/google/protobuf/compiler/plugin.pb.h
+include/google/protobuf/compiler/plugin.proto
+include/google/protobuf/compiler/python/python_generator.h
+include/google/protobuf/compiler/ruby/ruby_generator.h
+include/google/protobuf/descriptor.h
+include/google/protobuf/descriptor.pb.h
+include/google/protobuf/descriptor.proto
+include/google/protobuf/descriptor_database.h
+include/google/protobuf/duration.pb.h
+include/google/protobuf/duration.proto
+include/google/protobuf/dynamic_message.h
+include/google/protobuf/empty.pb.h
+include/google/protobuf/empty.proto
+include/google/protobuf/extension_set.h
+include/google/protobuf/field_mask.pb.h
+include/google/protobuf/field_mask.proto
+include/google/protobuf/generated_enum_reflection.h
+include/google/protobuf/generated_enum_util.h
+include/google/protobuf/generated_message_reflection.h
+include/google/protobuf/generated_message_util.h
+include/google/protobuf/io/coded_stream.h
+include/google/protobuf/io/gzip_stream.h
+include/google/protobuf/io/printer.h
+include/google/protobuf/io/strtod.h
+include/google/protobuf/io/tokenizer.h
+include/google/protobuf/io/zero_copy_stream.h
+include/google/protobuf/io/zero_copy_stream_impl.h
+include/google/protobuf/io/zero_copy_stream_impl_lite.h
+include/google/protobuf/map.h
+include/google/protobuf/map_entry.h
+include/google/protobuf/map_entry_lite.h
+include/google/protobuf/map_field.h
+include/google/protobuf/map_field_inl.h
+include/google/protobuf/map_field_lite.h
+include/google/protobuf/map_type_handler.h
+include/google/protobuf/message.h
+include/google/protobuf/message_lite.h
+include/google/protobuf/metadata.h
+include/google/protobuf/reflection.h
+include/google/protobuf/reflection_ops.h
+include/google/protobuf/repeated_field.h
+include/google/protobuf/service.h
+include/google/protobuf/source_context.pb.h
+include/google/protobuf/source_context.proto
+include/google/protobuf/struct.pb.h
+include/google/protobuf/struct.proto
+include/google/protobuf/stubs/atomic_sequence_num.h
+include/google/protobuf/stubs/atomicops.h
+include/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
+include/google/protobuf/stubs/atomicops_internals_arm_gcc.h
+include/google/protobuf/stubs/atomicops_internals_arm_qnx.h
+include/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
+include/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+include/google/protobuf/stubs/atomicops_internals_macosx.h
+include/google/protobuf/stubs/atomicops_internals_mips_gcc.h
+include/google/protobuf/stubs/atomicops_internals_pnacl.h
+include/google/protobuf/stubs/atomicops_internals_power.h
+include/google/protobuf/stubs/atomicops_internals_ppc_gcc.h
+include/google/protobuf/stubs/atomicops_internals_solaris.h
+include/google/protobuf/stubs/atomicops_internals_tsan.h
+include/google/protobuf/stubs/atomicops_internals_x86_gcc.h
+include/google/protobuf/stubs/atomicops_internals_x86_msvc.h
+include/google/protobuf/stubs/bytestream.h
+include/google/protobuf/stubs/callback.h
+include/google/protobuf/stubs/casts.h
+include/google/protobuf/stubs/common.h
+include/google/protobuf/stubs/fastmem.h
+include/google/protobuf/stubs/hash.h
+include/google/protobuf/stubs/logging.h
+include/google/protobuf/stubs/macros.h
+include/google/protobuf/stubs/mutex.h
+include/google/protobuf/stubs/once.h
+include/google/protobuf/stubs/platform_macros.h
+include/google/protobuf/stubs/port.h
+include/google/protobuf/stubs/scoped_ptr.h
+include/google/protobuf/stubs/shared_ptr.h
+include/google/protobuf/stubs/singleton.h
+include/google/protobuf/stubs/status.h
+include/google/protobuf/stubs/stl_util.h
+include/google/protobuf/stubs/stringpiece.h
+include/google/protobuf/stubs/template_util.h
+include/google/protobuf/stubs/type_traits.h
+include/google/protobuf/text_format.h
+include/google/protobuf/timestamp.pb.h
+include/google/protobuf/timestamp.proto
+include/google/protobuf/type.pb.h
+include/google/protobuf/type.proto
+include/google/protobuf/unknown_field_set.h
+include/google/protobuf/util/field_comparator.h
+include/google/protobuf/util/field_mask_util.h
+include/google/protobuf/util/json_util.h
+include/google/protobuf/util/message_differencer.h
+include/google/protobuf/util/time_util.h
+include/google/protobuf/util/type_resolver.h
+include/google/protobuf/util/type_resolver_util.h
+include/google/protobuf/wire_format.h
+include/google/protobuf/wire_format_lite.h
+include/google/protobuf/wire_format_lite_inl.h
+include/google/protobuf/wrappers.pb.h
+include/google/protobuf/wrappers.proto
+lib/libprotobuf-lite.la
+lib/libprotobuf.la
+lib/libprotoc.la
+lib/pkgconfig/protobuf-lite.pc
+lib/pkgconfig/protobuf.pc
diff --git a/protobuf/buildlink3.mk b/protobuf/buildlink3.mk
new file mode 100644
index 0000000..1ff4e48
--- /dev/null
+++ b/protobuf/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.2 2013/03/29 09:17:26 asau Exp $
+
+BUILDLINK_TREE+=	protobuf
+
+.if !defined(PROTOBUF_BUILDLINK3_MK)
+PROTOBUF_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.protobuf+=	protobuf>=3.0.0
+BUILDLINK_PKGSRCDIR.protobuf?=	../../wip/protobuf
+
+.include "../../devel/zlib/buildlink3.mk"
+.endif	# PROTOBUF_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-protobuf
diff --git a/protobuf/distinfo b/protobuf/distinfo
new file mode 100644
index 0000000..8ef2458
--- /dev/null
+++ b/protobuf/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.6 2015/11/03 03:29:03 agc Exp $
+
+SHA1 (protobuf-cpp-3.0.0.tar.gz) = 00140d255922bf33ef3842168954e3269fbba3af
+RMD160 (protobuf-cpp-3.0.0.tar.gz) = 01a00093e0f7297b3fb7933ef5700d2753109c95
+SHA512 (protobuf-cpp-3.0.0.tar.gz) = 72491ab54244b82f69f39bc485336d986d7238cdf62b48c6e02e53412f348f5cc0756a7249f45c32e7ddb37aaa1e1864244543d1414d6ce7dc03be00ef5f27ab
+Size (protobuf-cpp-3.0.0.tar.gz) = 4075839 bytes
+SHA1 (patch-gmock_configure) = fdfc235c1ac960c88bb431bffc47c249a413b890
+SHA1 (patch-gmock_configure.ac) = 0794758910f6beea74c937408979e775fd6e71bb
+SHA1 (patch-src_google_protobuf_stubs_atomicops.h) = e797cb0b4352b3de50aeeb5dfd6596200b25e125
+SHA1 (patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h) = a40f7adbff1216bbbda55ea739e438b0c3ef8c0e
diff --git a/protobuf/patches/patch-gmock_configure b/protobuf/patches/patch-gmock_configure
new file mode 100644
index 0000000..0d1bd14
--- /dev/null
+++ b/protobuf/patches/patch-gmock_configure
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- gmock/configure.orig	2016-07-15 19:19:42.000000000 +0000
++++ gmock/configure
+@@ -15761,7 +15761,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
+        have_pthreads="$acx_pthread_ok"
+ fi
+- if test "x$have_pthreads" == "xyes"; then
++ if test "x$have_pthreads" = "xyes"; then
+   HAVE_PTHREADS_TRUE=
+   HAVE_PTHREADS_FALSE='#'
+ else
+@@ -15791,7 +15791,7 @@ else
+   enable_external_gtest=yes
+ fi
+ 
+-if test "x$with_gtest" == "xno"; then :
++if test "x$with_gtest" = "xno"; then :
+   as_fn_error $? "Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard
+ dependency upon GoogleTest to build, please provide a version, or allow
+ GoogleMock to use any installed version and fall back upon its internal
+@@ -18696,4 +18696,3 @@ if test -n "$ac_unrecognized_opts" && te
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ fi
+-
diff --git a/protobuf/patches/patch-gmock_configure.ac b/protobuf/patches/patch-gmock_configure.ac
new file mode 100644
index 0000000..c29f3e5
--- /dev/null
+++ b/protobuf/patches/patch-gmock_configure.ac
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- gmock/configure.ac.orig	2016-04-28 21:34:11.000000000 +0000
++++ gmock/configure.ac
+@@ -52,7 +52,7 @@ AS_IF([test "x$with_pthreads" != "xno"],
+                [AC_MSG_FAILURE(
+                  [--with-pthreads was specified, but unable to be used])])])
+        have_pthreads="$acx_pthread_ok"])
+-AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
++AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" = "xyes"])
+ AC_SUBST(PTHREAD_CFLAGS)
+ AC_SUBST(PTHREAD_LIBS)
+ 
+@@ -76,7 +76,7 @@ AC_ARG_ENABLE([external-gtest],
+                               installed or user provided gtest. Any option to
+                               '--with-gtest' is ignored. (Default is enabled.)])
+               ], [], [enable_external_gtest=yes])
+-AS_IF([test "x$with_gtest" == "xno"],
++AS_IF([test "x$with_gtest" = "xno"],
+       [AC_MSG_ERROR([dnl
+ Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard
+ dependency upon GoogleTest to build, please provide a version, or allow
diff --git a/protobuf/patches/patch-src_google_protobuf_stubs_atomicops.h b/protobuf/patches/patch-src_google_protobuf_stubs_atomicops.h
new file mode 100644
index 0000000..08edc29
--- /dev/null
+++ b/protobuf/patches/patch-src_google_protobuf_stubs_atomicops.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- src/google/protobuf/stubs/atomicops.h.orig	2016-04-28 21:34:30.000000000 +0000
++++ src/google/protobuf/stubs/atomicops.h
+@@ -89,7 +89,11 @@ typedef intptr_t Atomic64;
+ 
+ // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+ // Atomic64 routines below, depending on your architecture.
++#ifdef __arm__
++typedef Atomic32 AtomicWord;
++#else
+ typedef intptr_t AtomicWord;
++#endif
+ 
+ // Atomically execute:
+ //      result = *ptr;
diff --git a/protobuf/patches/patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h b/protobuf/patches/patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h
new file mode 100644
index 0000000..101368d
--- /dev/null
+++ b/protobuf/patches/patch-src_google_protobuf_stubs_atomicops__internals__arm__gcc.h
@@ -0,0 +1,89 @@
+$NetBSD$
+
+--- src/google/protobuf/stubs/atomicops_internals_arm_gcc.h.orig	2016-04-28 21:34:30.000000000 +0000
++++ src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
+@@ -39,44 +39,19 @@ namespace google {
+ namespace protobuf {
+ namespace internal {
+ 
+-// 0xffff0fc0 is the hard coded address of a function provided by
+-// the kernel which implements an atomic compare-exchange. On older
+-// ARM architecture revisions (pre-v6) this may be implemented using
+-// a syscall. This address is stable, and in active use (hard coded)
+-// by at least glibc-2.7 and the Android C library.
+-typedef Atomic32 (*LinuxKernelCmpxchgFunc)(Atomic32 old_value,
+-                                           Atomic32 new_value,
+-                                           volatile Atomic32* ptr);
+-LinuxKernelCmpxchgFunc pLinuxKernelCmpxchg __attribute__((weak)) =
+-    (LinuxKernelCmpxchgFunc) 0xffff0fc0;
+-
+-typedef void (*LinuxKernelMemoryBarrierFunc)(void);
+-LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
+-    (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
+-
+-
+ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                          Atomic32 old_value,
+                                          Atomic32 new_value) {
+-  Atomic32 prev_value = *ptr;
+-  do {
+-    if (!pLinuxKernelCmpxchg(old_value, new_value,
+-                             const_cast<Atomic32*>(ptr))) {
+-      return old_value;
+-    }
+-    prev_value = *ptr;
+-  } while (prev_value == old_value);
+-  return prev_value;
++  return __sync_val_compare_and_swap(ptr, old_value, new_value);
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                          Atomic32 new_value) {
+-  Atomic32 old_value;
++  Atomic32 prev_value;
+   do {
+-    old_value = *ptr;
+-  } while (pLinuxKernelCmpxchg(old_value, new_value,
+-                               const_cast<Atomic32*>(ptr)));
+-  return old_value;
++    prev_value = *ptr;
++  } while (!__sync_bool_compare_and_swap(ptr, prev_value, new_value));
++  return prev_value;
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+@@ -86,17 +61,15 @@ inline Atomic32 NoBarrier_AtomicIncremen
+ 
+ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                         Atomic32 increment) {
+-  for (;;) {
++  Atomic32 old_value;
++  Atomic32 new_value;
++
++  do {
+     // Atomic exchange the old value with an incremented one.
+-    Atomic32 old_value = *ptr;
+-    Atomic32 new_value = old_value + increment;
+-    if (pLinuxKernelCmpxchg(old_value, new_value,
+-                            const_cast<Atomic32*>(ptr)) == 0) {
+-      // The exchange took place as expected.
+-      return new_value;
+-    }
+-    // Otherwise, *ptr changed mid-loop and we need to retry.
+-  }
++    old_value = *ptr;
++    new_value = old_value + increment;
++  } while (!__sync_bool_compare_and_swap(ptr, old_value, new_value));
++  return new_value;
+ }
+ 
+ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+@@ -116,7 +89,7 @@ inline void NoBarrier_Store(volatile Ato
+ }
+ 
+ inline void MemoryBarrier() {
+-  pLinuxKernelMemoryBarrier();
++  __sync_synchronize();
+ }
+ 
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {


Home | Main Index | Thread Index | Old Index