summaryrefslogtreecommitdiff
path: root/libre/ncurses-static/PKGBUILD
blob: f11ede9f01a12d9725212a484e907667f7993d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Márcio Silva <coadde@parabola.nu>
# based of ncurses

_pkgname=ncurses
pkgname=ncurses-static
pkgver=6.0
pkgrel=4
pkgdesc='System V Release 4.0 curses emulation library (static libraries only)'
arch=('i686' 'x86_64' 'armv7h')
url='http://invisible-island.net/ncurses/ncurses.html'
license=('MIT')
depends=('gcc-libs-static' 'ncurses')
options=('staticlibs')
source=(ftp://invisible-island.net/ncurses/ncurses-${pkgver/_/-}.tar.gz{,.asc})
md5sums=('ee13d052e1ead260d7c28071f46eefb1'
         'SKIP')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB')  # Thomas Dickey

build() {
  cd $_pkgname-${pkgver/_/-}

  ./configure --prefix=/usr \
     --without-shared --with-normal --without-debug --without-ada \
     --enable-widec --enable-pc-files --with-cxx-binding --without-cxx-shared \
     --enable-ext-colors --enable-ext-mouse
  make
}

package() {
  cd $_pkgname-${pkgver/_/-}
  make DESTDIR="$pkgdir" install

  # fool packages looking to link to non-wide-character ncurses libraries
  for lib in ncurses ncurses++ form panel menu; do
    echo "INPUT(-l${lib}w)" > "$pkgdir"/usr/lib/lib${lib}.a
  done

  # some packages look for -lcurses during build
  echo "INPUT(-lncursesw)" > "$pkgdir"/usr/lib/libcursesw.a
  ln -s libncurses.a "$pkgdir"/usr/lib/libcurses.a

  # remove conflicting files
  rm -vr ${pkgdir}/usr/{bin,include,lib/{pkgconfig,terminfo},share}
}