aboutsummaryrefslogtreecommitdiffstats
path: root/net/shadowsocks-libev/Makefile
blob: a1d0e95844f4a60e7224d8bb6e2de672dd8ccda1 (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
# Created by: Xiaoding Liu <xiaoding+freebsd@xiaoding.org>
# $FreeBSD$

PORTNAME=   shadowsocks-libev
PORTVERSION=    1.6.4
DISTVERSIONPREFIX=  v
CATEGORIES= net

MAINTAINER= xiaoding+freebsd@xiaoding.org
COMMENT=    Lightweight tunnel proxy which can help you get through firewalls

LICENSE=    GPLv3

# fetch from github repo
USE_GITHUB= yes
GH_ACCOUNT= madeye

GNU_CONFIGURE=  yes
USES=       gmake libtool:keepla ssl
CPPFLAGS+=  -I${OPENSSLINC}
CONFIGURE_ARGS+=    --with-openssl=${OPENSSLBASE}

# Help solve building error since the integrated libsodium enables this option.
CFLAGS+=    -fstack-protector

USE_RC_SUBR=    shadowsocks_libev

post-patch:
    ${REINPLACE_CMD} -e 's|^pkgconfiglibdir.*|pkgconfiglibdir = ${PREFIX}/libdata/pkgconfig|g' \
        ${WRKSRC}/Makefile.in
    ${REINPLACE_CMD} -e 's|^#ifdef TCP_FASTOPEN|#if defined(TCP_FASTOPEN) \&\& defined(__linux)|' \
        ${WRKSRC}/src/local.c ${WRKSRC}/src/server.c

post-install:
    ${MKDIR} ${STAGEDIR}${ETCDIR}
    ${CP} ${WRKSRC}/debian/config.json  ${STAGEDIR}${ETCDIR}/config.json.sample

.include <bsd.port.mk>