diff options
author | markd <markd@pkgsrc.org> | 2019-01-08 05:56:19 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2019-01-08 05:56:19 +0000 |
commit | f58d052a4c3bc7a844bcc9ef19650a632a15c401 (patch) | |
tree | 7cda21572d503bed8b896868adde95906588986b /devel/py-protobuf | |
parent | 18d84923710946b0304765b4a9bf88ad0beb024b (diff) | |
download | pkgsrc-f58d052a4c3bc7a844bcc9ef19650a632a15c401.tar.gz |
{py-,}protobuf: don't share the patches directory
some patches only apply to py-protobuf.
Diffstat (limited to 'devel/py-protobuf')
12 files changed, 360 insertions, 2 deletions
diff --git a/devel/py-protobuf/Makefile b/devel/py-protobuf/Makefile index 57fee104f37..e186deedef3 100644 --- a/devel/py-protobuf/Makefile +++ b/devel/py-protobuf/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2019/01/06 11:21:06 markd Exp $ +# $NetBSD: Makefile,v 1.16 2019/01/08 05:56:19 markd Exp $ .include "../../devel/protobuf/Makefile.common" @@ -9,7 +9,8 @@ CATEGORIES+= python MAINTAINER= khorben@defora.org COMMENT= Python bindings for protobuf -USE_LANGUAGES+= c c++ +USE_LANGUAGES+= c c++11 +CFLAGS+= -std=c++11 # NetBSD complains without this PYSETUPSUBDIR= python PYSETUPBUILDARGS= --cpp_implementation diff --git a/devel/py-protobuf/patches/patch-configure b/devel/py-protobuf/patches/patch-configure new file mode 100644 index 00000000000..3150828de6b --- /dev/null +++ b/devel/py-protobuf/patches/patch-configure @@ -0,0 +1,183 @@ +$NetBSD: patch-configure,v 1.1 2019/01/08 05:56:19 markd Exp $ + +Fix unportable test(1) operator. + +--- configure.orig 2018-06-06 19:44:06.000000000 +0000 ++++ configure +@@ -787,7 +787,6 @@ infodir + docdir + oldincludedir + includedir +-runstatedir + localstatedir + sharedstatedir + sysconfdir +@@ -882,7 +881,6 @@ datadir='${datarootdir}' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' +-runstatedir='${localstatedir}/run' + includedir='${prefix}/include' + oldincludedir='/usr/include' + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +@@ -1135,15 +1133,6 @@ do + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + +- -runstatedir | --runstatedir | --runstatedi | --runstated \ +- | --runstate | --runstat | --runsta | --runst | --runs \ +- | --run | --ru | --r) +- ac_prev=runstatedir ;; +- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ +- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ +- | --run=* | --ru=* | --r=*) +- runstatedir=$ac_optarg ;; +- + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ +@@ -1281,7 +1270,7 @@ fi + for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ +- libdir localedir mandir runstatedir ++ libdir localedir mandir + do + eval ac_val=\$$ac_var + # Remove trailing slashes. +@@ -1434,7 +1423,6 @@ Fine tuning of the installation director + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] +- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] +@@ -7600,7 +7588,7 @@ fi + fi + + case $host_os in +- *solaris*) ++ *notsolaris*) + for ac_prog in isainfo + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -8796,7 +8784,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd* | netbsdelf*-gnu) ++netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else +@@ -12231,9 +12219,6 @@ $as_echo_n "checking whether the $compil + openbsd* | bitrig*) + with_gnu_ld=no + ;; +- linux* | k*bsd*-gnu | gnu*) +- link_all_deplibs=no +- ;; + esac + + ld_shlibs=yes +@@ -12488,7 +12473,7 @@ _LT_EOF + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -13158,7 +13143,6 @@ $as_echo "$lt_cv_irix_exported_symbol" > + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi +- link_all_deplibs=no + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' +@@ -13180,7 +13164,7 @@ $as_echo "$lt_cv_irix_exported_symbol" > + esac + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -14295,18 +14279,6 @@ fi + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -17201,7 +17173,7 @@ lt_prog_compiler_static_CXX= + ;; + esac + ;; +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise +@@ -17576,9 +17548,6 @@ $as_echo_n "checking whether the $compil + ;; + esac + ;; +- linux* | k*bsd*-gnu | gnu*) +- link_all_deplibs_CXX=no +- ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; +@@ -18272,18 +18241,6 @@ fi + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -18661,7 +18618,7 @@ fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +- if test "$have_ld_version_script" == "yes"; then ++ if test "$have_ld_version_script" = "yes"; then + HAVE_LD_VERSION_SCRIPT_TRUE= + HAVE_LD_VERSION_SCRIPT_FALSE='#' + else +@@ -22590,6 +22549,7 @@ $as_echo X"$file" | + cat <<_LT_EOF >> "$cfgfile" + #! $SHELL + # Generated automatically by $as_me ($PACKAGE) $VERSION ++# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + + # Provide generalized library-building support services. diff --git a/devel/py-protobuf/patches/patch-configure.ac b/devel/py-protobuf/patches/patch-configure.ac new file mode 100644 index 00000000000..f928490bb5b --- /dev/null +++ b/devel/py-protobuf/patches/patch-configure.ac @@ -0,0 +1,15 @@ +$NetBSD: patch-configure.ac,v 1.1 2019/01/08 05:56:19 markd Exp $ + +Fix unportable test(1) operator. + +--- configure.ac.orig 2017-04-06 00:15:19.000000000 +0000 ++++ configure.ac +@@ -110,7 +110,7 @@ AC_LINK_IFELSE( + [have_ld_version_script=yes; AC_MSG_RESULT(yes)], + [have_ld_version_script=no; AC_MSG_RESULT(no)]) + LDFLAGS=$save_LDFLAGS +-AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"]) ++AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" = "yes"]) + + # Checks for header files. + AC_HEADER_STDC diff --git a/devel/py-protobuf/patches/patch-m4_acx__check__suncc.m4 b/devel/py-protobuf/patches/patch-m4_acx__check__suncc.m4 new file mode 100644 index 00000000000..27b7f80a2f0 --- /dev/null +++ b/devel/py-protobuf/patches/patch-m4_acx__check__suncc.m4 @@ -0,0 +1,15 @@ +$NetBSD: patch-m4_acx__check__suncc.m4,v 1.1 2019/01/08 05:56:19 markd Exp $ + +Disable Solaris ISA selection. + +--- m4/acx_check_suncc.m4.orig 2017-03-29 20:41:23.000000000 +0000 ++++ m4/acx_check_suncc.m4 +@@ -30,7 +30,7 @@ AC_DEFUN([ACX_CHECK_SUNCC],[ + ]) + + case $host_os in +- *solaris*) ++ *notsolaris*) + AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) + AS_IF([test "x$ISAINFO" != "xno"], + [isainfo_b=`${ISAINFO} -b`], diff --git a/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor.cc b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor.cc new file mode 100644 index 00000000000..58ecc960ace --- /dev/null +++ b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-python_google_protobuf_pyext_descriptor.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +python3.7 fixes + +--- python/google/protobuf/pyext/descriptor.cc.orig 2018-07-30 22:16:10.000000000 +0000 ++++ python/google/protobuf/pyext/descriptor.cc +@@ -56,7 +56,7 @@ + #endif + #define PyString_AsStringAndSize(ob, charpp, sizep) \ + (PyUnicode_Check(ob)? \ +- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ ++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ + PyBytes_AsStringAndSize(ob, (charpp), (sizep))) + #endif + diff --git a/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_containers.cc b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_containers.cc new file mode 100644 index 00000000000..4d28158b94f --- /dev/null +++ b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_containers.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-python_google_protobuf_pyext_descriptor_containers.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +python3.7 fixes + +--- python/google/protobuf/pyext/descriptor_containers.cc.orig 2018-07-30 22:16:10.000000000 +0000 ++++ python/google/protobuf/pyext/descriptor_containers.cc +@@ -66,7 +66,7 @@ + #endif + #define PyString_AsStringAndSize(ob, charpp, sizep) \ + (PyUnicode_Check(ob)? \ +- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ ++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ + PyBytes_AsStringAndSize(ob, (charpp), (sizep))) + #endif + diff --git a/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_pool.cc b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_pool.cc new file mode 100644 index 00000000000..218f537e2ed --- /dev/null +++ b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_descriptor_pool.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-python_google_protobuf_pyext_descriptor_pool.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +python3.7 fixes + +--- python/google/protobuf/pyext/descriptor_pool.cc.orig 2018-07-30 22:16:10.000000000 +0000 ++++ python/google/protobuf/pyext/descriptor_pool.cc +@@ -48,7 +48,7 @@ + #endif + #define PyString_AsStringAndSize(ob, charpp, sizep) \ + (PyUnicode_Check(ob)? \ +- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ ++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ + PyBytes_AsStringAndSize(ob, (charpp), (sizep))) + #endif + diff --git a/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_extension_dict.cc b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_extension_dict.cc new file mode 100644 index 00000000000..9a823cc4fa2 --- /dev/null +++ b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_extension_dict.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-python_google_protobuf_pyext_extension_dict.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +python3.7 fixes + +--- python/google/protobuf/pyext/extension_dict.cc.orig 2018-07-30 22:16:10.000000000 +0000 ++++ python/google/protobuf/pyext/extension_dict.cc +@@ -53,7 +53,7 @@ + #endif + #define PyString_AsStringAndSize(ob, charpp, sizep) \ + (PyUnicode_Check(ob)? \ +- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ ++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ + PyBytes_AsStringAndSize(ob, (charpp), (sizep))) + #endif + diff --git a/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_message.cc b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_message.cc new file mode 100644 index 00000000000..95f023bc049 --- /dev/null +++ b/devel/py-protobuf/patches/patch-python_google_protobuf_pyext_message.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-python_google_protobuf_pyext_message.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +--- python/google/protobuf/pyext/message.cc.orig 2018-07-30 22:16:10.000000000 +0000 ++++ python/google/protobuf/pyext/message.cc +@@ -79,7 +79,7 @@ + (PyUnicode_Check(ob)? PyUnicode_AsUTF8(ob): PyBytes_AsString(ob)) + #define PyString_AsStringAndSize(ob, charpp, sizep) \ + (PyUnicode_Check(ob)? \ +- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ ++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ + PyBytes_AsStringAndSize(ob, (charpp), (sizep))) + #endif + #endif +@@ -1529,7 +1529,7 @@ PyObject* HasField(CMessage* self, PyObj + return NULL; + } + #else +- field_name = PyUnicode_AsUTF8AndSize(arg, &size); ++ field_name = const_cast<char*>(PyUnicode_AsUTF8AndSize(arg, &size)); + if (!field_name) { + return NULL; + } diff --git a/devel/py-protobuf/patches/patch-src_google_protobuf_message__lite.cc b/devel/py-protobuf/patches/patch-src_google_protobuf_message__lite.cc new file mode 100644 index 00000000000..7dc286416c5 --- /dev/null +++ b/devel/py-protobuf/patches/patch-src_google_protobuf_message__lite.cc @@ -0,0 +1,14 @@ +$NetBSD: patch-src_google_protobuf_message__lite.cc,v 1.1 2019/01/08 05:56:19 markd Exp $ + +need limits for INT_MAX + +--- src/google/protobuf/message_lite.cc.orig 2016-09-24 01:27:21.000000000 +0000 ++++ src/google/protobuf/message_lite.cc +@@ -38,6 +38,7 @@ + #include <google/protobuf/message_lite.h> + #include <google/protobuf/repeated_field.h> + #include <string> ++#include <climits> + #include <google/protobuf/stubs/logging.h> + #include <google/protobuf/stubs/common.h> + #include <google/protobuf/io/coded_stream.h> diff --git a/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure b/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure new file mode 100644 index 00000000000..4ff5e61dbad --- /dev/null +++ b/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure @@ -0,0 +1,24 @@ +$NetBSD: patch-third__party_googletest_googlemock_configure,v 1.1 2019/01/08 05:56:19 markd Exp $ + +Fix shell portability issues. + +--- third_party/googletest/googlemock/configure.orig 2018-07-31 00:19:25.000000000 +0000 ++++ third_party/googletest/googlemock/configure +@@ -16355,7 +16355,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 +@@ -16385,7 +16385,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 diff --git a/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure.ac b/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure.ac new file mode 100644 index 00000000000..0ebe6524df8 --- /dev/null +++ b/devel/py-protobuf/patches/patch-third__party_googletest_googlemock_configure.ac @@ -0,0 +1,24 @@ +$NetBSD: patch-third__party_googletest_googlemock_configure.ac,v 1.1 2019/01/08 05:56:19 markd Exp $ + +Fix shell portability issues. + +--- third_party/googletest/googlemock/configure.ac.orig 2018-05-17 17:42:54.000000000 +0000 ++++ third_party/googletest/googlemock/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 |