From 6ec7f7c752f2ecf8a6c455810465a5984a9abfa0 Mon Sep 17 00:00:00 2001 From: ziggi Date: Wed, 2 Jun 2021 14:01:43 +0000 Subject: [PATCH] add protobuf --- devel/libprotobuf/Makefile | 35 --------------- devel/libprotobuf/distinfo | 3 -- devel/libprotobuf/files/patch-x-ltmain.sh | 36 ---------------- devel/protobuf-c/Makefile | 2 +- devel/protobuf-go/Makefile | 27 ++++++++++++ devel/protobuf-go/distinfo | 5 +++ devel/protobuf-go/pkg-descr | 4 ++ devel/protobuf-go/pkg-plist | 1 + devel/protobuf/Makefile | 43 +++++++++++++++++++ devel/protobuf/distinfo | 3 ++ .../files/patch-configure | 0 devel/{libprotobuf => protobuf}/pkg-descr | 0 devel/{libprotobuf => protobuf}/pkg-plist | 11 ++--- 13 files changed, 87 insertions(+), 83 deletions(-) delete mode 100644 devel/libprotobuf/Makefile delete mode 100644 devel/libprotobuf/distinfo delete mode 100644 devel/libprotobuf/files/patch-x-ltmain.sh create mode 100644 devel/protobuf-go/Makefile create mode 100644 devel/protobuf-go/distinfo create mode 100644 devel/protobuf-go/pkg-descr create mode 100644 devel/protobuf-go/pkg-plist create mode 100644 devel/protobuf/Makefile create mode 100644 devel/protobuf/distinfo rename devel/{libprotobuf => protobuf}/files/patch-configure (100%) rename devel/{libprotobuf => protobuf}/pkg-descr (100%) rename devel/{libprotobuf => protobuf}/pkg-plist (96%) diff --git a/devel/libprotobuf/Makefile b/devel/libprotobuf/Makefile deleted file mode 100644 index 79cdb8f6..00000000 --- a/devel/libprotobuf/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# Created by: vanilla -# $FreeBSD: head/devel/protobuf/Makefile 515220 2019-10-22 23:33:43Z sunpoet $ - -PORTNAME= protobuf -PORTVERSION= 3.11.4 -DISTVERSIONPREFIX= all- -CATEGORIES= devel -MASTER_SITES= https://github.com/protocolbuffers/protobuf/releases/download/v${PORTVERSION}/ -PKGNAMEPREFIX= lib - -MAINTAINER= sunpoet@FreeBSD.org -COMMENT= Data interchange format library - -USES= compiler:c++11-lang gmake localbase pkgconfig - -CFLAGS+= -D_THREAD_SAFE -DGOOGLE_PROTOBUF_NO_RTTI -I${WRKSRC}/src - -CONFIGURE_ENV+= CC_FOR_BUILD="${CC}" -CONFIGURE_ENV+= CFLAGS_FOR_BUILD="${CFLAGS}" -CONFIGURE_ENV+= CPPFLAGS_FOR_BUILD="${CPPFLAGS}" -CONFIGURE_ENV+= CXX_FOR_BUILD="${CXX}" -CONFIGURE_ENV+= CXXFLAGS_FOR_BUILD="${CXXFLAGS}" -CONFIGURE_ENV+= LDFLAGS_FOR_BUILD="${LDFLAGS}" - -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip -USE_CXXSTD= c++11 -USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} - -post-patch: - ${REINPLACE_CMD} -e 's|^check-local:|disabled-&|' ${WRKSRC}/Makefile.in - ${REINPLACE_CMD} -Ee 's,[^ ]*lib(gtest|gmock.*)\.la,-l\1,' ${WRKSRC}/src/Makefile.in - -.include diff --git a/devel/libprotobuf/distinfo b/devel/libprotobuf/distinfo deleted file mode 100644 index 155f0d36..00000000 --- a/devel/libprotobuf/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1589619478 -SHA256 (protobuf-all-3.11.4.tar.gz) = 95a5af2fbddfaad6ef8f606eb8053ccf2f481174bd54c26373a8c49b328485a4 -SIZE (protobuf-all-3.11.4.tar.gz) = 7408292 diff --git a/devel/libprotobuf/files/patch-x-ltmain.sh b/devel/libprotobuf/files/patch-x-ltmain.sh deleted file mode 100644 index 06c6b28a..00000000 --- a/devel/libprotobuf/files/patch-x-ltmain.sh +++ /dev/null @@ -1,36 +0,0 @@ ---- ./ltmain.sh.orig 2019-09-23 20:53:51.000000000 +0200 -+++ ./ltmain.sh 2019-11-13 15:35:36.704829000 +0200 -@@ -8904,13 +8904,13 @@ - # - case $version_type in - # correct linux to gnu/linux during the next big refactor -- darwin|freebsd-elf|linux|osf|windows|none) -+ darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age=$number_minor - revision=$number_revision - ;; -- freebsd-aout|qnx|sunos) -+ freebsd*|qnx|sunos) - current=$number_major - revision=$number_minor - age=0 -@@ -8993,15 +8993,9 @@ - esac - ;; - -- freebsd-aout) -+ freebsd*) - major=.$current -- versuffix=.$current.$revision -- ;; -- -- freebsd-elf) -- func_arith $current - $age -- major=.$func_arith_result -- versuffix=$major.$age.$revision -+ versuffix=.$current - ;; - - irix | nonstopux) diff --git a/devel/protobuf-c/Makefile b/devel/protobuf-c/Makefile index 10bae60f..a2407165 100644 --- a/devel/protobuf-c/Makefile +++ b/devel/protobuf-c/Makefile @@ -9,7 +9,7 @@ CATEGORIES= devel MAINTAINER= truckman@FreeBSD.org COMMENT= Code generator and libraries to use Protocol Buffers from pure C -LIB_DEPENDS= libprotobuf.so:devel/libprotobuf +LIB_DEPENDS= libprotobuf.so:devel/protobuf USES= autoreconf compiler:c++11-lang gmake GNU_CONFIGURE= yes diff --git a/devel/protobuf-go/Makefile b/devel/protobuf-go/Makefile new file mode 100644 index 00000000..5dee66af --- /dev/null +++ b/devel/protobuf-go/Makefile @@ -0,0 +1,27 @@ +# Created by: Michael Johnson +# $FreeBSD: head/devel/goprotobuf/Makefile 517745 2019-11-16 12:52:39Z dmgk $ + +PORTNAME= protobuf-go +DISTNAME= goprotobuf +DISTVERSIONPREFIX= v +DISTVERSION= 1.1.0 +CATEGORIES= devel + +MAINTAINER= cs@FreeBSD.org +COMMENT= Go support for Google's protocol buffers + +RUN_DEPENDS= protoc:devel/protobuf + +USES= go + +USE_GITHUB= yes +GH_ACCOUNT= golang +GH_PROJECT= protobuf +GH_SUBDIR= src/github.com/golang/protobuf +GH_TUPLE= google:go-genproto:02b4e95:genproto/src/google.golang.org/genproto + +GO_TARGET= ./protoc-gen-go + +MAKE_ENV+= GO111MODULE=auto + +.include diff --git a/devel/protobuf-go/distinfo b/devel/protobuf-go/distinfo new file mode 100644 index 00000000..33d80fba --- /dev/null +++ b/devel/protobuf-go/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1532443980 +SHA256 (golang-protobuf-v1.1.0_GH0.tar.gz) = c086490e7b116b73b7e3e6058eae997576d0523ad8f1b2ec2b698887e62b14a8 +SIZE (golang-protobuf-v1.1.0_GH0.tar.gz) = 324733 +SHA256 (google-go-genproto-02b4e95_GH0.tar.gz) = 71421ee0c9af39492dad0c63736e0e3771ecd41066034f77472bd922208fcdfd +SIZE (google-go-genproto-02b4e95_GH0.tar.gz) = 2091400 diff --git a/devel/protobuf-go/pkg-descr b/devel/protobuf-go/pkg-descr new file mode 100644 index 00000000..b7573da0 --- /dev/null +++ b/devel/protobuf-go/pkg-descr @@ -0,0 +1,4 @@ +Go support, in the form of a library and protocol compiler plugin, for Google's +protocol buffers. + +WWW: https://github.com/golang/protobuf/ diff --git a/devel/protobuf-go/pkg-plist b/devel/protobuf-go/pkg-plist new file mode 100644 index 00000000..d931c5de --- /dev/null +++ b/devel/protobuf-go/pkg-plist @@ -0,0 +1 @@ +bin/protoc-gen-go diff --git a/devel/protobuf/Makefile b/devel/protobuf/Makefile new file mode 100644 index 00000000..91046867 --- /dev/null +++ b/devel/protobuf/Makefile @@ -0,0 +1,43 @@ +# Created by: vanilla +# $FreeBSD: head/devel/protobuf/Makefile 497411 2019-03-31 13:41:02Z sunpoet $ + +PORTNAME= protobuf +PORTVERSION= 3.14.0 +CATEGORIES= devel +MASTER_SITES=<->https://github.com/protocolbuffers/protobuf/releases/download/v${PORTVERSION}/ +DISTVERSIONPREFIX= cpp- + + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Data interchange format library + +BROKEN_sparc64= fails to compile: no atomic ops available + +#GH_ACCOUNT= protocolbuffers +#USE_GITHUB= yes +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} + +USES= autoreconf libtool compiler:c++11-lang gmake pkgconfig + +CFLAGS+= -D_THREAD_SAFE -DGOOGLE_PROTOBUF_NO_RTTI -I${WRKSRC}/src +CONFIGURE_ENV= CC_FOR_BUILD="${CC}" +CONFIGURE_ENV+= CFLAGS_FOR_BUILD="${CFLAGS}" +CONFIGURE_ENV+= CPPFLAGS_FOR_BUILD="${CPPFLAGS}" +CONFIGURE_ENV+= CXX_FOR_BUILD="${CXX}" +CONFIGURE_ENV+= CXXFLAGS_FOR_BUILD="${CXXFLAGS}" +CONFIGURE_ENV+= LDFLAGS_FOR_BUILD="${LDFLAGS}" +GNU_CONFIGURE= yes +INSTALL_TARGET= install-strip + +TEST_ARGS= ${MAKE_ARGS} ${_MAKE_JOBS} +TEST_TARGET= check + +USE_CXXSTD= c++11 +USE_LDCONFIG= yes + + +post-patch: + @${REINPLACE_CMD} -e 's|^check-local:|disabled-&|' ${WRKSRC}/Makefile.am + @${REINPLACE_CMD} -Ee '/gtest|mock/ s|[^ ]*lib(.*)\.la|-l\1|' ${WRKSRC}/src/Makefile.am + +.include diff --git a/devel/protobuf/distinfo b/devel/protobuf/distinfo new file mode 100644 index 00000000..e59febdf --- /dev/null +++ b/devel/protobuf/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622635095 +SHA256 (protobuf-cpp-3.14.0.tar.gz) = 50ec5a07c0c55d4ec536dd49021f2e194a26bfdbc531d03d1e9d4d3e27175659 +SIZE (protobuf-cpp-3.14.0.tar.gz) = 4655133 diff --git a/devel/libprotobuf/files/patch-configure b/devel/protobuf/files/patch-configure similarity index 100% rename from devel/libprotobuf/files/patch-configure rename to devel/protobuf/files/patch-configure diff --git a/devel/libprotobuf/pkg-descr b/devel/protobuf/pkg-descr similarity index 100% rename from devel/libprotobuf/pkg-descr rename to devel/protobuf/pkg-descr diff --git a/devel/libprotobuf/pkg-plist b/devel/protobuf/pkg-plist similarity index 96% rename from devel/libprotobuf/pkg-plist rename to devel/protobuf/pkg-plist index fa2f986b..e4923ca0 100644 --- a/devel/libprotobuf/pkg-plist +++ b/devel/protobuf/pkg-plist @@ -46,7 +46,6 @@ include/google/protobuf/generated_message_table_driven.h include/google/protobuf/generated_message_util.h include/google/protobuf/has_bits.h include/google/protobuf/implicit_weak_message.h -include/google/protobuf/inlined_string_field.h include/google/protobuf/io/coded_stream.h include/google/protobuf/io/gzip_stream.h include/google/protobuf/io/io_win32.h @@ -83,7 +82,6 @@ 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 @@ -116,17 +114,14 @@ include/google/protobuf/wire_format.h include/google/protobuf/wrappers.pb.h include/google/protobuf/wrappers.proto lib/libprotobuf-lite.a -lib/libprotobuf-lite.la lib/libprotobuf-lite.so -lib/libprotobuf-lite.so.22 +lib/libprotobuf-lite.so.25 lib/libprotobuf.a -lib/libprotobuf.la lib/libprotobuf.so -lib/libprotobuf.so.22 +lib/libprotobuf.so.25 lib/libprotoc.a -lib/libprotoc.la lib/libprotoc.so -lib/libprotoc.so.22 +lib/libprotoc.so.25 lib/pkgconfig/protobuf-lite.pc lib/pkgconfig/protobuf.pc @dir include/google/protobuf/compiler/cpp