# Maintainer: Baptiste Jonglez # Maintainer: Bruno Pagani # ALARM: Kevin Mihelich # - set -DOPENDHT_LTO=OFF # - explicitly link v5/v6 with libatomic pkgname=opendht epoch=1 pkgver=2.1.10 pkgrel=2 pkgdesc="C++14 Distributed Hash Table (DHT) implementation" arch=(x86_64) url="https://github.com/savoirfairelinux/opendht" license=(GPL3) depends=(openssl gnutls nettle argon2 readline fmt http-parser jsoncpp libjsoncpp.so) makedepends=(msgpack-c cmake cython python-setuptools cppunit restinio) optdepends=('python: to use the Python bindings') source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz opendht-gcc11.patch) sha256sums=('917e5f691199349d6884a68c26645840914c18e72b2e21d97817618ddc55fb81' '4cd9ee51b3da01f00b0eb4367c48fb3a00df0840d5cf7beafaabcd149c8bd0fc') prepare() { patch -d $pkgname-$pkgver -p1 < opendht-gcc11.patch # Fix build with GCC 11 } build() { [[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(opendht PRIVATE atomic)" >> ${pkgname}-${pkgver}/CMakeLists.txt cmake -B build -S ${pkgname}-${pkgver} \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DOPENDHT_TESTS=ON \ -DOPENDHT_DOCUMENTATION=OFF \ -DOPENDHT_STATIC=OFF \ -DOPENDHT_SYSTEMD=ON \ -DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system/ \ -DOPENDHT_LTO=OFF \ -DOPENDHT_TOOLS=ON \ -DOPENDHT_INDEX=ON \ -DOPENDHT_PYTHON=ON \ -DOPENDHT_HTTP=ON \ -DOPENDHT_PROXY_SERVER=ON \ -DOPENDHT_PROXY_CLIENT=ON \ -DOPENDHT_PUSH_NOTIFICATIONS=ON make -C build } #check() { # make -C build test #} package() { make -C build DESTDIR="${pkgdir}" install }