ncurses: change handling of PKG_CONFIG_LIBDIR
When PKG_CONFIG_LIBDIR was unset in the environment, the configure script was deducing the PKG_CONFIG_LIBDIR from the location of the pkg-config binary, which doesn't make a lot of sense, and isn't done by other autotools based packages. Patch imported from the Buildroot project: https://github.com/buildroot/buildroot/blob/master/package/ncurses/0001-fixup-pkg-config-handling.patch Also refresh patches while we're at. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
3a3424981c
commit
d36c5152ef
6 changed files with 92 additions and 9 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ncurses
|
PKG_NAME:=ncurses
|
||||||
PKG_VERSION:=5.9
|
PKG_VERSION:=5.9
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
|
@ -13,11 +13,9 @@ Subject: [PATCH] ncurses 5.9 - patch 20141206
|
||||||
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
|
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
|
||||||
(reports by Marcus Shawcroft, Maohui Lei).
|
(reports by Marcus Shawcroft, Maohui Lei).
|
||||||
|
|
||||||
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
|
|
||||||
index d8cc3c9..b91398c 100755
|
|
||||||
--- a/ncurses/base/MKlib_gen.sh
|
--- a/ncurses/base/MKlib_gen.sh
|
||||||
+++ b/ncurses/base/MKlib_gen.sh
|
+++ b/ncurses/base/MKlib_gen.sh
|
||||||
@@ -474,11 +474,22 @@ sed -n -f $ED1 \
|
@@ -437,11 +437,22 @@ sed -n -f $ED1 \
|
||||||
-e 's/gen_$//' \
|
-e 's/gen_$//' \
|
||||||
-e 's/ / /g' >>$TMP
|
-e 's/ / /g' >>$TMP
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
Change handling of PKG_CONFIG_LIBDIR
|
||||||
|
|
||||||
|
When PKG_CONFIG_LIBDIR was unset in the environment, the configure
|
||||||
|
script was deducing the PKG_CONFIG_LIBDIR from the location of the
|
||||||
|
pkg-config binary, which doesn't make a lot of sense, and isn't done
|
||||||
|
by other autotools based packages.
|
||||||
|
|
||||||
|
Also, the configure script was checking that the directory really
|
||||||
|
exists. This forced to create the directory *and* provide an absolute
|
||||||
|
path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that
|
||||||
|
at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which
|
||||||
|
means that we got two times the staging directory location.
|
||||||
|
|
||||||
|
This patch fixes both of those issues. Also, since ncurses uses a fork
|
||||||
|
of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix
|
||||||
|
the configure script in this patch.
|
||||||
|
|
||||||
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||||
|
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -3623,27 +3623,20 @@ echo $ECHO_N "checking if we should inst
|
||||||
|
|
||||||
|
# Leave this as something that can be overridden in the environment.
|
||||||
|
if test -z "$PKG_CONFIG_LIBDIR" ; then
|
||||||
|
- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
|
||||||
|
+ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
|
||||||
|
- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
|
||||||
|
|
||||||
|
-# Check whether --enable-pc-files or --disable-pc-files was given.
|
||||||
|
-if test "${enable_pc_files+set}" = set; then
|
||||||
|
- enableval="$enable_pc_files"
|
||||||
|
- enable_pc_files=$enableval
|
||||||
|
-else
|
||||||
|
- enable_pc_files=no
|
||||||
|
-fi;
|
||||||
|
- echo "$as_me:3638: result: $enable_pc_files" >&5
|
||||||
|
-echo "${ECHO_T}$enable_pc_files" >&6
|
||||||
|
+ # Check whether --enable-pc-files or --disable-pc-files was given.
|
||||||
|
+ if test "${enable_pc_files+set}" = set; then
|
||||||
|
+ enableval="$enable_pc_files"
|
||||||
|
+ enable_pc_files=$enableval
|
||||||
|
else
|
||||||
|
- echo "$as_me:3641: result: no" >&5
|
||||||
|
-echo "${ECHO_T}no" >&6
|
||||||
|
- { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
|
||||||
|
-echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
|
||||||
|
- enable_pc_files=no
|
||||||
|
- fi
|
||||||
|
+ enable_pc_files=no
|
||||||
|
+ fi;
|
||||||
|
+ echo "$as_me:3638: result: $enable_pc_files" >&5
|
||||||
|
+ echo "${ECHO_T}$enable_pc_files" >&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -174,20 +174,14 @@ if test "$PKG_CONFIG" != no ; then
|
||||||
|
|
||||||
|
# Leave this as something that can be overridden in the environment.
|
||||||
|
if test -z "$PKG_CONFIG_LIBDIR" ; then
|
||||||
|
- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
|
||||||
|
+ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
|
||||||
|
fi
|
||||||
|
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
|
||||||
|
- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
|
||||||
|
- AC_ARG_ENABLE(pc-files,
|
||||||
|
+ AC_ARG_ENABLE(pc-files,
|
||||||
|
[ --enable-pc-files generate and install .pc files for pkg-config],
|
||||||
|
[enable_pc_files=$enableval],
|
||||||
|
[enable_pc_files=no])
|
||||||
|
- AC_MSG_RESULT($enable_pc_files)
|
||||||
|
- else
|
||||||
|
- AC_MSG_RESULT(no)
|
||||||
|
- AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
|
||||||
|
- enable_pc_files=no
|
||||||
|
- fi
|
||||||
|
+ AC_MSG_RESULT($enable_pc_files)
|
||||||
|
fi
|
||||||
|
AC_SUBST(PKG_CONFIG_LIBDIR)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/ncurses/curses.priv.h
|
--- a/ncurses/curses.priv.h
|
||||||
+++ b/ncurses/curses.priv.h
|
+++ b/ncurses/curses.priv.h
|
||||||
@@ -54,6 +54,11 @@ extern "C" {
|
@@ -55,6 +55,11 @@ extern "C" {
|
||||||
|
|
||||||
#include <ncurses_cfg.h>
|
#include <ncurses_cfg.h>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
--- a/aclocal.m4
|
--- a/aclocal.m4
|
||||||
+++ b/aclocal.m4
|
+++ b/aclocal.m4
|
||||||
@@ -4298,7 +4298,7 @@ CF_EOF
|
@@ -5137,7 +5137,7 @@ CF_EOF
|
||||||
EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
|
EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
|
||||||
fi
|
fi
|
||||||
CF_SHARED_SONAME
|
CF_SHARED_SONAME
|
||||||
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
|
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
|
||||||
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,$(LDFLAGS) -lc -o $[@]'
|
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,$(LDFLAGS) -lc -o $[@]'
|
||||||
;;
|
;;
|
||||||
openbsd[[2-9]].*)
|
openbsd[[2-9]].*) #(vi
|
||||||
if test "$DFT_LWR_MODEL" = "shared" ; then
|
if test "$DFT_LWR_MODEL" = "shared" ; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/misc/terminfo.src
|
--- a/misc/terminfo.src
|
||||||
+++ b/misc/terminfo.src
|
+++ b/misc/terminfo.src
|
||||||
@@ -3707,12 +3707,11 @@ konsole-xf3x|KDE console window with key
|
@@ -3947,12 +3947,11 @@ konsole-xf3x|KDE console window with key
|
||||||
# The value for kbs reflects local customization rather than the settings used
|
# The value for kbs reflects local customization rather than the settings used
|
||||||
# for XFree86 xterm.
|
# for XFree86 xterm.
|
||||||
konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
|
konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
|
||||||
|
|
Loading…
Reference in a new issue