Brad Smith writes:

> On 8/17/2020 9:51 PM, Nam Nguyen wrote:
>> Nam Nguyen writes:
>>
>>> This is a diff for an update to net/libtorrent-rasterbar 1.2.8, released
>>> on August 4, 2020.
>> This new diff applies cleanly now that rsadsowski@ updated devel/boost
>> to 1.67.0. It also uses -mt variants of boost_system-mt and
>> boost_python38-mt.
snip
>>> This diff:
>>> - is based on rsadowski@'s devel/boost 1.67.0 update, which moves from
>>> boost_python3 to boost_python38. rsadowski@ uses MODPY_VERSION here in
>>> naming WANTLIB and CONFIGURE_ARGS
>>> - updates to 1.2.8
>>> - bumps library major due to symbol deletion
>>> - adds a license marker for ConvertUTF.cpp, slated to be removed in
>>> upcoming 1.2.9
>>> - changes MASTER_SITES to properly download the new release
>>> - specifies devel/boost>=1.67.0
>>> - uses non-mt variants of both boost_system and boost_python38
>> uses mt variants of libboost_system-mt and libboost_python38-mt
>>
>>> - links to -liconv (libiconv.so.7.0) instead of libiconv.a
>>> - regens WANTLIB with boost_python38, boost_system (non-mt) and iconv

- Remove MAKE_ENV, PYTHON_CXXFLAGS and CXXFLAGS. MAKE_ENV is no
longer needed for python bindings. gnu++14 is now the default for
ports-gcc.

snip
>
> You should be able to remove the PYTHON_CXXFLAGS and CXXFLAGS lines.

This fresh diff incorporates feedback from Brad to remove MAKE_ENV,
PYTHON_CXXFLAGS and CXXFLAGS. python bindings, deluge and qbitorrent
still work. See justification in new bulletpoint above.

Also, add comments for libiconv.

rationale for originally adding these: 
https://marc.info/?l=openbsd-ports&m=152450576520425&w=2
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/libtorrent-rasterbar/Makefile.diff?r1=1.2&r2=1.3&f=h

>
> The iconv issue is regarding a bug that was fixed like 8 - 10 years ago but
> the autoconf macros included with libtorrent-rasterbar are ancient. I filed
> a bug report upstream.

Thanks. I had success in testing with autoreconf with the new macros. It
will improve things for 1.2.9.

Rafael Sadowski writes:
> OK rsadowski@

Can you review again?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    15 Aug 2020 20:31:06 -0000      1.11
+++ Makefile    19 Aug 2020 20:58:40 -0000
@@ -2,23 +2,24 @@
 
 COMMENT =              C++ library implementing a BitTorrent client
 
-MODPY_EGG_VERSION =    1.2.3
+MODPY_EGG_VERSION =    1.2.8
 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
 
 HOMEPAGE =             https://libtorrent.org/
 
 # BSD3
+# ConvertUTF.cpp (Unicode, Inc., license) will be removed in 1.2.9. see:
+# https://github.com/arvidn/libtorrent/pull/4966
 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}
@@ -35,15 +36,12 @@ CONFIGURE_STYLE =   gnu
 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}
-MAKE_ENV =             CC="${CC}" CXX="${CXX}"
-CXXFLAGS +=            -std=gnu++14
 
 .ifdef DEBUG
 CONFIGURE_ARGS +=      --enable-debug
@@ -51,6 +49,13 @@ CONFIGURE_ARGS +=    --enable-debug
 
 pre-configure:
        sed -i 's,-Os,,g' ${WRKSRC}/configure
+
+# XXX remove in 1.2.9
+# link to -liconv. autotools incorrectly prefers libiconv.a over -liconv. see:
+# https://github.com/arvidn/libtorrent/issues/4999
+post-configure:
+       find ${WRKSRC} -type f \( -name "Makefile" -o -name "link_flags" \) \
+               -exec sed -ie "s;${LOCALBASE}/lib/libiconv\.a;-liconv;g" {} +
 
 pre-test:
        ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo    6 Feb 2020 20:00:16 -0000       1.6
+++ distinfo    19 Aug 2020 20:58:40 -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.8.tar.gz) = 
BgDWsf28kHZCJtr4u+MDFMmes73GlFd2i/u7/ekkFt4=
+SIZE (libtorrent-rasterbar-1.2.8.tar.gz) = 4121254
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 -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 19 Aug 2020 20:58:40 -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
  #endif
  
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/libtorrent-rasterbar/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   6 Feb 2020 20:00:16 -0000       1.4
+++ pkg/PLIST   19 Aug 2020 20:58:40 -0000
@@ -36,6 +36,7 @@ include/libtorrent/aux_/has_block.hpp
 include/libtorrent/aux_/instantiate_connection.hpp
 include/libtorrent/aux_/io.hpp
 include/libtorrent/aux_/ip_notifier.hpp
+include/libtorrent/aux_/keepalive.hpp
 include/libtorrent/aux_/listen_socket_handle.hpp
 include/libtorrent/aux_/lsd.hpp
 include/libtorrent/aux_/merkle.hpp
@@ -254,3 +255,6 @@ lib/libtorrent-rasterbar.la
 lib/pkgconfig/libtorrent-rasterbar.pc
 @so lib/python${MODPY_VERSION}/site-packages/libtorrent.so
 
lib/python${MODPY_VERSION}/site-packages/python_libtorrent-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
+share/cmake/
+share/cmake/Modules/
+share/cmake/Modules/FindLibtorrentRasterbar.cmake

Reply via email to