{ "name": "libtorrent-rasterbar", "version": "2.0.15", "summary": "libtorrent (Rasterbar): the BitTorrent library qBittorrent is built on, with DHT, encryption through OpenSSL and BitTorrent v2", "category": "library", "license": "BSD-3-Clause", "homepage": "https://libtorrent.org/", "source": { "url": "https://github.com/arvidn/libtorrent/releases/download/v2.0.15/libtorrent-rasterbar-2.0.15.tar.gz", "sha256": "5e2e79129823b7ea48721164c32b5aaf83d3fd733b5502100f6705b29f27bb02" }, "watch": {"kind": "github-release", "repo": "arvidn/libtorrent", "tag_regex": "^v([0-9]+(?:\\.[0-9]+)+)$", "pin": "2.0"}, "deps": [ "boost", "openssl" ], "env_packages": [], "static": true, "nss": true, "check": "t=$(mktemp -d) && printf '#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\n#include \\nint main(int, char **v) {\\n std::ofstream(std::string(v[1]) + \"/f.bin\") << std::string(100000, '\\''x'\\'');\\n lt::file_storage fs;\\n lt::add_files(fs, std::string(v[1]) + \"/f.bin\");\\n lt::create_torrent t(fs, 16384);\\n lt::set_piece_hashes(t, v[1]);\\n std::vector buf;\\n lt::bencode(std::back_inserter(buf), t.generate());\\n lt::torrent_info ti(buf, lt::from_span);\\n lt::settings_pack p;\\n p.set_str(lt::settings_pack::listen_interfaces, \"127.0.0.1:0\");\\n p.set_bool(lt::settings_pack::enable_dht, false);\\n lt::session s(p);\\n std::cout << \"libtorrent \" << lt::version() << \": a v1+v2 torrent of \" << ti.num_pieces() << \" pieces, info hash \"\\n << ti.info_hashes().v1 << \", a session listening on port \" << s.listen_port() << std::endl;\\n return !(ti.num_pieces() == 7 && s.listen_port() > 0 && std::string(lt::version()) == \"2.0.15.0\");\\n}\\n' > \"$t/t.cc\" && ${CC%gcc}g++ -std=c++17 $CPPFLAGS $CFLAGS $($PKG_CONFIG --cflags libtorrent-rasterbar) \"$t/t.cc\" -o \"$t/t\" $LDFLAGS $($PKG_CONFIG --libs libtorrent-rasterbar openssl) -lpthread 2> \"$t/cc.log\" || { cat \"$t/cc.log\"; false; } && \"$t/t\" \"$t\"; r=$?; rm -rf -- \"${t:?}\"; exit $r" }