diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-08-08 17:14:41 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-08-15 13:34:17 +0200 |
commit | d36c5152ef30b6182d1c661ffb538e9e974e1a03 (patch) | |
tree | 9de5d54b7578b34e6d6ee0cf4cb6196546a7bebd /package | |
parent | 3a3424981c27e3c3ca35e076bcc0f399f86649c3 (diff) | |
download | upstream-d36c5152ef30b6182d1c661ffb538e9e974e1a03.tar.gz upstream-d36c5152ef30b6182d1c661ffb538e9e974e1a03.tar.bz2 upstream-d36c5152ef30b6182d1c661ffb538e9e974e1a03.zip |
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>
Diffstat (limited to 'package')
6 files changed, 92 insertions, 9 deletions
diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 2eee88fd33..3d869ea18a 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ncurses PKG_VERSION:=5.9 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch b/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch index 2448229b88..5e33492bf5 100644 --- a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch +++ b/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch @@ -13,11 +13,9 @@ Subject: [PATCH] ncurses 5.9 - patch 20141206 https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html (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 +++ 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/ / /g' >>$TMP diff --git a/package/libs/ncurses/patches/103-fixup-pkg-config-handling.patch b/package/libs/ncurses/patches/103-fixup-pkg-config-handling.patch new file mode 100644 index 0000000000..85b2296ce4 --- /dev/null +++ b/package/libs/ncurses/patches/103-fixup-pkg-config-handling.patch @@ -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) + diff --git a/package/libs/ncurses/patches/200-fix_missing_include.patch b/package/libs/ncurses/patches/200-fix_missing_include.patch index c5d48d4ddc..4616c4fb70 100644 --- a/package/libs/ncurses/patches/200-fix_missing_include.patch +++ b/package/libs/ncurses/patches/200-fix_missing_include.patch @@ -1,6 +1,6 @@ --- a/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> diff --git a/package/libs/ncurses/patches/500-cross.patch b/package/libs/ncurses/patches/500-cross.patch index ace6252fe6..976a3cba2a 100644 --- a/package/libs/ncurses/patches/500-cross.patch +++ b/package/libs/ncurses/patches/500-cross.patch @@ -1,11 +1,11 @@ --- a/aclocal.m4 +++ b/aclocal.m4 -@@ -4298,7 +4298,7 @@ CF_EOF - EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS" +@@ -5137,7 +5137,7 @@ CF_EOF + EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" fi 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_shared_soname',-stats,$(LDFLAGS) -lc -o $[@]' ;; - openbsd[[2-9]].*) + openbsd[[2-9]].*) #(vi if test "$DFT_LWR_MODEL" = "shared" ; then diff --git a/package/libs/ncurses/patches/900-terminfo.patch b/package/libs/ncurses/patches/900-terminfo.patch index 7aab3dbca7..487a341ba9 100644 --- a/package/libs/ncurses/patches/900-terminfo.patch +++ b/package/libs/ncurses/patches/900-terminfo.patch @@ -1,6 +1,6 @@ --- a/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 # for XFree86 xterm. konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm, |