85 lines
2.5 KiB
Bash
85 lines
2.5 KiB
Bash
#!/bin/bash
|
|
name='ncurses'
|
|
release='2'
|
|
version='6.4'
|
|
url='https://invisible-island.net/ncurses/ncurses.html'
|
|
description="System V Release 4.0 curses emulation library"
|
|
email='parduscix@yandex.ru'
|
|
maintainer='sulincix'
|
|
license=('MIT')
|
|
arch=(x86_64)
|
|
source=("https://invisible-mirror.net/archives/$name/$name-$version.tar.gz")
|
|
md5sums=('5a62487b5d4ac6b132fe2bf9f8fad29b')
|
|
depends=()
|
|
so_ver=6
|
|
group=(sys.libs)
|
|
|
|
cd $name-$version
|
|
|
|
setup(){
|
|
cp -prf ../$name-$version ../widec
|
|
opts=(--prefix=/usr
|
|
--libdir=/lib64
|
|
--enable-pc-files
|
|
--mandir=/usr/share/man
|
|
--with-manpage-format=normal
|
|
--with-shared
|
|
--with-xterm-kbs=del
|
|
--without-ada
|
|
--with-pkg-config-libdir=/usr/lib64/pkgconfig
|
|
)
|
|
./configure ${opts[@]}
|
|
cd ../widec
|
|
./configure ${opts[@]} --enable-widec \
|
|
--with-cxx-binding \
|
|
--with-cxx-shared
|
|
}
|
|
|
|
build(){
|
|
cd ../widec
|
|
make $jobs
|
|
cd ../$name-$version
|
|
make $jobs
|
|
|
|
}
|
|
|
|
package(){
|
|
cd ../widec
|
|
make $jobs install
|
|
cd ../$name-$version
|
|
make $jobs install
|
|
|
|
mkdir -p "$DESTDIR/lib64/" "$DESTDIR/usr/lib64/pkgconfig/"
|
|
for lib in ncurses ncurses++ form panel menu; do
|
|
if ! ls "$DESTDIR/lib64/lib${lib}.so" ; then
|
|
printf "INPUT(-l%sw)\n" "${lib}" > "$DESTDIR/lib64/lib${lib}.so"
|
|
fi
|
|
if ! ls "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc" ; then
|
|
ln -sv ${lib}w.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
|
fi
|
|
done
|
|
# some packages look for -lcurses during build
|
|
printf 'INPUT(-lncursesw)\n' > "$DESTDIR/lib64/libcursesw.so"
|
|
if ! ls "$DESTDIR"/lib64/libcurses.so ; then
|
|
ln -sv libncurses.so "$DESTDIR/lib64/libcurses.so"
|
|
fi
|
|
|
|
# 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 tinfow ticw; do
|
|
if ! ls "$DESTDIR/lib64/lib${lib}.so" ; then
|
|
printf "INPUT(libncursesw.so.%s)\n" "${so_ver}" > "$DESTDIR/lib64/lib${lib}.so"
|
|
if ! ls $DESTDIR/lib64/lib${lib}.so.${so_ver} ; then
|
|
ln -sv libncursesw.so.${so_ver} "$DESTDIR/lib64/lib${lib}.so.${so_ver}"
|
|
fi
|
|
fi
|
|
if ! ls "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc" ; then
|
|
ln -sv ncursesw.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
|
fi
|
|
done
|
|
# legacy binary support
|
|
for lib in libncursesw libncurses libtinfo libpanelw libformw libmenuw ; do
|
|
ln -sv ${lib}.so.${so_ver} "$DESTDIR"/lib64/${lib}.so.5
|
|
done
|
|
}
|