upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / notcurses / repos / community-x86_64 / PKGBUILD
blobf6d1eba16596047fd6903a21ff1aef365b39d4b4
1 # Maintainer: Santiago Torres-Arias <santiago -> a.o >
2 # Maintainer: Nick Black <dankamongmen@gmail.com>
4 pkgname=notcurses
5 pkgver=3.0.9
6 pkgrel=3
7 pkgdesc="Blingful TUI/character graphics library"
8 url="https://nick-black.com/dankwiki/index.php/Notcurses"
9 license=('Apache')
10 arch=('x86_64')
11 # TODO: package qrcodegen
12 depends=(
13   'gcc-libs'
14   'glibc'
16 makedepends=(
17   'cmake'
18   'doctest'
19   'ffmpeg'
20   'gpm'
21   'libdeflate'
22   'libunistring'
23   'ncurses'
24   'ninja'
25   'pandoc'
26   'python-build'
27   'python-cffi'
28   'python-installer'
29   'python-pypandoc'
30   'python-setuptools'
31   'python-wheel'
32   'readline'
33   'zlib'
35 provides=(libnotcurses++.so libnotcurses.so libnotcurses-core.so)
36 source=("https://github.com/dankamongmen/notcurses/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
37 sha256sums=('e5cc02aea82814b843cdf34dedd716e6e1e9ca440cf0f899853ca95e241bd734')
38 b2sums=('718a5a36ed17d9118690ffdce3b2233144de0b8421a37429f1a20ae735215a87be9c308876c97d8a5126238fee76e470429837c7f224e8f020c60ad6b88514bd')
40 build() {
41   local cmake_options=(
42     -B build
43     -DCMAKE_INSTALL_PREFIX=/usr
44     -DCMAKE_BUILD_TYPE=None
45     -DUSE_GPM=on
46     -DUSE_QRCODEGEN=off
47     -GNinja
48     -S $pkgname-$pkgver
49     -Wno-dev
50   )
52   cmake "${cmake_options[@]}"
53   cmake --build build
54   cd $pkgname-$pkgver/cffi
55   CFLAGS+=" -I$srcdir/$pkgname-$pkgver/include -L$srcdir/build" python -m build --wheel --no-isolation
58 check() {
59   ctest --test-dir build --output-on-failure
62 package() {
63   depends+=(
64     'ffmpeg' 'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libswscale.so'
65     'gpm' 'libgpm.so'
66     'libdeflate' 'libdeflate.so'
67     'libunistring' 'libunistring.so'
68     'ncurses' 'libncursesw.so'
69     'python-cffi'
70   )
72   DESTDIR="$pkgdir" cmake --install build
73   python -m installer --destdir="$pkgdir" $pkgname-$pkgver/cffi/dist/*.whl