Nam Nguyen writes:
>> On Sun, Dec 29, 2019 at 07:57:46PM -0800, Nam Nguyen wrote:
>>> Python 2 is used because python 3 is currently problematic, as
>>> reported by FreeBSD. https://github.com/arvidn/libtorrent/issues/4204
> Here is a new diff updating libtorrent-rasterbar to 1.2.3 incorporating
> feedback from kn@ that:
> * Uses fix for devel/boost python 3 bindings
> https://marc.info/?l=openbsd-ports&m=157941202507663&w=2
> * Stays with current build system and not cmake
> * Runs unit tests
> * SHARED_LIBS comment # 10.0.0. From `set (SOVERSION "10")' in
> CMakeLists.txt.
Here is a new diff that:
* Removes patch-bindings_python_setup_py
I thought it was necessary because of that github issue, but deluge and
libtorrent-rasterbar still work without this patch.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 12 Jul 2019 20:48:31 -0000 1.8
+++ Makefile 1 Feb 2020 22:12:52 -0000
@@ -2,10 +2,10 @@
COMMENT = C++ library implementing a BitTorrent client
-MODPY_EGG_VERSION = 1.1.13
+MODPY_EGG_VERSION = 1.2.3
DISTNAME = libtorrent-rasterbar-${MODPY_EGG_VERSION}
-SHARED_LIBS += torrent-rasterbar 1.0 # 9.0.0
+SHARED_LIBS += torrent-rasterbar 2.0 # 10.0.0
CATEGORIES = net devel
@@ -14,13 +14,13 @@ HOMEPAGE = https://libtorrent.org/
# BSD3
PERMIT_PACKAGE = Yes
-WANTLIB += boost_chrono-mt boost_python boost_random-mt boost_system-mt
-WANTLIB += crypto m ssl
+WANTLIB += boost_python3 boost_system-mt crypto m ssl
WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB}
MASTER_SITES = https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MODPY_EGG_VERSION:S/./_/g}/
MODULES = lang/python
+MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
BUILD_DEPENDS = devel/libtool
@@ -32,12 +32,15 @@ COMPILER = base-clang ports-gcc
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS = --enable-python-binding \
+ --enable-tests \
--with-boost-system=boost_system-mt \
+ --with-boost-python=boost_python3 \
--with-libiconv
CONFIGURE_ENV += CPPFLAGS="-Wno-deprecated-declarations \
-Wno-macro-redefined \
-pthread" \
- PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -std=gnu++14"
+ PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -std=gnu++14" \
+ PYTHON=${MODPY_DEFAULT_VERSION_3}
MAKE_ENV = CC="${CC}" CXX="${CXX}"
CXXFLAGS += -std=gnu++14
@@ -47,5 +50,8 @@ CONFIGURE_ARGS += --enable-debug
pre-configure:
sed -i 's,-Os,,g' ${WRKSRC}/configure
+
+pre-test:
+ ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 30 Apr 2019 16:45:26 -0000 1.5
+++ distinfo 1 Feb 2020 22:12:52 -0000
@@ -1,2 +1,2 @@
-SHA256 (libtorrent-rasterbar-1.1.13.tar.gz) = MAQHGYWOPAZjR2TgwXeHOOtC7NC0XoFK+nRjKalI6tc=
-SIZE (libtorrent-rasterbar-1.1.13.tar.gz) = 3896007
+SHA256 (libtorrent-rasterbar-1.2.3.tar.gz) = FYL9u9BEm8/k/64sy55b8Fd0WaMrslYE4BrMuEfaGi0=
+SIZE (libtorrent-rasterbar-1.2.3.tar.gz) = 4145859
Index: patches/patch-include_libtorrent_buffer_hpp
===================================================================
RCS file: patches/patch-include_libtorrent_buffer_hpp
diff -N patches/patch-include_libtorrent_buffer_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_libtorrent_buffer_hpp 1 Feb 2020 22:12:52 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+malloc_usable_size and malloc_size are unavailable
+
+Index: include/libtorrent/buffer.hpp
+--- include/libtorrent/buffer.hpp.orig
++++ include/libtorrent/buffer.hpp
+@@ -50,7 +50,7 @@ POSSIBILITY OF SUCH DAMAGE.
+ #elif defined __FreeBSD__
+ #include <malloc_np.h>
+ #elif defined TORRENT_BSD
+-#include <malloc/malloc.h>
++#include <sys/malloc.h>
+
No comments:
Post a Comment