blob: 01d2bc3df74785c6041bf7cb33db381ddc601800 (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# Created by: Doug Barton <dougb@FreeBSD.org>
# $FreeBSD$
PORTNAME= libtorrent-rasterbar
PORTVERSION= 1.0.9
CATEGORIES?= net-p2p ipv6
MASTER_SITES= https://github.com/arvidn/libtorrent/releases/download/libtorrent-${PORTVERSION:S/./_/g}/
MAINTAINER= ports@FreeBSD.org
COMMENT?= C++ library implementing a BitTorrent client
LICENSE= BSD3CLAUSE
LIB_DEPENDS?= libboost_date_time.so:${PORTSDIR}/devel/boost-libs \
libGeoIP.so:${PORTSDIR}/net/GeoIP
USES+= compiler:c++11-lang iconv:wchar_t libtool pathfix pkgconfig
USE_OPENSSL= yes
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --disable-static \
--enable-dht \
--enable-encryption \
--enable-pool-allocators \
--enable-deprecated-functions \
--with-boost=${LOCALBASE} \
--with-boost-system=boost_system \
--enable-geoip \
--with-libgeoip \
--with-libiconv \
--with-openssl=${OPENSSLBASE}
SHLIB_VER= 8
PLIST_SUB+= SHLIB_VER="${SHLIB_VER}"
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= AUTHORS ChangeLog
DOCSRCDIR2= ${WRKSRC}/docs
DOCSDIR2= ${DOCSDIR}/docs
DOC_FILES2= *.*
DOCSRCDIR3= ${WRKSRC}/docs/img
DOCSDIR3= ${DOCSDIR}/docs/img
DOC_FILES3= *
PORTEXAMPLES= *.cpp
OPTIONS_DEFINE= DEBUG DOCS EXAMPLES
DEBUG_CONFIGURE_ENABLE= debug
.include <bsd.port.options.mk>
# Restrict to stable (even) versions, indicated by the second component.
# With Versions 1.x not build yet net-p2p/qbittorrent
PORTSCOUT= limit:^0.16\..*
.if defined(SLAVE_PORT) && ${SLAVE_PORT:tl} == "yes" && defined(USE_PYTHON)
CONFIGURE_ARGS+= --enable-python-binding \
--with-boost-python=boost_python
.else
CONFIGURE_ARGS+= --disable-python-binding
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local/include|${PREFIX}/include|' \
${WRKSRC}/Jamfile
post-install:
.if defined(SLAVE_PORT) && ${SLAVE_PORT:tl} == "yes" && defined(USE_PYTHON)
${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/libtorrent.so
.else
${STRIP_CMD} \
${STAGEDIR}${PREFIX}/lib/libtorrent-rasterbar.so.${SHLIB_VER}
.endif
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR2}
@${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR3}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES3:S|^|${DOCSRCDIR3}/|} ${STAGEDIR}${DOCSDIR3}
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${PORTEXAMPLES:S|^|${WRKSRC}/examples/|} \
${STAGEDIR}${EXAMPLESDIR}
.endif
.include <bsd.port.mk>
|