libreadline8: use ncursesw in pkg-config and clean up
This commit is contained in:
parent
b5a8fc4a63
commit
3159484e69
3 changed files with 130 additions and 10 deletions
62
srcpkgs/libreadline8/patches/accept-ncursesw.patch
Normal file
62
srcpkgs/libreadline8/patches/accept-ncursesw.patch
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
From bde0dff47d76a874bcbb5e75a74f6db83b90da5f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Date: Thu, 5 Nov 2020 02:41:14 +0100
|
||||||
|
Subject: [PATCH] add support for using ncursesw pkg-config library
|
||||||
|
|
||||||
|
---
|
||||||
|
aclocal.m4 | 3 +++
|
||||||
|
configure | 4 ++++
|
||||||
|
configure.ac | 1 +
|
||||||
|
3 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git aclocal.m4 aclocal.m4
|
||||||
|
index 1413267..16775a9 100644
|
||||||
|
--- aclocal.m4
|
||||||
|
+++ aclocal.m4
|
||||||
|
@@ -981,6 +981,9 @@ TERMCAP_DEP=
|
||||||
|
elif test $bash_cv_termcap_lib = libncurses; then
|
||||||
|
TERMCAP_LIB=-lncurses
|
||||||
|
TERMCAP_DEP=
|
||||||
|
+elif test $bash_cv_termcap_lib = libncursesw; then
|
||||||
|
+TERMCAP_LIB=-lncursesw
|
||||||
|
+TERMCAP_DEP=
|
||||||
|
elif test $bash_cv_termcap_lib = libc; then
|
||||||
|
TERMCAP_LIB=
|
||||||
|
TERMCAP_DEP=
|
||||||
|
diff --git configure configure
|
||||||
|
index c9b7ade..7d7bce0 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -6328,6 +6328,9 @@ TERMCAP_DEP=
|
||||||
|
elif test $bash_cv_termcap_lib = libncurses; then
|
||||||
|
TERMCAP_LIB=-lncurses
|
||||||
|
TERMCAP_DEP=
|
||||||
|
+elif test $bash_cv_termcap_lib = libncursesw; then
|
||||||
|
+TERMCAP_LIB=-lncursesw
|
||||||
|
+TERMCAP_DEP=
|
||||||
|
elif test $bash_cv_termcap_lib = libc; then
|
||||||
|
TERMCAP_LIB=
|
||||||
|
TERMCAP_DEP=
|
||||||
|
@@ -6363,6 +6366,7 @@ case "$TERMCAP_LIB" in
|
||||||
|
-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;;
|
||||||
|
-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
|
||||||
|
-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
|
||||||
|
+-lncursesw) TERMCAP_PKG_CONFIG_LIB=ncursesw ;;
|
||||||
|
-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;;
|
||||||
|
*) TERMCAP_PKG_CONFIG_LIB=termcap ;;
|
||||||
|
esac
|
||||||
|
diff --git configure.ac configure.ac
|
||||||
|
index b73e37b..db788a6 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -202,6 +202,7 @@ case "$TERMCAP_LIB" in
|
||||||
|
-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;;
|
||||||
|
-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
|
||||||
|
-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;;
|
||||||
|
+-lncursesw) TERMCAP_PKG_CONFIG_LIB=ncursesw ;;
|
||||||
|
-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;;
|
||||||
|
*) TERMCAP_PKG_CONFIG_LIB=termcap ;;
|
||||||
|
esac
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
65
srcpkgs/libreadline8/patches/no-rpath-and-link.patch
Normal file
65
srcpkgs/libreadline8/patches/no-rpath-and-link.patch
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
From 78a3bfc099027df04d01012b91e707c99eaf1c8e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Date: Thu, 5 Nov 2020 02:49:21 +0100
|
||||||
|
Subject: [PATCH] drop rpath and link against the termcap library
|
||||||
|
|
||||||
|
---
|
||||||
|
configure | 8 ++++----
|
||||||
|
configure.ac | 8 ++++----
|
||||||
|
support/shobj-conf | 2 +-
|
||||||
|
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git configure configure
|
||||||
|
index 7d7bce0..eff4e76 100755
|
||||||
|
--- configure
|
||||||
|
+++ configure
|
||||||
|
@@ -6823,10 +6823,10 @@ if test -f ${srcdir}/support/shobj-conf; then
|
||||||
|
$as_echo_n "checking configuration for building shared libraries... " >&6; }
|
||||||
|
eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
|
||||||
|
|
||||||
|
-# case "$SHLIB_LIBS" in
|
||||||
|
-# *curses*|*termcap*|*termlib*) ;;
|
||||||
|
-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
|
||||||
|
-# esac
|
||||||
|
+ case "$SHLIB_LIBS" in
|
||||||
|
+ *curses*|*termcap*|*termlib*) ;;
|
||||||
|
+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
|
||||||
|
+ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
diff --git configure.ac configure.ac
|
||||||
|
index db788a6..9ac3eef 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -227,10 +227,10 @@ if test -f ${srcdir}/support/shobj-conf; then
|
||||||
|
AC_MSG_CHECKING(configuration for building shared libraries)
|
||||||
|
eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
|
||||||
|
|
||||||
|
-# case "$SHLIB_LIBS" in
|
||||||
|
-# *curses*|*termcap*|*termlib*) ;;
|
||||||
|
-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
|
||||||
|
-# esac
|
||||||
|
+ case "$SHLIB_LIBS" in
|
||||||
|
+ *curses*|*termcap*|*termlib*) ;;
|
||||||
|
+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
|
||||||
|
+ esac
|
||||||
|
|
||||||
|
AC_SUBST(SHOBJ_CC)
|
||||||
|
AC_SUBST(SHOBJ_CFLAGS)
|
||||||
|
diff --git support/shobj-conf support/shobj-conf
|
||||||
|
index 7920f1b..7ac9c9f 100644
|
||||||
|
--- support/shobj-conf
|
||||||
|
+++ support/shobj-conf
|
||||||
|
@@ -128,7 +128,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
|
||||||
|
SHOBJ_LD='${CC}'
|
||||||
|
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
|
||||||
|
|
||||||
|
- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||||
|
+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
|
||||||
|
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
|
||||||
|
;;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
|
@ -3,11 +3,11 @@ pkgname=libreadline8
|
||||||
_dist_ver=8.0
|
_dist_ver=8.0
|
||||||
_patch_ver=004
|
_patch_ver=004
|
||||||
version="${_dist_ver}.${_patch_ver}"
|
version="${_dist_ver}.${_patch_ver}"
|
||||||
revision=1
|
revision=2
|
||||||
bootstrap=yes
|
bootstrap=yes
|
||||||
wrksrc="readline-${_dist_ver}"
|
wrksrc="readline-${_dist_ver}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-curses --enable-multibyte"
|
configure_args="--with-curses --enable-multibyte bash_cv_termcap_lib=libncursesw"
|
||||||
makedepends="ncurses-devel"
|
makedepends="ncurses-devel"
|
||||||
short_desc="GNU Readline Library"
|
short_desc="GNU Readline Library"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
|
@ -34,16 +34,9 @@ post_patch() {
|
||||||
patch -s -Np0 -i ${XBPS_SRCDISTDIR}/${pkgname}-${version}/readline${_dist_ver/./}-${p}
|
patch -s -Np0 -i ${XBPS_SRCDISTDIR}/${pkgname}-${version}/readline${_dist_ver/./}-${p}
|
||||||
msg_normal " Applying patch readline${_dist_ver/./}-$p.\n"
|
msg_normal " Applying patch readline${_dist_ver/./}-$p.\n"
|
||||||
done
|
done
|
||||||
vsed -e 's|-Wl,-rpath,$(libdir) ||g' -i support/shobj-conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
post_install() {
|
||||||
make ${makejobs} LDFLAGS="-lncurses" SHLIB_LIBS="-lncurses"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
make DESTDIR=${DESTDIR} LDFLAGS="-lncurses" SHLIB_LIBS="-lncurses" install
|
|
||||||
|
|
||||||
# Examples and README, COPYING, INSTALL
|
# Examples and README, COPYING, INSTALL
|
||||||
rm -rf ${DESTDIR}/usr/share/{readline,doc}
|
rm -rf ${DESTDIR}/usr/share/{readline,doc}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue