diff --git a/community/opendht/PKGBUILD b/community/opendht/PKGBUILD index 6d9774ad3..864e43aab 100644 --- a/community/opendht/PKGBUILD +++ b/community/opendht/PKGBUILD @@ -9,27 +9,26 @@ buildarch=28 pkgname=opendht epoch=1 -pkgver=2.3.1 +pkgver=2.3.1.r7+ga89e4d62 pkgrel=1 pkgdesc="C++14 Distributed Hash Table (DHT) implementation" arch=(x86_64) url="https://github.com/savoirfairelinux/opendht" license=(GPL3) depends=(glibc gnutls nettle readline argon2 jsoncpp libjsoncpp.so fmt http-parser openssl) -makedepends=(cmake msgpack-c msgpack-cxx asio restinio cython python-setuptools cppunit) +makedepends=(git cmake msgpack-c msgpack-cxx asio restinio cython python-setuptools cppunit) optdepends=('python: to use the Python bindings') -source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz - opendht-gcc11.patch) -sha256sums=('9a75db4f119761d6524964b27d3a49aa809a6cb08bde963edc2f338458433c78' - '4cd9ee51b3da01f00b0eb4367c48fb3a00df0840d5cf7beafaabcd149c8bd0fc') +_commit=a89e4d626eae388bfd4049faadcb5deec58fb6fc +source=(git+${url}#commit=${_commit}) +sha256sums=(SKIP) -prepare() { - # https://github.com/savoirfairelinux/opendht/pull/567 - patch -d ${pkgname}-${pkgver} -p1 < opendht-gcc11.patch +pkgver() { + cd ${pkgname} + git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./;s/-/+/' } build() { - cmake -B build -S ${pkgname}-${pkgver} \ + cmake -B build -S ${pkgname} \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ @@ -38,13 +37,14 @@ build() { -DOPENDHT_STATIC=OFF \ -DOPENDHT_SYSTEMD=ON \ -DOPENDHT_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system/ \ - -DOPENDHT_LTO=OFF \ + -DOPENDHT_LTO=ON \ -DOPENDHT_INDEX=ON \ -DOPENDHT_PYTHON=ON \ -DOPENDHT_HTTP=ON \ -DOPENDHT_PROXY_SERVER=ON \ -DOPENDHT_PROXY_CLIENT=ON \ - -DOPENDHT_PUSH_NOTIFICATIONS=ON + -DOPENDHT_PUSH_NOTIFICATIONS=ON \ + -DOPENDHT_LTO=OFF make -C build } diff --git a/community/opendht/opendht-gcc11.patch b/community/opendht/opendht-gcc11.patch deleted file mode 100644 index 85d70ee13..000000000 --- a/community/opendht/opendht-gcc11.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/tests/threadpooltester.cpp b/tests/threadpooltester.cpp -index be948f9..4a5199f 100644 ---- a/tests/threadpooltester.cpp -+++ b/tests/threadpooltester.cpp -@@ -21,6 +21,7 @@ - - #include "opendht/thread_pool.h" - #include -+#include - - namespace test { - CPPUNIT_TEST_SUITE_REGISTRATION(ThreadPoolTester);