1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/net-p2p/libtorrent-rasterbar/Makefile
Dmitry Marakasov 2fbd203220 Update net-p2p/libtorrent-rasterbar and its slave libtorrent-rasterbar-python to 1.1.0
* USE_OPENSSL -> USES=ssl
* remove GeoIP bits as those have been removed from the library
* update LIB_DEPENDS and switch to += in the master as the slave needs the same boost libs
* remove 2 obsolete patches, regen 1 patch
* add a patch from upstream git to resolve CVE-2016-5301
* add a TEST option and a patch from upstream git to let tests compile
* simplify the install of DOCS and EXAMPLES
* remove stale portscout restriction so updates can be discovered
* update text and WWW in pkg-descr
* update pkg-plist
* cleanup the slave port's Makefile
* assume maintainership

PR:		211963
Submitted by:	matthew@reztek.cz
2016-08-19 14:22:45 +00:00

82 lines
2.2 KiB
Makefile

# Created by: Doug Barton <dougb@FreeBSD.org>
# $FreeBSD$
PORTNAME= libtorrent-rasterbar
PORTVERSION= 1.1.0
CATEGORIES?= net-p2p ipv6
MASTER_SITES= https://github.com/arvidn/libtorrent/releases/download/libtorrent-${PORTVERSION:R:S/./_/g}/
MAINTAINER= matthew@reztek.cz
COMMENT?= C++ library implementing a BitTorrent client
LICENSE= BSD3CLAUSE
LIB_DEPENDS+= libboost_chrono.so:devel/boost-libs \
libboost_random.so:devel/boost-libs \
libboost_system.so:devel/boost-libs
USES+= compiler:c++11-lang iconv:wchar_t libtool pathfix pkgconfig ssl
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
TEST_TARGET= check
CONFIGURE_ARGS= --disable-static \
--enable-dht \
--enable-encryption \
--enable-pool-allocators \
--enable-deprecated-functions \
--with-boost=${LOCALBASE} \
--with-boost-system=boost_system \
--with-libiconv \
--with-openssl=${OPENSSLBASE}
SHLIB_VER= 9
PLIST_SUB+= SHLIB_VER="${SHLIB_VER}"
DOCFILES= AUTHORS ChangeLog
PORTDOCS= ${DOCFILES} docs/*
PORTEXAMPLES= *.cpp
OPTIONS_DEFINE= DEBUG DOCS EXAMPLES TEST
TEST_DESC= Build and run tests (increases library size)
DEBUG_CONFIGURE_ENABLE= debug
TEST_CONFIGURE_ENABLE= tests
.include <bsd.port.options.mk>
.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-configure:
${FIND} ${WRKSRC} -name Makefile -o -name link_flags | \
${XARGS} ${REINPLACE_CMD} 's| *-R${LOCALBASE}/lib||'
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
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${DOCFILES:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR})
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/${PORTEXAMPLES} \
${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>