pkgname: libtorrent-rasterbar pkgver: '2.1.2' pkgrel: '1' pkgdesc: 'BitTorrent client library (Rasterbar libtorrent, used by qBittorrent)' url: 'https://libtorrent.org' arch: x86_64 license: - BSD-3-Clause depends: - boost - openssl makedepends: - cmake - ninja - boost - openssl - python source: - 'https://github.com/arvidn/libtorrent/releases/download/v${pkgver}/libtorrent-rasterbar-${pkgver}.tar.gz' sha256sums: - 3362546d9cd71b9e49ee6cac7d3f1f914ce9cdb217c86b63d5b22cbed0334dbc build: | cd libtorrent-rasterbar-${pkgver} # OpenSSL 3: ASN1_STRING i X509_NAME sa opaque/const -> uzyj akcesorow # (jak upstream RC_2_0). Bez tego src/torrent.cpp sie nie kompiluje. sed -i \ -e 's/domain->type/ASN1_STRING_type(domain)/g' \ -e 's/domain->data/ASN1_STRING_get0_data(domain)/g' \ -e 's/domain->length/ASN1_STRING_length(domain)/g' \ -e 's/common_name->data/ASN1_STRING_get0_data(common_name)/g' \ -e 's/common_name->length/ASN1_STRING_length(common_name)/g' \ -e 's/X509_NAME\* name = X509_get_subject_name(cert);/X509_NAME const* name = X509_get_subject_name(cert);/' \ -e 's/X509_NAME_ENTRY\* name_entry = X509_NAME_get_entry(name, i);/X509_NAME_ENTRY const* name_entry = X509_NAME_get_entry(name, i);/' \ -e 's/ASN1_STRING\* common_name = nullptr;/ASN1_STRING const* common_name = nullptr;/' \ src/torrent.cpp cmake -S . -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -Dpython-bindings=OFF \ -Dbuild_tests=OFF \ -Dbuild_examples=OFF \ -Dbuild_tools=OFF ninja -C build package: | cd libtorrent-rasterbar-${pkgver} DESTDIR=${PKGDIR} ninja -C build install