{ "name": "libtorrent", "version": "0.16.25", "summary": "libtorrent (rakshasa): the BitTorrent library of rTorrent, not libtorrent-rasterbar", "category": "library", "license": "GPL-2.0-or-later", "homepage": "https://github.com/rakshasa/libtorrent", "source": { "url": "https://github.com/rakshasa/rtorrent/releases/download/v0.16.25/libtorrent-0.16.25.tar.gz", "sha256": "6266db1d5575d3b99846a4caad98e4c2a8aa6ad034d8b09e566d610123deb569" }, "watch": {"kind": "github-release", "repo": "rakshasa/rtorrent", "tag_regex": "^v([0-9]+\\.[0-9]+\\.[0-9]+)$"}, "deps": [ "curl", "openssl", "zlib" ], "env_packages": [], "static": true, "nss": true, "check": "t=$(mktemp -d) && test -f lib/libtorrent.a && ! ls lib/libtorrent.so* > /dev/null 2>&1 && $PKG_CONFIG --modversion libtorrent | has -x 0.16.25 && printf \"#include \\n#include \\n#include \\n#include \\nint main() { const char s[] = \\\"d3:bvsi42e4:namel1:a1:bee\\\"; torrent::Object o; torrent::object_read_bencode_c(s, s + sizeof s - 1, &o); if (o.get_key_value(\\\"bvs\\\") != 42) return 2; o.insert_key(\\\"new\\\", std::string(\\\"x\\\")); std::ostringstream w; torrent::object_write_bencode(&w, &o); std::cout << w.str() << std::endl; return w.str() != \\\"d3:bvsi42e4:namel1:a1:be3:new1:xe\\\"; }\\n\" > \"$t/t.cc\" && ${CC%gcc}g++ -std=c++17 $CPPFLAGS $CFLAGS $($PKG_CONFIG --cflags libtorrent) \"$t/t.cc\" -o \"$t/t\" $LDFLAGS $($PKG_CONFIG --static --libs libtorrent) && \"$t/t\" > \"$t/o\" && has -x 'd3:bvsi42e4:namel1:a1:be3:new1:xe' < \"$t/o\"; r=$?; rm -rf -- \"${t:?}\"; [ $r = 0 ] && echo 'libtorrent 0.16.25: a static archive; a bencoded dictionary read, a key added and written back sorted (a C++ program linked against it)'; exit $r" }