aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/libtorrent-rasterbar/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/libtorrent-rasterbar/Makefile')
-rw-r--r--net-p2p/libtorrent-rasterbar/Makefile41
1 files changed, 26 insertions, 15 deletions
diff --git a/net-p2p/libtorrent-rasterbar/Makefile b/net-p2p/libtorrent-rasterbar/Makefile
index 8fe7ad28a044..94f3209a9fc1 100644
--- a/net-p2p/libtorrent-rasterbar/Makefile
+++ b/net-p2p/libtorrent-rasterbar/Makefile
@@ -2,10 +2,9 @@
# $FreeBSD$
PORTNAME= libtorrent-rasterbar
-DISTVERSION= 1.1.10
-PORTREVISION= 6
+DISTVERSIONPREFIX= libtorrent-
+DISTVERSION= 1_2_2
CATEGORIES= net-p2p
-MASTER_SITES= https://github.com/arvidn/libtorrent/releases/download/libtorrent-${PORTVERSION:S/./_/g}/
MAINTAINER= yuri@FreeBSD.org
COMMENT= C++ library implementing a BitTorrent client
@@ -17,31 +16,43 @@ LIB_DEPENDS= libboost_chrono.so:devel/boost-libs \
libboost_random.so:devel/boost-libs \
libboost_system.so:devel/boost-libs
-USES= cmake compiler:c++14-lang iconv:wchar_t libtool pathfix pkgconfig ssl
+USES= cmake compiler:c++14-lang iconv:wchar_t libtool pathfix pkgconfig python:2.7,test shebangfix ssl
+LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
+SHEBANG_FILES= test/socks.py test/web_server.py
+USE_GITHUB= yes
+GH_ACCOUNT= arvidn
+GH_PROJECT= libtorrent
USE_LDCONFIG= yes
-SHLIB_VER= 9
+SHLIB_VER= 10
PLIST_SUB+= SHLIB_VER="${SHLIB_VER}"
DOCFILES= AUTHORS ChangeLog
PORTDOCS= ${DOCFILES} docs/*
PORTEXAMPLES= *.cpp
-OPTIONS_DEFINE= DEBUG DOCS EXAMPLES LOGGING
-OPTIONS_DEFAULT=LOGGING
-OPTIONS_SUB= yes
-LOGGING_DESC= Enable disk stat logging and logging to disk
+OPTIONS_DEFINE= DOCS EXAMPLES LOGGING
+OPTIONS_DEFAULT= LOGGING
+OPTIONS_SUB= yes
+LOGGING_DESC= Enable logging to disk
-DEBUG_CONFIGURE_ENABLE= debug
-EXAMPLES_CONFIGURE_ENABLE= examples
-LOGGING_CONFIGURE_ENABLE= logging disk-stats
+EXAMPLES_CMAKE_BOOL= build_examples
+LOGGING_CMAKE_BOOL= logging
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local/include|${PREFIX}/include|' \
${WRKSRC}/Jamfile
+ @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \
+ ${WRKSRC}/test/setup_transfer.cpp
post-install:
- @${RM} ${STAGEDIR}${PREFIX}/include/libtorrent/tommath.h.orig ${STAGEDIR}${PREFIX}/include/libtorrent/Makefile*
+ @${RM} ${STAGEDIR}${PREFIX}/include/libtorrent/Makefile*
+ # Workaround for -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES being set in
+ # Mk/Uses/cmake.mk
+ # References: https://mariadb.atlassian.net/browse/MDEV-9388
+ # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206169
+ @${REINPLACE_CMD} 's/-l-pthread/-lpthread/' \
+ ${STAGEDIR}${PREFIX}/libdata/pkgconfig/libtorrent-rasterbar.pc
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@@ -54,9 +65,9 @@ post-install-EXAMPLES-on:
${INSTALL_DATA} ${WRKSRC}/examples/${PORTEXAMPLES} \
${STAGEDIR}${EXAMPLESDIR}
-do-test: # broken: https://github.com/arvidn/libtorrent/issues/3327
+do-test:
@cd ${BUILD_WRKSRC} && \
- ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -Dbuild_tests=ON ${CMAKE_SOURCE_PATH} && \
+ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -Dbuild_tests:BOOL=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test