summaryrefslogtreecommitdiff
path: root/debian/patches/cross-pkg-config.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/cross-pkg-config.patch')
-rw-r--r--debian/patches/cross-pkg-config.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/debian/patches/cross-pkg-config.patch b/debian/patches/cross-pkg-config.patch
new file mode 100644
index 000000000..87818cd95
--- /dev/null
+++ b/debian/patches/cross-pkg-config.patch
@@ -0,0 +1,129 @@
1Description: Allow using a cross-architecture pkg-config
2Author: Colin Watson <cjwatson@debian.org>
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1996
4Forwarded: https://bugzilla.mindrot.org/show_bug.cgi?id=1996
5Last-Update: 2011-04-02
6
7Index: b/configure
8===================================================================
9--- a/configure
10+++ b/configure
11@@ -8739,8 +8739,9 @@
12 if test "${with_libedit+set}" = set; then :
13 withval=$with_libedit; if test "x$withval" != "xno" ; then
14 if test "x$withval" = "xyes" ; then
15- # Extract the first word of "pkg-config", so it can be a program name with args.
16-set dummy pkg-config; ac_word=$2
17+ if test -n "$ac_tool_prefix"; then
18+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
20 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21 $as_echo_n "checking for $ac_word... " >&6; }
22 if ${ac_cv_path_PKGCONFIG+:} false; then :
23@@ -8766,7 +8767,6 @@
24 done
25 IFS=$as_save_IFS
26
27- test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
28 ;;
29 esac
30 fi
31@@ -8780,6 +8780,63 @@
32 fi
33
34
35+fi
36+if test -z "$ac_cv_path_PKGCONFIG"; then
37+ ac_pt_PKGCONFIG=$PKGCONFIG
38+ # Extract the first word of "pkg-config", so it can be a program name with args.
39+set dummy pkg-config; ac_word=$2
40+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41+$as_echo_n "checking for $ac_word... " >&6; }
42+if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
43+ $as_echo_n "(cached) " >&6
44+else
45+ case $ac_pt_PKGCONFIG in
46+ [\\/]* | ?:[\\/]*)
47+ ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
48+ ;;
49+ *)
50+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51+for as_dir in $PATH
52+do
53+ IFS=$as_save_IFS
54+ test -z "$as_dir" && as_dir=.
55+ for ac_exec_ext in '' $ac_executable_extensions; do
56+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
57+ ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
58+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59+ break 2
60+ fi
61+done
62+ done
63+IFS=$as_save_IFS
64+
65+ ;;
66+esac
67+fi
68+ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
69+if test -n "$ac_pt_PKGCONFIG"; then
70+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
71+$as_echo "$ac_pt_PKGCONFIG" >&6; }
72+else
73+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
74+$as_echo "no" >&6; }
75+fi
76+
77+ if test "x$ac_pt_PKGCONFIG" = x; then
78+ PKGCONFIG="no"
79+ else
80+ case $cross_compiling:$ac_tool_warned in
81+yes:)
82+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
83+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
84+ac_tool_warned=yes ;;
85+esac
86+ PKGCONFIG=$ac_pt_PKGCONFIG
87+ fi
88+else
89+ PKGCONFIG="$ac_cv_path_PKGCONFIG"
90+fi
91+
92 if test "x$PKGCONFIG" != "xno"; then
93 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
94 $as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
95Index: b/configure.ac
96===================================================================
97--- a/configure.ac
98+++ b/configure.ac
99@@ -1349,7 +1349,7 @@
100 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
101 [ if test "x$withval" != "xno" ; then
102 if test "x$withval" = "xyes" ; then
103- AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
104+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
105 if test "x$PKGCONFIG" != "xno"; then
106 AC_MSG_CHECKING([if $PKGCONFIG knows about libedit])
107 if "$PKGCONFIG" libedit; then
108Index: b/contrib/Makefile
109===================================================================
110--- a/contrib/Makefile
111+++ b/contrib/Makefile
112@@ -1,3 +1,5 @@
113+PKG_CONFIG = pkg-config
114+
115 all:
116 @echo "Valid targets: gnome-ssh-askpass1 gnome-ssh-askpass2"
117
118@@ -7,9 +9,9 @@
119 `gnome-config --libs gnome gnomeui`
120
121 gnome-ssh-askpass2: gnome-ssh-askpass2.c
122- $(CC) `pkg-config --cflags gtk+-2.0` \
123+ $(CC) `$(PKG_CONFIG) --cflags gtk+-2.0` \
124 gnome-ssh-askpass2.c -o gnome-ssh-askpass2 \
125- `pkg-config --libs gtk+-2.0 x11`
126+ `$(PKG_CONFIG) --libs gtk+-2.0 x11`
127
128 clean:
129 rm -f *.o gnome-ssh-askpass1 gnome-ssh-askpass2 gnome-ssh-askpass