aboutsummaryrefslogtreecommitdiff
path: root/extra/ncurses/build
blob: 27fc49b101313c992eac94dbc5a16318e2a30710 (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
#!/bin/sh -e

cpt-configure \
    --enable-pc-files \
    --disable-rpath-hack \
    --with-pkg-config-libdir=/usr/lib/pkgconfig \
    --with-shared \
    --enable-widec \
    --without-ada \
    --without-tests \
    --without-debug \
    --without-cxx-binding

make
make DESTDIR="$1" install

# Force ncurses to link against wide-character ncurses library.
for lib in ncurses form panel menu; do
    rm -f "$1/usr/lib/lib${lib}.so"
    printf '%s\n' "INPUT(-l${lib}w)" > "$1/usr/lib/lib${lib}.so"
    chmod 755 "$1/usr/lib/lib${lib}.so"
    ln -sf "lib${lib}w.a" "$1/usr/lib/lib${lib}.a"
done

# Some packages look for libcurses instead of libncurses when building.
printf '%s\n' "INPUT(-lncursesw)" > "$1/usr/lib/libcursesw.so"
ln -s libncurses.so "$1/usr/lib/libcurses.so"

# Copy pkgconfig.
ln -s ncursesw.pc "$1/usr/lib/pkgconfig/ncurses.pc"