blob: bc92d768e16ef7c0869859835e9c8c5f66e98883 (
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
77
|
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
_android_arch=x86
pkgname=android-${_android_arch}-ncurses
pkgver=6.5
pkgrel=1
pkgdesc='System V Release 4.0 curses emulation library (android)'
arch=('any')
url='https://invisible-island.net/ncurses/ncurses.html'
license=('MIT')
depends=('android-ndk')
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-configure')
source=("https://ftp.gnu.org/gnu/ncurses/ncurses-${pkgver}.tar.gz"
"0001-Disable-lib-symlinks.patch")
sha256sums=('136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6'
'ff16e8e4418660d7eea17caa2678d9a962f65ed15d523ce906e55d616eb89b9d')
prepare() {
cd ncurses-${pkgver/_/-}
patch -Np1 -i ../0001-Disable-lib-symlinks.patch
}
build() {
cd ncurses-${pkgver/_/-}
source android-env ${_android_arch}
android-${_android_arch}-configure \
--disable-root-access \
--disable-root-environ \
--disable-setuid-environ \
--enable-widec \
--enable-pc-files \
--with-cxx-binding \
--with-cxx-shared \
--with-pkg-config-libdir="${ANDROID_PREFIX_LIB}/pkgconfig" \
--with-shared \
--with-xterm-kbs=del \
--without-ada \
--without-extra-suffix \
--with-shlib-version=abi \
--without-manpages \
--without-progs \
--without-tests
make $MAKEFLAGS
}
package() {
cd ncurses-${pkgver/_/-}
make DESTDIR="$pkgdir" install
rm -rf "${pkgdir}/${ANDROID_PREFIX_BIN}"
rm -f "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so.*
${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so
${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
ln -sv ${lib}w.pc "$pkgdir/${ANDROID_PREFIX_LIB}/pkgconfig/${lib}.pc"
done
# some packages look for -lcurses during build
cp -p "$pkgdir/${ANDROID_PREFIX_LIB}/libncursesw.so" "$pkgdir/${ANDROID_PREFIX_LIB}/libcurses.so"
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
cp -p "$pkgdir/${ANDROID_PREFIX_LIB}/libncursesw.so" "$pkgdir/${ANDROID_PREFIX_LIB}/lib${lib}.so"
ln -sv ncursesw.pc "$pkgdir/${ANDROID_PREFIX_LIB}/pkgconfig/${lib}.pc"
done
}
|