blob: 745decb36bc7ac3a729687f55ac45d8b22f0b6ba (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
pkgname=ncurses-git
pkgver=5.9.r174.g16e3e58
pkgrel=1
pkgdesc='Unofficial git mirror of snapshots from ftp://invisible-island.net/ncurses/current/'
url='http://ncurses.scripts.mit.edu/?p=ncurses.git'
arch=('i686' 'x86_64')
license=('MIT')
makedepends=('git')
provides=('ncurses')
conflicts=('ncurses')
source=('git://ncurses.scripts.mit.edu/ncurses.git')
md5sums=('SKIP')
pkgver() {
cd ncurses
git describe --tags | sed 's/^v//; s/-/.r/; s/-/./'
}
build() {
mkdir ncurses{,w}-build
cd ncursesw-build
# add --enable-ext-colors and --enable-ext-mouse with next soname bump
../ncurses/configure \
--prefix=/usr \
--with-shared \
--with-normal \
--without-ada \
--enable-widec \
--without-debug \
--enable-pc-files
make
# libraries for external binary support
cd "$srcdir"/ncurses-build
[[ $CARCH = "x86_64" ]] && CONFIGFLAG="--with-chtype=long"
../ncurses/configure --prefix=/usr \
--with-shared \
--with-normal \
--without-ada \
--without-debug \
$CONFIGFLAG
make
}
package() {
cd ncursesw-build
make DESTDIR="$pkgdir" install
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses form panel menu; do
printf 'INPUT(-l%sw)\n' "$lib" > "$pkgdir"/usr/lib/lib"$lib".so
done
for lib in ncurses ncurses++ form panel menu; do
ln -s "$lib"w.pc "$pkgdir"/usr/lib/pkgconfig/"$lib".pc
done
# some packages look for -lcurses during build
printf 'INPUT(-lncursesw)\n' > "$pkgdir"/usr/lib/libcursesw.so
ln -s libncurses.so "$pkgdir"/usr/lib/libcurses.so
# non-widec compatibility libraries
cd "$srcdir"/ncurses-build
for lib in ncurses form panel menu; do
install -Dm755 lib/lib"$lib".so.5.9 "$pkgdir"/usr/lib/lib"$lib".so.5.9
ln -s lib"$lib".so.5.9 "$pkgdir"/usr/lib/lib"$lib".so.5
done
install -Dm755 "$srcdir"/ncurses/COPYING "$pkgdir"/usr/share/licenses/ncurses/COPYING
}
|