1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
3 # Contributor: Allan McRae <allan@archlinux.org>
4 # Contributor: judd <jvinet@zeroflux.org>
9 pkgdesc='System V Release 4.0 curses emulation library'
11 url='https://invisible-island.net/ncurses/ncurses.html'
13 depends=(glibc gcc-libs)
14 makedepends=(autoconf-archive)
15 optdepends=('bash: for ncursesw6-config')
16 provides=(libncurses++w.so libformw.so libmenuw.so libpanelw.so libncursesw.so)
17 replaces=(alacritty-terminfo)
20 https://invisible-mirror.net/archives/$pkgname/$pkgname-$pkgver.tar.gz{,.asc}
21 $pkgname-6.3-libs.patch
22 $pkgname-6.3-pkgconfig.patch
24 sha512sums=('5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105'
26 'adb02b838c40f1e58a1b31c26d5cd0f2a1c43f3b6d68e839981764c0f6c905a9eb51dd36ff018628fdeb20747cc7467727d57135408ab4848259384077a52b28'
27 '2d2c0ec3c880e638ab4aa3dbff5e28e4cd233153e24816bd87e077f848aa3edd5114cd0f2a7f6e8869dd1861a2746e512886c18264ff1676927dcc320c5ef958')
28 b2sums=('b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3'
30 '31bb10e82dd018a75e57252052650d9f0f5eb5e7e887118c2ea40032b11f59ec6aa4d9bae804c615cbecdf3382f3434e0c9e9e8440fdefe66a507be020b8965c'
31 'fb6cf606cf3db7f6b306272696a63bce83d52cfa91e850f9a7bdb9d3d8455a26943529a9cf79731dddc7f763c27211a9afab9c4c31dbb6d12fd720eb390eb0a3')
32 validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03') # Thomas Dickey <dickey@invisible-island.net>
35 # do not link against test libraries
36 patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-6.3-libs.patch
37 # do not leak build-time LDFLAGS into the pkgconfig files:
38 # https://bugs.archlinux.org/task/68523
39 patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-6.3-pkgconfig.patch
40 # NOTE: can't run autoreconf because the autotools setup is custom and ancient
46 ./configure --prefix=/usr \
49 --mandir=/usr/share/man \
52 --with-manpage-format=normal \
53 --with-pkg-config-libdir=/usr/lib/pkgconfig \
55 --with-versioned-syms \
56 --with-xterm-kbs=del \
62 make DESTDIR="$pkgdir" install -C $pkgname-$pkgver
63 install -vDm 644 $pkgname-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
65 # fool packages looking to link to non-wide-character ncurses libraries
66 for lib in ncurses ncurses++ form panel menu; do
67 printf "INPUT(-l%sw)\n" "${lib}" > "$pkgdir/usr/lib/lib${lib}.so"
68 ln -sv ${lib}w.pc "$pkgdir/usr/lib/pkgconfig/${lib}.pc"
71 # some packages look for -lcurses during build
72 printf 'INPUT(-lncursesw)\n' > "$pkgdir/usr/lib/libcursesw.so"
73 ln -sv libncurses.so "$pkgdir/usr/lib/libcurses.so"
75 # tic and ticinfo functionality is built in by default
76 # make sure that anything linking against it links against libncursesw.so instead
77 for lib in tic tinfo; do
78 printf "INPUT(libncursesw.so.%s)\n" "${pkgver:0:1}" > "$pkgdir/usr/lib/lib${lib}.so"
79 ln -sv libncursesw.so.${pkgver:0:1} "$pkgdir/usr/lib/lib${lib}.so.${pkgver:0:1}"
80 ln -sv ncursesw.pc "$pkgdir/usr/lib/pkgconfig/${lib}.pc"