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
Perhaps some other issue, I don't quite recall, but broken Python 3
support is what halted my efforts earlier this year trying to update it.

For now, I wasted enough time on this and have no plans to give it
another before upstream fully supports Python 3, sorry.

> Testing
> =======
> Feedback and tests are welcome because this is a major update. I tested
> it by downloading and seeding a linux ISO. I did not get to test a thin
> client / server setup for example.
qbittorrent is another consumer, did you test this as well?

Port-wise looks good so far, but as per above I haven't tested any of
it;  a few comments/nits inline.

> -SHARED_LIBS +=       torrent-rasterbar 1.0   # 9.0.0
> +SHARED_LIBS +=       torrent-rasterbar 2.0   # 9.0.0
I think upstream's version got bumped to 10.0.0 or so, did you check?

> -MODULES =            lang/python
> +MODULES =            devel/cmake \
> +                     lang/python
> +
> +MODPY_SETUPTOOLS =   Yes
Perhaps leave a comment about Python 3 being broken?

> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-include_libtorrent_buffer_hpp       30 Dec 2019 02:32:22 
> -0000
> @@ -0,0 +1,23 @@
> +$OpenBSD$
Please add a brief comment such that it appears in `make patch' output.

> Index: patches/patch-include_libtorrent_config_hpp
> ===================================================================
> RCS file: 
> /cvs/ports/net/libtorrent-rasterbar/patches/patch-include_libtorrent_config_hpp,v
> retrieving revision 1.2
> diff -u -p -r1.2 patch-include_libtorrent_config_hpp
> --- patches/patch-include_libtorrent_config_hpp       30 Apr 2019 16:45:26 
> -0000      1.2
> +++ patches/patch-include_libtorrent_config_hpp       30 Dec 2019 02:32:22 
> -0000
> @@ -2,7 +2,7 @@ $OpenBSD: patch-include_libtorrent_confi
>  Index: include/libtorrent/config.hpp
>  --- include/libtorrent/config.hpp.orig
>  +++ include/libtorrent/config.hpp
> -@@ -562,6 +562,10 @@ int snprintf(char* buf, int len, char const* fmt, ...)
> +@@ -411,6 +411,10 @@ POSSIBILITY OF SUCH DAMAGE.
>   #define TORRENT_USE_UNC_PATHS 0
>   #endif
>   
> Index: patches/patch-test_CMakeLists_txt
> ===================================================================
> RCS file: patches/patch-test_CMakeLists_txt
> diff -N patches/patch-test_CMakeLists_txt
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-test_CMakeLists_txt 30 Dec 2019 02:32:22 -0000
> @@ -0,0 +1,21 @@
> +$OpenBSD$
> +
> +link to -liconv for tests
> +
> +Index: test/CMakeLists.txt
> +--- test/CMakeLists.txt.orig
> ++++ test/CMakeLists.txt
> +@@ -23,10 +23,13 @@ if (MSVC)
> +     target_compile_options(test_common PUBLIC /wd4127 /wd4309 /wd4310 )
> + endif()
> + 
> ++find_library(ICONV_LIB iconv)
> ++
> + foreach(TARGET_SRC ${tests})
> +     get_filename_component(TARGET ${TARGET_SRC} NAME_WE)
> +     add_executable(${TARGET} ${TARGET_SRC})
> +     target_link_libraries(${TARGET} test_common)
> ++    target_link_libraries(${TARGET} "${ICONV_LIB}")
> +     add_test(${TARGET} ${TARGET})
> + endforeach()
> + 
> Index: patches/patch-test_http_py
> ===================================================================
> RCS file: patches/patch-test_http_py
> diff -N patches/patch-test_http_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-test_http_py        30 Dec 2019 02:32:22 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +Needed for test_web_seed_http and test_web_seed_http_pw to pass. socket has
> +soc.settimeout(None) by default.
> +
> +https://docs.python.org/3/library/socket.html#socket-timeouts
> +
> +Index: test/http.py
> +--- test/http.py.orig
> ++++ test/http.py
> +@@ -217,7 +217,6 @@ def start_server(host='localhost', port=8080, IPv6=Fal
> +     else:
> +         soc_type = socket.AF_INET
> +     soc = socket.socket(soc_type)
> +-    soc.settimeout(120)
> +     print("PROXY - Serving on %s:%d." % (host, port))  # debug
> +     print('python version: %s' % sys.version_info.__str__())
> +     soc.bind((host, port))
> Index: patches/patch-test_setup_transfer_cpp
> ===================================================================
> RCS file: patches/patch-test_setup_transfer_cpp
> diff -N patches/patch-test_setup_transfer_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-test_setup_transfer_cpp     30 Dec 2019 02:32:22 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
Same here.

> +Index: test/setup_transfer.cpp
> +--- test/setup_transfer.cpp.orig
> ++++ test/setup_transfer.cpp
> +@@ -604,7 +604,7 @@ std::string get_python()
> +             if (sz == buf.size() - 1) return buf.data();
> +     }
> + #endif
> +-    return "python";
> ++    return "${MODPY_BIN}";
Perhaps you can replace the entire patch and SUBST_CMD with below?

        pre-test:
                ln -s ${MODPY_BIN} ${WRKDIR}/python

Reply via email to