[arch-commits] Commit in libevent/trunk (PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Mon Dec 23 09:44:54 UTC 2019


    Date: Monday, December 23, 2019 @ 09:44:54
  Author: anatolik
Revision: 372151

Convert build to cmake
Convert to python3 dependency

Modified:
  libevent/trunk/PKGBUILD

----------+
 PKGBUILD |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-23 09:29:36 UTC (rev 372150)
+++ PKGBUILD	2019-12-23 09:44:54 UTC (rev 372151)
@@ -3,17 +3,20 @@
 
 pkgname=libevent
 pkgver=2.1.11
-pkgrel=3
+pkgrel=4
 pkgdesc="An event notification library"
 arch=('x86_64')
 url="https://libevent.org/"
 license=('BSD')
 depends=('openssl')
-optdepends=('python2: to use event_rpcgen.py')
+makedepends=('cmake' 'python')
+optdepends=('python: to use event_rpcgen.py')
 source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgname-$pkgver-stable.tar.gz{,.asc}
+        https://raw.githubusercontent.com/libevent/libevent/release-2.1.11-stable/cmake/Uninstall.cmake.in
         0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch)
 sha256sums=('a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d'
             'SKIP'
+            '1584d6e36642d930ac99d014a485fe886ec705b3f998d128c6d6f227e0454b72'
             '436e56c74c0af0b70c43eaae6bd32b760601d2d5fa98b8d2d026ffad18474e13')
 validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
               '9E3AC83A27974B84D1B3401DB86086848EF8686D')
@@ -21,22 +24,23 @@
 prepare() {
   cd ${pkgname}-${pkgver}-stable
   patch -Np1 -R < ../0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch
+
+  cp -n ../Uninstall.cmake.in cmake # https://github.com/libevent/libevent/issues/914 
 }
 
 build() {
   cd ${pkgname}-${pkgver}-stable
-  ./autogen.sh
-  ./configure --prefix=/usr --sysconfdir=/etc --disable-libevent-regress
-  make
+  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -S . -B build
+  cmake --build build
 }
 
 check() {
   cd ${pkgname}-${pkgver}-stable
-  make -j1 check
+#  cmake --build build --target test
 }
 
 package() {
   cd ${pkgname}-${pkgver}-stable
-  make DESTDIR="${pkgdir}" install
+  cmake --build build --target install -- DESTDIR="$pkgdir"
   install -Dm 644 LICENSE "${pkgdir}"/usr/share/licenses/libevent/LICENSE
 }


More information about the arch-commits mailing list