|
root / base / ncurses / build.sh
build.sh Bash 44 lines 1.0 KB
 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
#!/bin/zsh
set -e
cd "$SRCDIR"

./configure \
    --prefix=$PREFIX \
    --build=$BUILD_TRIPLE \
    --host=$BUILD_TRIPLE \
    --with-shared \
    --with-cxx-shared \
    --without-debug \
    --without-ada \
    --enable-widec \
    --enable-pc-files \
    --with-pkg-config-libdir=$PREFIX/lib/pkgconfig \
    --with-termlib \
    --with-ticlib

gmake -j${JOBS:-1}
gmake install DESTDIR="$PKGDIR"

# Create non-wide symlinks (libncurses.so -> libncursesw.so etc.)
# Many programs look for -lncurses not -lncursesw
cd "$PKGDIR$PREFIX/lib"
for lib in ncurses form panel menu tinfo tic; do
    if [ -f "lib${lib}w.so" ]; then
        ln -sf "lib${lib}w.so" "lib${lib}.so"
    fi
    # Also link the .a files
    if [ -f "lib${lib}w.a" ]; then
        ln -sf "lib${lib}w.a" "lib${lib}.a"
    fi
done

# Symlink ncursesw headers as ncurses headers
cd "$PKGDIR$PREFIX/include"
if [ -d ncursesw ]; then
    ln -sf ncursesw ncurses
    # Also link headers directly for programs that use -I$PREFIX/include
    for h in ncursesw/*.h; do
        ln -sf "$h" .
    done
fi