recreate ncurses package
This commit is contained in:
1 parent
850ffa841d
commit
e57d649e1a
1 file changed
+36
-26
+36
-26
@@ -6,54 +6,64 @@ source=(https://invisible-mirror.net/archives/$name/$name-$version.tar.gz)
|
|||||||
md5sums=(a2736befde5fee7d2b7eb45eb281cdbe)
|
md5sums=(a2736befde5fee7d2b7eb45eb281cdbe)
|
||||||
depends=(glibc)
|
depends=(glibc)
|
||||||
so_ver=6
|
so_ver=6
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
unset CFLAGS
|
|
||||||
unset CXXFLAGS
|
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
./configure --prefix=/usr \
|
cp -prf ../$name-$version ../widec
|
||||||
--libdir=/lib64 \
|
opts=(--prefix=/usr
|
||||||
--without-ada \
|
--libdir=/lib64/ncurses
|
||||||
--without-tests \
|
--without-ada
|
||||||
--disable-termcap \
|
--without-tests
|
||||||
--disable-rpath-hack \
|
--disable-termcap
|
||||||
--disable-stripping \
|
--disable-rpath-hack
|
||||||
--with-pkg-config-libdir=/usr/lib64/pkgconfig \
|
--disable-stripping
|
||||||
--without-cxx-binding \
|
--with-pkg-config-libdir=/usr/lib64/pkgconfig
|
||||||
--with-terminfo-dirs="/etc/terminfo:/usr/share/terminfo:/lib/terminfo:/usr/lib/terminfo" \
|
--without-cxx-binding
|
||||||
--enable-pc-files \
|
--with-termlib
|
||||||
--with-shared \
|
--with-terminfo-dirs="/etc/terminfo:/usr/share/terminfo:/lib/terminfo:/usr/lib/terminfo"
|
||||||
--enable-widec
|
--enable-pc-files
|
||||||
|
--with-shared)
|
||||||
|
./configure ${opts[@]}
|
||||||
|
cd ../widec
|
||||||
|
./configure ${opts[@]} --enable-widec
|
||||||
}
|
}
|
||||||
|
|
||||||
build(){
|
build(){
|
||||||
|
cd ../widec
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
cd ../$name-$version
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package(){
|
package(){
|
||||||
make install
|
mkdir -p "$DESTDIR/lib64/ncurses/" "$DESTDIR/usr/lib64/pkgconfig/"
|
||||||
|
|
||||||
for lib in ncurses ncurses++ form panel menu; do
|
for lib in ncurses ncurses++ form panel menu; do
|
||||||
printf "INPUT(-l%sw)\n" "${lib}" > "$DESTDIR/lib64/lib${lib}.so"
|
printf "INPUT(-l%sw)\n" "${lib}" > "$DESTDIR/lib64/ncurses/lib${lib}.so"
|
||||||
ln -sv ${lib}w.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
ln -sv ${lib}w.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
||||||
done
|
done
|
||||||
ln -s libncurses.so.6 "$DESTDIR/lib64/libtinfo.so.${so_ver}"
|
|
||||||
|
|
||||||
# some packages look for -lcurses during build
|
# some packages look for -lcurses during build
|
||||||
printf 'INPUT(-lncursesw)\n' > "$DESTDIR/lib64/libcursesw.so"
|
printf 'INPUT(-lncursesw)\n' > "$DESTDIR/lib64/ncurses/libcursesw.so"
|
||||||
ln -sv libncurses.so "$DESTDIR/lib64/libcurses.so"
|
ln -sv libncurses.so "$DESTDIR/lib64/ncurses/libcurses.so"
|
||||||
|
|
||||||
# tic and ticinfo functionality is built in by default
|
# tic and ticinfo functionality is built in by default
|
||||||
# make sure that anything linking against it links against libncursesw.so instead
|
# make sure that anything linking against it links against libncursesw.so instead
|
||||||
for lib in tic tinfo; do
|
for lib in tic tinfo; do
|
||||||
printf "INPUT(libncursesw.so.%s)\n" "${so_ver}" > "$DESTDIR/lib64/lib${lib}.so"
|
printf "INPUT(libncursesw.so.%s)\n" "${so_ver}" > "$DESTDIR/lib64/ncurses/lib${lib}.so"
|
||||||
if ! ls $DESTDIR/lib64/lib${lib}.so.${so_ver} ; then
|
if ! ls $DESTDIR/lib64/ncurses/lib${lib}.so.${so_ver} ; then
|
||||||
ln -sv libncursesw.so.${so_ver} "$DESTDIR/lib64/lib${lib}.so.${so_ver}"
|
ln -sv libncursesw.so.${so_ver} "$DESTDIR/lib64/ncurses/lib${lib}.so.${so_ver}"
|
||||||
ln -sv ncursesw.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
ln -sv ncursesw.pc "$DESTDIR/usr/lib64/pkgconfig/${lib}.pc"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# legacy binary support
|
# legacy binary support
|
||||||
for lib in libncursesw libncurses libtinfo libpanelw libformw libmenuw ; do
|
for lib in libncursesw libncurses libtinfo libpanelw libformw libmenuw ; do
|
||||||
ln -sv ${lib}.${so_ver} "$DESTDIR"/lib64/${lib}.5
|
ln -sv ${lib}.${so_ver} "$DESTDIR"/lib64/ncurses/${lib}.so.5
|
||||||
done
|
done
|
||||||
|
cd ../widec
|
||||||
|
make -j$(nproc) install
|
||||||
|
cd ../$name-$version
|
||||||
|
make -j$(nproc) install
|
||||||
|
mkdir -p ${DESTDIR}/etc/ld.so.conf.d/
|
||||||
|
echo "/lib64/ncurses/" > ${DESTDIR}/etc/ld.so.conf.d/ncurses.conf
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user