From 3f215f778ae72008edf8caa30f9262a6bf8aefc0 Mon Sep 17 00:00:00 2001 From: ziggi Date: Wed, 2 Jun 2021 12:31:21 +0000 Subject: [PATCH] add thrift --- devel/p5-thrift/Makefile | 24 ++++ devel/p5-thrift/distinfo | 3 + devel/p5-thrift/pkg-descr | 3 + devel/p5-thrift/pkg-plist | 21 ++++ devel/py-thrift/Makefile | 21 ++++ devel/py-thrift/distinfo | 3 + devel/py-thrift/pkg-descr | 3 + devel/thrift/Makefile | 71 +++++++++++ devel/thrift/distinfo | 3 + ...src__thrift__protocol__TBinaryProtocol.tcc | 11 ++ ..._src__thrift__server__TNonblockingServer.h | 12 ++ ..._cpp_src_thrift_transport_SocketCommon.cpp | 14 +++ ...h-lib_cpp_src_thrift_transport_TSocket.cpp | 11 ++ .../thrift/files/patch-lib_lua_src_usocket.c | 10 ++ .../thrift/files/patch-x-lib-cpp-Makefile.in | 24 ++++ devel/thrift/files/patch-x-ltmain.sh | 36 ++++++ devel/thrift/pkg-descr | 12 ++ devel/thrift/pkg-plist | 112 ++++++++++++++++++ 18 files changed, 394 insertions(+) create mode 100644 devel/p5-thrift/Makefile create mode 100644 devel/p5-thrift/distinfo create mode 100644 devel/p5-thrift/pkg-descr create mode 100644 devel/p5-thrift/pkg-plist create mode 100644 devel/py-thrift/Makefile create mode 100644 devel/py-thrift/distinfo create mode 100644 devel/py-thrift/pkg-descr create mode 100644 devel/thrift/Makefile create mode 100644 devel/thrift/distinfo create mode 100644 devel/thrift/files/patch-lib__cpp__src__thrift__protocol__TBinaryProtocol.tcc create mode 100644 devel/thrift/files/patch-lib__cpp__src__thrift__server__TNonblockingServer.h create mode 100644 devel/thrift/files/patch-lib_cpp_src_thrift_transport_SocketCommon.cpp create mode 100644 devel/thrift/files/patch-lib_cpp_src_thrift_transport_TSocket.cpp create mode 100644 devel/thrift/files/patch-lib_lua_src_usocket.c create mode 100644 devel/thrift/files/patch-x-lib-cpp-Makefile.in create mode 100644 devel/thrift/files/patch-x-ltmain.sh create mode 100644 devel/thrift/pkg-descr create mode 100644 devel/thrift/pkg-plist diff --git a/devel/p5-thrift/Makefile b/devel/p5-thrift/Makefile new file mode 100644 index 00000000..0a447998 --- /dev/null +++ b/devel/p5-thrift/Makefile @@ -0,0 +1,24 @@ +# Created by: Sergey Skvortsov +# $FreeBSD: head/devel/p5-Thrift/Makefile 462862 2018-02-24 20:40:27Z lx $ + +PORTNAME= thrift +PORTVERSION= 0.14.1 +CATEGORIES= devel +MASTER_SITES= APACHE/thrift/${PORTVERSION} +CATEGORIES= devel perl5 +PKGNAMEPREFIX= p5- + + +MAINTAINER= komarov@valerka.net +COMMENT= Perl interface to Thrift + +BUILD_DEPENDS= p5-Bit-Vector>=0:perl/p5-Bit-Vector +RUN_DEPENDS= p5-Bit-Vector>=0:perl/p5-Bit-Vector + +WRKSRC_SUBDIR = lib/perl + +USES= perl5 +USE_PERL5= configure +NO_ARCH= yes + +.include diff --git a/devel/p5-thrift/distinfo b/devel/p5-thrift/distinfo new file mode 100644 index 00000000..23a5d6ec --- /dev/null +++ b/devel/p5-thrift/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622632815 +SHA256 (thrift-0.14.1.tar.gz) = 13da5e1cd9c8a3bb89778c0337cc57eb0c29b08f3090b41cf6ab78594b410ca5 +SIZE (thrift-0.14.1.tar.gz) = 4311458 diff --git a/devel/p5-thrift/pkg-descr b/devel/p5-thrift/pkg-descr new file mode 100644 index 00000000..cb5f6663 --- /dev/null +++ b/devel/p5-thrift/pkg-descr @@ -0,0 +1,3 @@ +Perl interface to Thrift. + +WWW: http://thrift.apache.org/ diff --git a/devel/p5-thrift/pkg-plist b/devel/p5-thrift/pkg-plist new file mode 100644 index 00000000..43d16b66 --- /dev/null +++ b/devel/p5-thrift/pkg-plist @@ -0,0 +1,21 @@ +%%SITE_PERL%%/Thrift.pm +%%SITE_PERL%%/Thrift/BinaryProtocol.pm +%%SITE_PERL%%/Thrift/BufferedTransport.pm +%%SITE_PERL%%/Thrift/Exception.pm +%%SITE_PERL%%/Thrift/FramedTransport.pm +%%SITE_PERL%%/Thrift/HttpClient.pm +%%SITE_PERL%%/Thrift/MemoryBuffer.pm +%%SITE_PERL%%/Thrift/MessageType.pm +%%SITE_PERL%%/Thrift/MultiplexedProcessor.pm +%%SITE_PERL%%/Thrift/MultiplexedProtocol.pm +%%SITE_PERL%%/Thrift/Protocol.pm +%%SITE_PERL%%/Thrift/ProtocolDecorator.pm +%%SITE_PERL%%/Thrift/SSLServerSocket.pm +%%SITE_PERL%%/Thrift/SSLSocket.pm +%%SITE_PERL%%/Thrift/Server.pm +%%SITE_PERL%%/Thrift/ServerSocket.pm +%%SITE_PERL%%/Thrift/Socket.pm +%%SITE_PERL%%/Thrift/Transport.pm +%%SITE_PERL%%/Thrift/Type.pm +%%SITE_PERL%%/Thrift/UnixServerSocket.pm +%%SITE_PERL%%/Thrift/UnixSocket.pm diff --git a/devel/py-thrift/Makefile b/devel/py-thrift/Makefile new file mode 100644 index 00000000..082c8067 --- /dev/null +++ b/devel/py-thrift/Makefile @@ -0,0 +1,21 @@ +# Created by: Jon M. Dugan +# $FreeBSD: head/devel/py-thrift/Makefile 559531 2020-12-28 23:02:12Z antoine $ + +PORTNAME= thrift +PORTVERSION= 0.14.1 +CATEGORIES= devel python +MASTER_SITES= APACHE/thrift/${PORTVERSION} +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= komarov@valerka.net +COMMENT= Python interface to Thrift + +USES= python:3.6+ +USE_PYTHON= distutils autoplist + +WRKSRC= ${WRKDIR}/${DISTNAME}/lib/py + +post-patch: + ${REINPLACE_CMD} -e 's|setuptools|do_not_use_&|' ${WRKSRC}/${PYSETUP} + +.include diff --git a/devel/py-thrift/distinfo b/devel/py-thrift/distinfo new file mode 100644 index 00000000..bce87f6d --- /dev/null +++ b/devel/py-thrift/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622632654 +SHA256 (thrift-0.14.1.tar.gz) = 13da5e1cd9c8a3bb89778c0337cc57eb0c29b08f3090b41cf6ab78594b410ca5 +SIZE (thrift-0.14.1.tar.gz) = 4311458 diff --git a/devel/py-thrift/pkg-descr b/devel/py-thrift/pkg-descr new file mode 100644 index 00000000..5ab78b09 --- /dev/null +++ b/devel/py-thrift/pkg-descr @@ -0,0 +1,3 @@ +Python interface to Thrift. + +WWW: http://thrift.apache.org/ diff --git a/devel/thrift/Makefile b/devel/thrift/Makefile new file mode 100644 index 00000000..98f87f40 --- /dev/null +++ b/devel/thrift/Makefile @@ -0,0 +1,71 @@ +# Created by: Sergey Skvortsov +# $FreeBSD: head/devel/thrift/Makefile 567474 2021-03-06 10:01:09Z mfechner $ + +PORTNAME= thrift +PORTVERSION= 0.14.1 +CATEGORIES= devel +MASTER_SITES= APACHE/thrift/${PORTVERSION} + +MAINTAINER= komarov@valerka.net +COMMENT= Framework for scalable cross-language services development + +USES= gmake compiler:c++11-lang pkgconfig +USE_LDCONFIG= yes +GNU_CONFIGURE= yes + +# For C++ support, use devel/thrift-cpp +# For C glib support, use devel/thrift-c_glib. +# For Perl support, use devel/p5-Thrift. +# For Python support, use devel/py-thrift. +# For Ruby support, use devel/rubygem-thrift. +# For PHP support, use devel/php5-thrift. +# For nodejs support, use devel/node-thrift. +# Other languages are not yet supported, please feel free to contribute +# using one of the leaf ports as an example. + + +CONFIGURE_ARGS+= --without-qt5 +CONFIGURE_ARGS+= --without-c_glib +CONFIGURE_ARGS+= --without-java +CONFIGURE_ARGS+= --without-erlang +CONFIGURE_ARGS+= --without-nodejs +CONFIGURE_ARGS+= --without-nodets +CONFIGURE_ARGS+= --without-lua +CONFIGURE_ARGS+= --without-python +CONFIGURE_ARGS+= --without-py3 +CONFIGURE_ARGS+= --without-perl +CONFIGURE_ARGS+= --without-php +CONFIGURE_ARGS+= --without-php_extension +CONFIGURE_ARGS+= --without-dart +CONFIGURE_ARGS+= --without-ruby +CONFIGURE_ARGS+= --without-haskell +CONFIGURE_ARGS+= --without-go +CONFIGURE_ARGS+= --without-swift +CONFIGURE_ARGS+= --without-rs +CONFIGURE_ARGS+= --without-cl +CONFIGURE_ARGS+= --without-haxe +CONFIGURE_ARGS+= --without-netstd +CONFIGURE_ARGS+= --without-d + +#CMAKE_OFF+= BUILD_CPP +CMAKE_OFF+= BUILD_C_GLIB +CMAKE_OFF+= BUILD_JAVA +#CMAKE_OFF+= BUILD_JAVASCRIPT +CMAKE_OFF+= BUILD_NODEJS +#CMAKE_OFF+= BUILD_PYTHON +CMAKE_OFF+= BUILD_HASKELL + +CONFIGURE_ARGS+= --without-tests + +MAKE_ENV+= GO111MODULE=auto + +.include + +post-patch: + ${REINPLACE_CMD} 's,-Werror,,' ${WRKSRC}/compiler/cpp/Makefile.in \ + ${WRKSRC}/lib/rb/ext/extconf.rb + +#pre-configure: +# ${REINPLACE_CMD} '/config.h/d' ${WRKSRC}/lib/cpp/Makefile.am + +.include diff --git a/devel/thrift/distinfo b/devel/thrift/distinfo new file mode 100644 index 00000000..2997c9fa --- /dev/null +++ b/devel/thrift/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1622632555 +SHA256 (thrift-0.14.1.tar.gz) = 13da5e1cd9c8a3bb89778c0337cc57eb0c29b08f3090b41cf6ab78594b410ca5 +SIZE (thrift-0.14.1.tar.gz) = 4311458 diff --git a/devel/thrift/files/patch-lib__cpp__src__thrift__protocol__TBinaryProtocol.tcc b/devel/thrift/files/patch-lib__cpp__src__thrift__protocol__TBinaryProtocol.tcc new file mode 100644 index 00000000..9f150b9e --- /dev/null +++ b/devel/thrift/files/patch-lib__cpp__src__thrift__protocol__TBinaryProtocol.tcc @@ -0,0 +1,11 @@ +--- lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc.orig 2021-02-04 23:07:31 UTC ++++ lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc +@@ -25,6 +25,8 @@ + + #include + ++#include ++ + namespace apache { + namespace thrift { + namespace protocol { diff --git a/devel/thrift/files/patch-lib__cpp__src__thrift__server__TNonblockingServer.h b/devel/thrift/files/patch-lib__cpp__src__thrift__server__TNonblockingServer.h new file mode 100644 index 00000000..9dcd0865 --- /dev/null +++ b/devel/thrift/files/patch-lib__cpp__src__thrift__server__TNonblockingServer.h @@ -0,0 +1,12 @@ +--- lib/cpp/src/thrift/server/TNonblockingServer.h.orig 2021-02-04 23:07:31 UTC ++++ lib/cpp/src/thrift/server/TNonblockingServer.h +@@ -43,6 +43,9 @@ + #include + #include + ++#include ++#include ++ + namespace apache { + namespace thrift { + namespace server { diff --git a/devel/thrift/files/patch-lib_cpp_src_thrift_transport_SocketCommon.cpp b/devel/thrift/files/patch-lib_cpp_src_thrift_transport_SocketCommon.cpp new file mode 100644 index 00000000..143758d0 --- /dev/null +++ b/devel/thrift/files/patch-lib_cpp_src_thrift_transport_SocketCommon.cpp @@ -0,0 +1,14 @@ +--- lib/cpp/src/thrift/transport/SocketCommon.cpp.orig 2021-03-05 23:09:13 UTC ++++ lib/cpp/src/thrift/transport/SocketCommon.cpp +@@ -24,6 +24,11 @@ + + #ifndef _WIN32 + ++#include ++#include ++#include ++#include ++ + #include + + #ifdef HAVE_UNISTD_H diff --git a/devel/thrift/files/patch-lib_cpp_src_thrift_transport_TSocket.cpp b/devel/thrift/files/patch-lib_cpp_src_thrift_transport_TSocket.cpp new file mode 100644 index 00000000..a017cbbd --- /dev/null +++ b/devel/thrift/files/patch-lib_cpp_src_thrift_transport_TSocket.cpp @@ -0,0 +1,11 @@ +--- lib/cpp/src/thrift/transport/TSocket.cpp.orig 2021-03-05 22:48:17 UTC ++++ lib/cpp/src/thrift/transport/TSocket.cpp +@@ -460,7 +460,7 @@ void TSocket::local_open() { + #ifdef _WIN32 + error == WSANO_DATA + #else +- error == EAI_NODATA ++ error == EAI_NONAME + #endif + ) { + hints.ai_flags &= ~AI_ADDRCONFIG; diff --git a/devel/thrift/files/patch-lib_lua_src_usocket.c b/devel/thrift/files/patch-lib_lua_src_usocket.c new file mode 100644 index 00000000..4c480b57 --- /dev/null +++ b/devel/thrift/files/patch-lib_lua_src_usocket.c @@ -0,0 +1,10 @@ +--- lib/lua/src/usocket.c.orig 2018-09-24 22:09:54 UTC ++++ lib/lua/src/usocket.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include // TODO REMOVE + diff --git a/devel/thrift/files/patch-x-lib-cpp-Makefile.in b/devel/thrift/files/patch-x-lib-cpp-Makefile.in new file mode 100644 index 00000000..08c1086a --- /dev/null +++ b/devel/thrift/files/patch-x-lib-cpp-Makefile.in @@ -0,0 +1,24 @@ +--- ./lib/cpp/Makefile.in.orig 2021-02-05 01:08:14.000000000 +0200 ++++ ./lib/cpp/Makefile.in 2021-06-02 11:42:36.426786000 +0200 +@@ -661,7 +661,7 @@ + $(am__append_6) + pkgconfig_DATA = thrift.pc $(am__append_3) $(am__append_5) \ + $(am__append_7) +-libthrift_la_LDFLAGS = -release $(VERSION) ++libthrift_la_LDFLAGS = -version-info 14:0:14 + libthrift_la_LIBADD = $(BOOST_LDFLAGS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) + AM_CXXFLAGS = -Wall -Wextra -pedantic + AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(OPENSSL_INCLUDES) -I$(srcdir)/src -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS +@@ -733,9 +733,9 @@ + libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS) + libthriftz_la_CXXFLAGS = $(AM_CXXFLAGS) + libthriftqt5_la_CXXFLAGS = $(AM_CXXFLAGS) +-libthriftnb_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) +-libthriftz_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) +-libthriftqt5_la_LDFLAGS = -release $(VERSION) $(BOOST_LDFLAGS) $(QT5_LIBS) ++libthriftnb_la_LDFLAGS = -version-info 14:0:14 $(BOOST_LDFLAGS) ++libthriftz_la_LDFLAGS = -version-info 14:0:14 $(BOOST_LDFLAGS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) ++libthriftqt5_la_LDFLAGS = -version-info 14:0:14 $(BOOST_LDFLAGS) $(QT5_LIBS) + include_thriftdir = $(includedir)/thrift + include_thrift_HEADERS = \ + $(top_builddir)/config.h \ diff --git a/devel/thrift/files/patch-x-ltmain.sh b/devel/thrift/files/patch-x-ltmain.sh new file mode 100644 index 00000000..4ae138af --- /dev/null +++ b/devel/thrift/files/patch-x-ltmain.sh @@ -0,0 +1,36 @@ +--- ./ltmain.sh.orig 2021-02-05 01:08:07.000000000 +0200 ++++ ./ltmain.sh 2021-06-02 13:01:34.500819000 +0200 +@@ -8811,13 +8811,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 +@@ -8900,15 +8900,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/thrift/pkg-descr b/devel/thrift/pkg-descr new file mode 100644 index 00000000..c319cabd --- /dev/null +++ b/devel/thrift/pkg-descr @@ -0,0 +1,12 @@ +Thrift is a lightweight, language-independent software stack with an +associated code generation mechanism for RPC. Thrift provides clean +abstractions for data transport, data serialization, and application +level processing. The code generation system takes a simple definition +language as its input and generates code across programming languages +that uses the abstracted stack to build interoperable RPC clients and +servers. + +Thrift is specifically designed to support non-atomic version changes +across client and server code. + +WWW: http://thrift.apache.org/ diff --git a/devel/thrift/pkg-plist b/devel/thrift/pkg-plist new file mode 100644 index 00000000..7e2503b2 --- /dev/null +++ b/devel/thrift/pkg-plist @@ -0,0 +1,112 @@ +bin/thrift +include/thrift/async/TAsyncBufferProcessor.h +include/thrift/async/TAsyncChannel.h +include/thrift/async/TAsyncDispatchProcessor.h +include/thrift/async/TAsyncProcessor.h +include/thrift/async/TAsyncProtocolProcessor.h +include/thrift/async/TConcurrentClientSyncInfo.h +include/thrift/async/TEvhttpClientChannel.h +include/thrift/async/TEvhttpServer.h +include/thrift/concurrency/Exception.h +include/thrift/concurrency/FunctionRunner.h +include/thrift/concurrency/Monitor.h +include/thrift/concurrency/Mutex.h +include/thrift/concurrency/Thread.h +include/thrift/concurrency/ThreadFactory.h +include/thrift/concurrency/ThreadManager.h +include/thrift/concurrency/TimerManager.h +include/thrift/config.h +include/thrift/processor/PeekProcessor.h +include/thrift/processor/StatsProcessor.h +include/thrift/processor/TMultiplexedProcessor.h +include/thrift/protocol/TBase64Utils.h +include/thrift/protocol/TBinaryProtocol.h +include/thrift/protocol/TBinaryProtocol.tcc +include/thrift/protocol/TCompactProtocol.h +include/thrift/protocol/TCompactProtocol.tcc +include/thrift/protocol/TDebugProtocol.h +include/thrift/protocol/TEnum.h +include/thrift/protocol/THeaderProtocol.h +include/thrift/protocol/TJSONProtocol.h +include/thrift/protocol/TList.h +include/thrift/protocol/TMap.h +include/thrift/protocol/TMultiplexedProtocol.h +include/thrift/protocol/TProtocol.h +include/thrift/protocol/TProtocolDecorator.h +include/thrift/protocol/TProtocolException.h +include/thrift/protocol/TProtocolTap.h +include/thrift/protocol/TProtocolTypes.h +include/thrift/protocol/TSet.h +include/thrift/protocol/TVirtualProtocol.h +include/thrift/qt/TQIODeviceTransport.h +include/thrift/qt/TQTcpServer.h +include/thrift/server/TConnectedClient.h +include/thrift/server/TNonblockingServer.h +include/thrift/server/TServer.h +include/thrift/server/TServerFramework.h +include/thrift/server/TSimpleServer.h +include/thrift/server/TThreadedServer.h +include/thrift/server/TThreadPoolServer.h +include/thrift/TApplicationException.h +include/thrift/TBase.h +include/thrift/TConfiguration.h +include/thrift/TDispatchProcessor.h +include/thrift/thrift_export.h +include/thrift/thrift-config.h +include/thrift/Thrift.h +include/thrift/TLogging.h +include/thrift/TOutput.h +include/thrift/TProcessor.h +include/thrift/transport/PlatformSocket.h +include/thrift/transport/SocketCommon.h +include/thrift/transport/TBufferTransports.h +include/thrift/transport/TFDTransport.h +include/thrift/transport/TFileTransport.h +include/thrift/transport/THeaderTransport.h +include/thrift/transport/THttpClient.h +include/thrift/transport/THttpServer.h +include/thrift/transport/THttpTransport.h +include/thrift/transport/TNonblockingServerSocket.h +include/thrift/transport/TNonblockingServerTransport.h +include/thrift/transport/TNonblockingSSLServerSocket.h +include/thrift/transport/TPipe.h +include/thrift/transport/TPipeServer.h +include/thrift/transport/TServerSocket.h +include/thrift/transport/TServerTransport.h +include/thrift/transport/TShortReadTransport.h +include/thrift/transport/TSimpleFileTransport.h +include/thrift/transport/TSocket.h +include/thrift/transport/TSocketPool.h +include/thrift/transport/TSocketUtils.h +include/thrift/transport/TSSLServerSocket.h +include/thrift/transport/TSSLSocket.h +include/thrift/transport/TTransport.h +include/thrift/transport/TTransportException.h +include/thrift/transport/TTransportUtils.h +include/thrift/transport/TVirtualTransport.h +include/thrift/transport/TWebSocketServer.h +include/thrift/transport/TZlibTransport.h +include/thrift/TToString.h +lib/libthrift.a +lib/libthrift.la +lib/libthrift.so +lib/libthrift.so.14 +lib/libthriftnb.a +lib/libthriftnb.la +lib/libthriftnb.so +lib/libthriftnb.so.14 +lib/libthriftz.a +lib/libthriftz.la +lib/libthriftz.so +lib/libthriftz.so.14 +lib/pkgconfig/thrift-nb.pc +lib/pkgconfig/thrift-z.pc +lib/pkgconfig/thrift.pc +@dir include/thrift/async +@dir include/thrift/concurrency +@dir include/thrift/processor +@dir include/thrift/protocol +@dir include/thrift/qt +@dir include/thrift/server +@dir include/thrift/transport +@dir include/thrift