Thursday, September 03, 2020

Re: update net/libtorrent-rasterbar 1.2.8

ping. I am looking for someone to commit with an existing OK from
rsadowski@ for the latest version. Diff is provided inline for
convenience.

Rafael Sadowski writes:
> Still OK rsadowski

Nam Nguyen writes:

> Nam Nguyen writes:
>
>> 1.2.9 was just released August 20, 2020. I'm running into some trouble
>> with 1.2.9 where deluge works but qbitorrent has a compilation
>> error. I'll send it once this is resolved.
>
> CC rsadowski@, who gave an OK for an earlier version of this diff, and
> mariani@, $MAINTAINER of qbittorrent (FYI).

>
> This is a diff for 1.2.9 that just got released August 20, 2020. The
> proposed license marker from before and the iconv hack can go away.
>
> changelog: https://github.com/arvidn/libtorrent/blob/libtorrent-1.2.9/ChangeLog
>
> This diff:
> - updates to 1.2.9
> - uses c++14 instead of clang++'s default gnu++14
> - moves to autoreconf because configure defaults to c++11 instead of the
> desired c++14
> - bumps library major due to symbol deletion
> - changes MASTER_SITES to properly download the new release
> - specifies devel/boost>=1.67.0 (from rsadowski@)
> - uses MODPY_VERSION for naming boost python bindings in WANTLIB and
> CONFIGURE_ARGS (from rsadowski@)
> - uses mt variants of libboost_system-mt and libboost_python38-mt
> - links to libiconv.so.7.0 instead of libiconv.a now that upstream
> updated m4 macros
> - regens WANTLIB with boost_python38, boost_system (non-mt) and iconv
> - Remove PYTHON_CXXFLAGS and CXXFLAGS. gnu++14 is now the default for
> ports-gcc. (from brad@)
>
> It seems like the MAKE_ENV line is needed to avoid missing symbols.
> Leave it in and still remove PYTHON_CXXFLAGS and CXXFLAGS as brad@
> suggested.[0]
>
> Moving to c++14 instead of gnu++14 is fine, as upstream confirmed[3] that
> no gnu extensions are used. gnu++14 just happens to be the default for
> clang++.
>
> The major thing is moving to autoreconf. Other options: move to cmake or
> patch every Makefile to replace c++11 with c++14.
>
> I opened a pull request[1] to try to add a --with-cxx-standard=14
> configure flag. It requires modifying ax_cxx_compile_stdcxx.m4 and
> configure.ac; qbittorrent upstream described how cmake behaves and I
> tried to emulate it, but there is no guarantee that the PR will be
> accepted.
>
> m4 scripts were updated as a result of brad's bug report. I patched
> configure.ac to use ax_cxx_compile_stdcxx.m4 instead of
> ax_cxx_compile_stdcxx_11.m4. This supports multiple c++ standards. The
> default _11.m4 now inserts -std=c++11, which causes compilation problems
> with net/qbittorrent, which requires c++14. As hinted by qBittorrent
> upstream[2], libtorrent-rasterbar and qbittorrent should both be built
> with c++14.
>
> I tested net/qbittorrent and net/deluge. Feedback and tests are welcome.
>
> [0] https://marc.info/?l=openbsd-ports&m=152450576520425&w=2
> [1] https://github.com/arvidn/libtorrent/pull/5026
> [2] https://github.com/arvidn/libtorrent/issues/5024#issuecomment-677964487
> [3] https://github.com/arvidn/libtorrent/pull/5026#issuecomment-678095156

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/Makefile,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 Makefile
--- Makefile 15 Aug 2020 20:31:06 -0000 1.11
+++ Makefile 23 Aug 2020 07:03:19 -0000
@@ -2,11 +2,10 @@

COMMENT = C++ library implementing a BitTorrent client

-MODPY_EGG_VERSION = 1.2.3
+MODPY_EGG_VERSION = 1.2.9
DISTNAME = libtorrent-rasterbar-${MODPY_EGG_VERSION}
-REVISION = 1

-SHARED_LIBS += torrent-rasterbar 2.0 # 10.0.0
+SHARED_LIBS += torrent-rasterbar 3.0 # 10.0.0

CATEGORIES = net devel

@@ -15,10 +14,10 @@ HOMEPAGE = https://libtorrent.org/
# BSD3
PERMIT_PACKAGE = Yes

-WANTLIB += boost_python${MODPY_VERSION:C/\.//g} boost_system-mt crypto m ssl
-WANTLIB += ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} boost_python${MODPY_VERSION:C/\.//g}-mt
+WANTLIB += boost_system-mt crypto iconv m ssl

-MASTER_SITES = https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MODPY_EGG_VERSION:S/./_/g}/
+MASTER_SITES = https://github.com/arvidn/libtorrent/releases/download/libtorrent-${MODPY_EGG_VERSION}/

MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
@@ -31,19 +30,22 @@ LIB_DEPENDS = converters/libiconv \
# boost
COMPILER = base-clang ports-gcc

-CONFIGURE_STYLE = gnu
+CONFIGURE_STYLE = autoreconf
+
+AUTOCONF_VERSION = 2.69
+AUTOMAKE_VERSION = 1.16
+
CONFIGURE_ARGS = --enable-python-binding \
--enable-tests \
--with-boost-system=boost_system-mt \
- --with-boost-python=boost_python${MODPY_VERSION:C/\.//g} \
+ --with-boost-python=boost_python${MODPY_VERSION:C/\.//g}-mt \
--with-libiconv
CONFIGURE_ENV += CPPFLAGS="-Wno-deprecated-declarations \
-Wno-macro-redefined \
-pthread" \
- PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -std=gnu++14" \
PYTHON=${MODPY_DEFAULT_VERSION_3}
+# python bindings setup.py need CXX
MAKE_ENV = CC="${CC}" CXX="${CXX}"
-CXXFLAGS += -std=gnu++14

.ifdef DEBUG
CONFIGURE_ARGS += --enable-debug
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/distinfo,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 distinfo
--- distinfo 6 Feb 2020 20:00:16 -0000 1.6
+++ distinfo 23 Aug 2020 07:03:19 -0000
@@ -1,2 +1,2 @@
-SHA256 (libtorrent-rasterbar-1.2.3.tar.gz) = FYL9u9BEm8/k/64sy55b8Fd0WaMrslYE4BrMuEfaGi0=
-SIZE (libtorrent-rasterbar-1.2.3.tar.gz) = 4145859
+SHA256 (libtorrent-rasterbar-1.2.9.tar.gz) = bJhiJaHC2esjxbGsBpLYMgi3IaBcloECoX7j/eAb1wk=
+SIZE (libtorrent-rasterbar-1.2.9.tar.gz) = 4128035
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 23 Aug 2020 07:03:19 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+use c++14 instead of c++11. see:
+https://github.com/arvidn/libtorrent/pull/5026
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -144,7 +144,7 @@ AS_ECHO "Checking for boost libraries:"
+
+ AX_BOOST_BASE([1.58])
+
+-AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
++AX_CXX_COMPILE_STDCXX(14, [noext], [mandatory])
+
+ AX_BOOST_SYSTEM()
+ AS_IF([test -z "$BOOST_SYSTEM_LIB"],
Index: patches/patch-include_libtorrent_config_hpp
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/patches/patch-include_libtorrent_config_hpp,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-include_libtorrent_config_hpp
--- patches/patch-include_libtorrent_config_hpp 6 Feb 2020 20:00:16 -0000 1.3
+++ patches/patch-include_libtorrent_config_hpp 23 Aug 2020 07:03:19 -0000
@@ -2,7 +2,7 @@ $OpenBSD: patch-include_libtorrent_confi
Index: include/libtorrent/config.hpp
--- include/libtorrent/config.hpp.orig
+++ include/libtorrent/config.hpp
-@@ -411,6 +411,10 @@ POSSIBILITY OF SUCH DAMAGE.
+@@ -414,6 +414,10 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_USE_UNC_PATHS 0

No comments:

Post a Comment