aboutsummaryrefslogtreecommitdiff
path: root/net/arataga/Makefile
blob: ad3c860503e9c6a7e3ae1ee45815fc786dcc073d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>

PORTNAME=	arataga
PORTVERSION=	0.5.1
DISTVERSIONPREFIX=	v
PORTREVISION=	1
CATEGORIES=	net
MASTER_SITES=	SF/sobjectizer/oess/oess-2:oess
DISTFILES=	oess-2.2.3-full.tar.bz2:oess

PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES=	0ec1144117ae.patch:-p2 1c78ad1dbca8.patch:-p2

MAINTAINER=	danfe@FreeBSD.org
COMMENT=	Performant SOCKS5/HTTP1.1 proxy server

LICENSE=	AGPLv3

BUILD_DEPENDS=	${LOCALBASE}/include/spdlog/spdlog.h:devel/spdlog \
		${LOCALBASE}/include/asio/ip/address.hpp:net/asio \
		${LOCALBASE}/include/args.hxx:devel/args
LIB_DEPENDS=	libso.${_SO5_LIBVER}.so:devel/sobjectizer \
		libfmt.so:devel/libfmt \
		libhttp_parser.so:www/http-parser
TEST_DEPENDS=	${LOCALBASE}/include/doctest/doctest.h:devel/doctest

USES=		compiler:c++17-lang gmake
MAKEFILE=	${FILESDIR}/makefile
MAKE_ENV=	SO5_LIBVER=${_SO5_LIBVER}
WRKSRC_SUBDIR=	${PORTNAME}

TEST_TARGET=	run_unit_tests
TEST_WRKSRC=	${WRKSRC}/../tests

USE_GITHUB=	yes
GH_ACCOUNT=	Stiffstream
GH_PROJECT=	noexcept-ctcheck:nectc restinio:rinio so5extra:so5e
GH_TAGNAME=	v.1.0.0:nectc v.0.6.13:rinio v.1.4.1:so5e

_SO5_LIBVER=	5.7.4.1

PLIST_FILES=	bin/${PORTNAME}
PORTDOCS=	*.md

OPTIONS_DEFINE=	DOCS

post-extract:
	@${LN} -s ../../noexcept-ctcheck-v.1.0.0/noexcept_ctcheck \
		../../restinio-v.0.6.13/dev/restinio \
		../../so5extra-v.1.4.1/dev/so_5_extra \
		../../oess-2.2.3/dev/cpp_util_2 \
		../../oess-2.2.3/dev/oess_2 ${WRKSRC}

post-patch:
	@${REINPLACE_CMD} -e '/^#include </s,nodejs/http_parser/,,' \
		${WRKSRC}/acl_handler/handlers/http/basics.hpp \
		${WRKSRC}/acl_handler/handlers/http/helpers.hpp
	@${REINPLACE_CMD} -e '/#include <sys\/prctl\.h>/d ; \
		/#include/s,args/,,' ${WRKSRC}/main.cpp

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/../,} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>