View | Details | Raw Unified | Return to bug 257401
Collapse All | Expand All

(-)pichi/Makefile (-8 / +2 lines)
Lines 1-5 Link Here
1
PORTNAME=	pichi
1
PORTNAME=	pichi
2
DISTVERSION=	1.3.1
2
DISTVERSION=	1.4.0
3
CATEGORIES=	net
3
CATEGORIES=	net
4
4
5
MAINTAINER=	pichi@elude.in
5
MAINTAINER=	pichi@elude.in
Lines 24-36 Link Here
24
INSTALL_TARGET=		install/strip
24
INSTALL_TARGET=		install/strip
25
TEST_TARGET=		test
25
TEST_TARGET=		test
26
26
27
OPTIONS_DEFINE=		DEVEL STATIC TLS
27
OPTIONS_DEFINE=		DEVEL STATIC
28
OPTIONS_DEFAULT=	TLS
29
OPTIONS_SUB=		yes
28
OPTIONS_SUB=		yes
30
29
31
TLS_DESC=		Enable TLS support ( requiring OpenSSL )
32
TLS_CMAKE_BOOL=		ENABLE_TLS
33
34
STATIC_DESC=		Static linking
30
STATIC_DESC=		Static linking
35
STATIC_CMAKE_BOOL=	STATIC_LINK
31
STATIC_CMAKE_BOOL=	STATIC_LINK
36
STATIC_BUILD_DEPENDS=	boost-libs>=1.67.0:devel/boost-libs \
32
STATIC_BUILD_DEPENDS=	boost-libs>=1.67.0:devel/boost-libs \
Lines 53-64 Link Here
53
49
54
.include <bsd.port.options.mk>
50
.include <bsd.port.options.mk>
55
51
56
.if ${PORT_OPTIONS:MTLS}
57
.if ${PORT_OPTIONS:MSTATIC}
52
.if ${PORT_OPTIONS:MSTATIC}
58
USES+=		ssl:build
53
USES+=		ssl:build
59
.else
54
.else
60
USES+=		ssl
55
USES+=		ssl
61
.endif
62
.endif
56
.endif
63
57
64
post-install:
58
post-install:
(-)pichi/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1599981725
1
TIMESTAMP = 0
2
SHA256 (pichi-router-pichi-1.3.1_GH0.tar.gz) = be1dc4d501387ef3524697ac804bec3ceb235a0c323ef8901532f04b0fab5cac
2
SHA256 (pichi-router-pichi-1.4.0_GH0.tar.gz) = 9b6cfadb57f80af516fb8a7d6d1199ad1c03f1c5ba0378a223c0733b12b27482
3
SIZE (pichi-router-pichi-1.3.1_GH0.tar.gz) = 2068432
3
SIZE (pichi-router-pichi-1.4.0_GH0.tar.gz) = 2081661
(-)pichi/files/patch-cmake_Configure.cmake (-26 lines)
Lines 1-26 Link Here
1
--- cmake/Configure.cmake.orig	1970-01-01 00:00:00 UTC
2
+++ cmake/Configure.cmake
3
@@ -104,6 +104,14 @@ else ()
4
   set(DEPRECATED_RFC2818_CLASS OFF)
5
 endif ()
6
 
7
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
8
+  CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0")
9
+  # From clang 11.0.0, using std::allocator<void> triggers -Wdeprecated-declarations
10
+   set(DEPRECATED_ALLOCATOR_VOID ON)
11
+else ()
12
+  set(DEPRECATED_ALLOCATOR_VOID OFF)
13
+endif ()
14
+
15
 # TODO check_cxx_compiler_flag command always gets failed when generating for iOS
16
 if (IOS)
17
   set(DISABLE_SHORTEN_64_TO_32_WARNING ON)
18
@@ -125,6 +133,7 @@ if (BUILD_SERVER)
19
   check_function_exists("close" HAS_CLOSE)
20
 endif ()
21
 
22
-configure_file(${CMAKE_SOURCE_DIR}/include/pichi/config.hpp.in ${CMAKE_BINARY_DIR}/include/pichi/config.hpp)
23
+configure_file(${CMAKE_SOURCE_DIR}/include/pichi/config.hpp.in
24
+  ${CMAKE_BINARY_DIR}/include/pichi/config.hpp)
25
 
26
 message(STATUS "Generating config.hpp - done")
(-)pichi/files/patch-include_pichi_config.hpp.in (-63 lines)
Lines 1-63 Link Here
1
--- include/pichi/config.hpp.in.orig	1970-01-01 00:00:00 UTC
2
+++ include/pichi/config.hpp.in
3
@@ -25,7 +25,7 @@
4
 #pragma clang diagnostic ignored "-Wreturn-std-move"
5
 #include <boost/asio/ip/basic_resolver.hpp>
6
 #pragma clang diagnostic pop
7
-#endif // NO_RETURN_STD_MOVE_FOR_BOOST_ASIO && __clang__
8
+#endif  // NO_RETURN_STD_MOVE_FOR_BOOST_ASIO && __clang__
9
 
10
 #cmakedefine DISABLE_SHORTEN_64_TO_32_WARNING
11
 #if defined(DISABLE_SHORTEN_64_TO_32_WARNING) && defined(__clang__)
12
@@ -33,7 +33,7 @@
13
 #pragma clang diagnostic ignored "-Wshorten-64-to-32"
14
 #include <boost/asio/basic_socket.hpp>
15
 #pragma clang diagnostic pop
16
-#endif // NO_RETURN_STD_MOVE_FOR_BOOST_ASIO && __clang__
17
+#endif  // NO_RETURN_STD_MOVE_FOR_BOOST_ASIO && __clang__
18
 
19
 #cmakedefine DISABLE_C4702_FOR_BEAST_FIELDS
20
 #if defined(DISABLE_C4702_FOR_BEAST_FIELDS) && defined(_MSC_VER)
21
@@ -41,7 +41,7 @@
22
 #pragma warning(disable : 4702)
23
 #include <boost/beast/http/fields.hpp>
24
 #pragma warning(pop)
25
-#endif // DISABLE_C4702_FOR_BEAST_FIELDS && _MSC_VER
26
+#endif  // DISABLE_C4702_FOR_BEAST_FIELDS && _MSC_VER
27
 
28
 #ifdef __clang__
29
 #if !__has_feature(c_atomic)
30
@@ -49,18 +49,28 @@
31
 #pragma clang diagnostic ignored "-Wc11-extensions"
32
 #include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
33
 #pragma clang diagnostic pop
34
-#endif // !__has_feature(c_atomic)
35
-#endif // __clang__
36
+#endif  // !__has_feature(c_atomic)
37
+#endif  // __clang__
38
 
39
+#cmakedefine DEPRECATED_ALLOCATOR_VOID
40
+#if defined(DEPRECATED_ALLOCATOR_VOID) && defined(__clang__)
41
+#pragma clang diagnostic push
42
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
43
+#include <boost/asio/associated_allocator.hpp>
44
+#include <boost/asio/impl/executor.hpp>
45
+#include <boost/beast/core/async_base.hpp>
46
+#pragma clang diagnostic pop
47
+#endif  // DEPRECATED_ALLOCATOR_VOID && __clang__
48
+
49
 #cmakedefine CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
50
 
51
 #ifdef CMAKE_INSTALL_PREFIX
52
 #define PICHI_PREFIX CMAKE_INSTALL_PREFIX
53
-#else // CMAKE_INSTALL_PREFIX
54
+#else  // CMAKE_INSTALL_PREFIX
55
 #error "CMAKE_INSTALL_PREFIX not defined"
56
-#endif // CMAKE_INSTALL_PREFIX
57
+#endif  // CMAKE_INSTALL_PREFIX
58
 
59
 #cmakedefine ENABLE_TLS
60
 #cmakedefine BUILD_TEST
61
 
62
-#endif // PICHI_CONFIG_H
63
+#endif  // PICHI_CONFIG_H
(-)pichi/files/patch-src_api_egress__manager.cpp (-26 lines)
Lines 1-26 Link Here
1
--- src/api/egress_manager.cpp.orig	1970-01-01 00:00:00 UTC
2
+++ src/api/egress_manager.cpp
3
@@ -1,5 +1,6 @@
4
-#include <pichi/api/egress_manager.hpp>
5
 #include <pichi/config.hpp>
6
+// Include config.hpp first
7
+#include <pichi/api/egress_manager.hpp>
8
 
9
 using namespace std;
10
 
11
@@ -9,7 +10,7 @@ void EgressManager::update(string const& name, EgressV
12
 {
13
 #ifndef ENABLE_TLS
14
   assertFalse(vo.tls_.has_value() && *vo.tls_, PichiError::SEMANTIC_ERROR, "TLS not supported");
15
-#endif // ENABLE_TLS
16
+#endif  // ENABLE_TLS
17
   c_[name] = move(vo);
18
 }
19
 
20
@@ -25,4 +26,4 @@ EgressManager::ConstIterator EgressManager::end() cons
21
 
22
 EgressManager::ConstIterator EgressManager::find(string_view name) const { return c_.find(name); }
23
 
24
-} // namespace pichi::api
25
\ No newline at end of file
26
+}  // namespace pichi::api
(-)pichi/files/patch-src_api_vos.cpp (-65 lines)
Lines 1-65 Link Here
1
--- src/api/vos.cpp.orig	1970-01-01 00:00:00 UTC
2
+++ src/api/vos.cpp
3
@@ -1,3 +1,5 @@
4
+#include <pichi/config.hpp>
5
+// Include config.hpp first
6
 #include <numeric>
7
 #include <pichi/api/vos.hpp>
8
 #include <pichi/common.hpp>
9
@@ -57,7 +59,7 @@ static decltype(auto) keyFile_ = "key_file";
10
 static decltype(auto) destinations_ = "destinations";
11
 static decltype(auto) balance_ = "balance";
12
 
13
-} // namespace IngressVOKey
14
+}  // namespace IngressVOKey
15
 
16
 namespace EgressVOKey {
17
 
18
@@ -73,7 +75,7 @@ static decltype(auto) tls_ = "tls";
19
 static decltype(auto) insecure_ = "insecure";
20
 static decltype(auto) caFile_ = "ca_file";
21
 
22
-} // namespace EgressVOKey
23
+}  // namespace EgressVOKey
24
 
25
 namespace RuleVOKey {
26
 
27
@@ -84,20 +86,20 @@ static decltype(auto) pattern_ = "pattern";
28
 static decltype(auto) domain_ = "domain";
29
 static decltype(auto) country_ = "country";
30
 
31
-} // namespace RuleVOKey
32
+}  // namespace RuleVOKey
33
 
34
 namespace RouteVOKey {
35
 
36
 static decltype(auto) default_ = "default";
37
 static decltype(auto) rules_ = "rules";
38
 
39
-} // namespace RouteVOKey
40
+}  // namespace RouteVOKey
41
 
42
 namespace ErrorVOKey {
43
 
44
 static decltype(auto) message_ = "message";
45
 
46
-} // namespace ErrorVOKey
47
+}  // namespace ErrorVOKey
48
 
49
 namespace msg {
50
 
51
@@ -129,7 +131,7 @@ static auto const TOO_LONG_NAME_PASSWORD = "Name or pa
52
 static auto const MISSING_DESTINATIONS_FIELD = "Missiong destinations field"sv;
53
 static auto const MISSING_BALANCE_FIELD = "Missiong balance field"sv;
54
 
55
-} // namespace msg
56
+}  // namespace msg
57
 
58
 static DelayMode parseDelayMode(json::Value const& v)
59
 {
60
@@ -683,4 +685,4 @@ template <> RouteVO parse(json::Value const& v)
61
   return rvo;
62
 }
63
 
64
-} // namespace pichi::api
65
+}  // namespace pichi::api
(-)pichi/files/patch-src_net_spawn.cpp (-14 lines)
Lines 1-14 Link Here
1
--- src/net/spawn.cpp.orig	1970-01-01 00:00:00 UTC
2
+++ src/net/spawn.cpp
3
@@ -1,3 +1,5 @@
4
+#include <pichi/config.hpp>
5
+// Include config.hpp first
6
 #include <boost/beast/http/error.hpp>
7
 #include <iostream>
8
 #include <pichi/exception.hpp>
9
@@ -28,4 +30,4 @@ void logException(std::exception_ptr eptr) noexcept
10
 
11
 void stubHandler(std::exception_ptr, asio::yield_context) noexcept {}
12
 
13
-} // namespace pichi::net
14
+}  // namespace pichi::net
(-)pichi/pkg-plist (-12 / +28 lines)
Lines 9-43 Link Here
9
%%DEVEL%%include/pichi/api/egress_manager.hpp
9
%%DEVEL%%include/pichi/api/egress_manager.hpp
10
%%DEVEL%%include/pichi/api/ingress_holder.hpp
10
%%DEVEL%%include/pichi/api/ingress_holder.hpp
11
%%DEVEL%%include/pichi/api/ingress_manager.hpp
11
%%DEVEL%%include/pichi/api/ingress_manager.hpp
12
%%DEVEL%%include/pichi/api/iterator.hpp
13
%%DEVEL%%include/pichi/api/rest.hpp
12
%%DEVEL%%include/pichi/api/rest.hpp
14
%%DEVEL%%include/pichi/api/router.hpp
13
%%DEVEL%%include/pichi/api/router.hpp
15
%%DEVEL%%include/pichi/api/server.hpp
14
%%DEVEL%%include/pichi/api/server.hpp
16
%%DEVEL%%include/pichi/api/session.hpp
15
%%DEVEL%%include/pichi/api/session.hpp
17
%%DEVEL%%include/pichi/api/vos.hpp
16
%%DEVEL%%include/pichi/common/adapter.hpp
18
%%DEVEL%%include/pichi/asserts.hpp
17
%%DEVEL%%include/pichi/common/asserts.hpp
19
%%DEVEL%%include/pichi/buffer.hpp
18
%%DEVEL%%include/pichi/common/buffer.hpp
20
%%DEVEL%%include/pichi/common.hpp
19
%%DEVEL%%include/pichi/common/config.hpp
21
%%DEVEL%%include/pichi/config.hpp
20
%%DEVEL%%include/pichi/common/constants.hpp
21
%%DEVEL%%include/pichi/common/endpoint.hpp
22
%%DEVEL%%include/pichi/common/enumerations.hpp
23
%%DEVEL%%include/pichi/common/exception.hpp
24
%%DEVEL%%include/pichi/common/literals.hpp
25
%%DEVEL%%include/pichi/common/uri.hpp
22
%%DEVEL%%include/pichi/crypto/aead.hpp
26
%%DEVEL%%include/pichi/crypto/aead.hpp
23
%%DEVEL%%include/pichi/crypto/base64.hpp
27
%%DEVEL%%include/pichi/crypto/base64.hpp
24
%%DEVEL%%include/pichi/crypto/hash.hpp
28
%%DEVEL%%include/pichi/crypto/hash.hpp
25
%%DEVEL%%include/pichi/crypto/key.hpp
29
%%DEVEL%%include/pichi/crypto/key.hpp
26
%%DEVEL%%include/pichi/crypto/method.hpp
30
%%DEVEL%%include/pichi/crypto/method.hpp
27
%%DEVEL%%include/pichi/crypto/stream.hpp
31
%%DEVEL%%include/pichi/crypto/stream.hpp
28
%%DEVEL%%include/pichi/exception.hpp
29
%%DEVEL%%include/pichi/net/adapter.hpp
32
%%DEVEL%%include/pichi/net/adapter.hpp
30
%%DEVEL%%include/pichi/net/asio.hpp
31
%%DEVEL%%include/pichi/net/common.hpp
32
%%DEVEL%%include/pichi/net/direct.hpp
33
%%DEVEL%%include/pichi/net/direct.hpp
33
%%DEVEL%%include/pichi/net/helpers.hpp
34
%%DEVEL%%include/pichi/net/helper.hpp
34
%%DEVEL%%include/pichi/net/http.hpp
35
%%DEVEL%%include/pichi/net/http.hpp
35
%%DEVEL%%include/pichi/net/reject.hpp
36
%%DEVEL%%include/pichi/net/reject.hpp
36
%%DEVEL%%include/pichi/net/socks5.hpp
37
%%DEVEL%%include/pichi/net/socks5.hpp
37
%%DEVEL%%include/pichi/net/spawn.hpp
38
%%DEVEL%%include/pichi/net/spawn.hpp
38
%%DEVEL%%include/pichi/net/ssaead.hpp
39
%%DEVEL%%include/pichi/net/ssaead.hpp
39
%%DEVEL%%include/pichi/net/ssstream.hpp
40
%%DEVEL%%include/pichi/net/ssstream.hpp
40
%%DEVEL%%include/pichi/net/stream.hpp
41
%%DEVEL%%include/pichi/net/trojan.hpp
41
%%DEVEL%%include/pichi/net/tunnel.hpp
42
%%DEVEL%%include/pichi/net/tunnel.hpp
42
%%DEVEL%%include/pichi/uri.hpp
43
%%DEVEL%%include/pichi/stream/test.hpp
44
%%DEVEL%%include/pichi/stream/tls.hpp
45
%%DEVEL%%include/pichi/stream/traits.hpp
46
%%DEVEL%%include/pichi/stream/websocket.hpp
47
%%DEVEL%%include/pichi/vo/credential.hpp
48
%%DEVEL%%include/pichi/vo/egress.hpp
49
%%DEVEL%%include/pichi/vo/error.hpp
50
%%DEVEL%%include/pichi/vo/ingress.hpp
51
%%DEVEL%%include/pichi/vo/iterator.hpp
52
%%DEVEL%%include/pichi/vo/keys.hpp
53
%%DEVEL%%include/pichi/vo/messages.hpp
54
%%DEVEL%%include/pichi/vo/options.hpp
55
%%DEVEL%%include/pichi/vo/parse.hpp
56
%%DEVEL%%include/pichi/vo/route.hpp
57
%%DEVEL%%include/pichi/vo/rule.hpp
58
%%DEVEL%%include/pichi/vo/to_json.hpp
43
%%DEVEL%%include/pichi.h
59
%%DEVEL%%include/pichi.h

Return to bug 257401