board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / ncurses / 0001-fixup-pkg-config-handling.patch
blobe1cfc751646a0c88ead47b91da7952bbc750e0fc
1 Change handling of PKG_CONFIG_LIBDIR
3 When PKG_CONFIG_LIBDIR was unset in the environment, the configure
4 script was deducing the PKG_CONFIG_LIBDIR from the location of the
5 pkg-config binary, which doesn't make a lot of sense, and isn't done
6 by other autotools based packages.
8 Also, the configure script was checking that the directory really
9 exists. This forced to create the directory *and* provide an absolute
10 path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that
11 at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which
12 means that we got two times the staging directory location.
14 This patch fixes both of those issues. Also, since ncurses uses a fork
15 of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix
16 the configure script in this patch.
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
20 Index: b/configure
21 ===================================================================
22 --- a/configure
23 +++ b/configure
24 @@ -3623,27 +3623,20 @@
26 # Leave this as something that can be overridden in the environment.
27 if test -z "$PKG_CONFIG_LIBDIR" ; then
28 - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
29 + PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
32 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
33 - if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
35 -# Check whether --enable-pc-files or --disable-pc-files was given.
36 -if test "${enable_pc_files+set}" = set; then
37 - enableval="$enable_pc_files"
38 - enable_pc_files=$enableval
39 -else
40 - enable_pc_files=no
41 -fi;
42 - echo "$as_me:3638: result: $enable_pc_files" >&5
43 -echo "${ECHO_T}$enable_pc_files" >&6
44 + # Check whether --enable-pc-files or --disable-pc-files was given.
45 + if test "${enable_pc_files+set}" = set; then
46 + enableval="$enable_pc_files"
47 + enable_pc_files=$enableval
48 else
49 - echo "$as_me:3641: result: no" >&5
50 -echo "${ECHO_T}no" >&6
51 - { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
52 -echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
53 - enable_pc_files=no
54 - fi
55 + enable_pc_files=no
56 + fi;
57 + echo "$as_me:3638: result: $enable_pc_files" >&5
58 + echo "${ECHO_T}$enable_pc_files" >&6
61 echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
62 Index: b/configure.in
63 ===================================================================
64 --- a/configure.in
65 +++ b/configure.in
66 @@ -174,20 +174,14 @@
68 # Leave this as something that can be overridden in the environment.
69 if test -z "$PKG_CONFIG_LIBDIR" ; then
70 - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
71 + PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig"
73 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
74 - if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
75 - AC_ARG_ENABLE(pc-files,
76 + AC_ARG_ENABLE(pc-files,
77 [ --enable-pc-files generate and install .pc files for pkg-config],
78 [enable_pc_files=$enableval],
79 [enable_pc_files=no])
80 - AC_MSG_RESULT($enable_pc_files)
81 - else
82 - AC_MSG_RESULT(no)
83 - AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
84 - enable_pc_files=no
85 - fi
86 + AC_MSG_RESULT($enable_pc_files)
88 AC_SUBST(PKG_CONFIG_LIBDIR)