1 |
markusle 08/02/04 14:06:54 |
2 |
|
3 |
Added: qalculate-bases-0.9.4-cln-config.patch |
4 |
Log: |
5 |
Added patches to allow compilation against cln-1.2 (see bug #208527). |
6 |
(Portage version: 2.1.4.1) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sci-calculators/qalculate-bases/files/qalculate-bases-0.9.4-cln-config.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-calculators/qalculate-bases/files/qalculate-bases-0.9.4-cln-config.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-calculators/qalculate-bases/files/qalculate-bases-0.9.4-cln-config.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: qalculate-bases-0.9.4-cln-config.patch |
15 |
=================================================================== |
16 |
diff -Naur libqalculate-0.9.6/aclocal.m4 libqalculate-0.9.6.new/aclocal.m4 |
17 |
--- libqalculate-0.9.6/aclocal.m4 2007-06-17 04:45:44.000000000 -0400 |
18 |
+++ libqalculate-0.9.6.new/aclocal.m4 2008-02-02 11:04:21.000000000 -0500 |
19 |
@@ -7836,146 +7836,27 @@ |
20 |
[dnl |
21 |
dnl Get the cppflags and libraries from the cln-config script |
22 |
dnl |
23 |
-AC_ARG_WITH(cln-prefix,[ --with-cln-prefix=PFX Prefix where CLN is installed (optional)], |
24 |
- cln_config_prefix="$withval", cln_config_prefix="") |
25 |
-AC_ARG_WITH(cln-exec-prefix,[ --with-cln-exec-prefix=PFX Exec prefix where CLN is installed (optional)], |
26 |
- cln_config_exec_prefix="$withval", cln_config_exec_prefix="") |
27 |
-AC_ARG_ENABLE(clntest, [ --disable-clntest Do not try to compile and run a test CLN program], |
28 |
- , enable_clntest=yes) |
29 |
- |
30 |
-if test x$cln_config_exec_prefix != x ; then |
31 |
- cln_config_args="$cln_config_args --exec-prefix=$cln_config_exec_prefix" |
32 |
- if test x${CLN_CONFIG+set} != xset ; then |
33 |
- CLN_CONFIG=$cln_config_exec_prefix/bin/cln-config |
34 |
- fi |
35 |
-fi |
36 |
-if test x$cln_config_prefix != x ; then |
37 |
- cln_config_args="$cln_config_args --prefix=$cln_config_prefix" |
38 |
- if test x${CLN_CONFIG+set} != xset ; then |
39 |
- CLN_CONFIG=$cln_config_prefix/bin/cln-config |
40 |
- fi |
41 |
-fi |
42 |
|
43 |
-AC_PATH_PROG(CLN_CONFIG, cln-config, no) |
44 |
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
45 |
cln_min_version=ifelse([$1], ,1.1.0,$1) |
46 |
AC_MSG_CHECKING(for CLN - version >= $cln_min_version) |
47 |
-if test "$CLN_CONFIG" = "no" ; then |
48 |
+if test "$PKG_CONFIG" = "no" ; then |
49 |
AC_MSG_RESULT(no) |
50 |
- echo "*** The cln-config script installed by CLN could not be found" |
51 |
- echo "*** If CLN was installed in PREFIX, make sure PREFIX/bin is in" |
52 |
- echo "*** your path, or set the CLN_CONFIG environment variable to the" |
53 |
- echo "*** full path to cln-config." |
54 |
+ echo "*** could not find pkg-config" |
55 |
ifelse([$3], , :, [$3]) |
56 |
else |
57 |
dnl Parse required version and the result of cln-config. |
58 |
- cln_min_major_version=`echo $cln_min_version | \ |
59 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
60 |
- cln_min_minor_version=`echo $cln_min_version | \ |
61 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
62 |
- cln_min_micro_version=`echo $cln_min_version | \ |
63 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
64 |
- CLN_CPPFLAGS=`$CLN_CONFIG $cln_config_args --cppflags` |
65 |
- CLN_LIBS=`$CLN_CONFIG $cln_config_args --libs` |
66 |
- cln_config_version=`$CLN_CONFIG $cln_config_args --version` |
67 |
- cln_config_major_version=`echo $cln_config_version | \ |
68 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
69 |
- cln_config_minor_version=`echo $cln_config_version | \ |
70 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
71 |
- cln_config_micro_version=`echo $cln_config_version | \ |
72 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
73 |
-dnl Check if the installed CLN is sufficiently new according to cln-config. |
74 |
- if test \( $cln_config_major_version -lt $cln_min_major_version \) -o \ |
75 |
- \( $cln_config_major_version -eq $cln_min_major_version -a $cln_config_minor_version -lt $cln_min_minor_version \) -o \ |
76 |
- \( $cln_config_major_version -eq $cln_min_major_version -a $cln_config_minor_version -eq $cln_min_minor_version -a $cln_config_micro_version -lt $cln_min_micro_version \); then |
77 |
- echo -e "\n*** 'cln-config --version' returned $cln_config_major_version.$cln_config_minor_version.$cln_config_micro_version, but the minimum version" |
78 |
- echo "*** of CLN required is $cln_min_major_version.$cln_min_minor_version.$cln_min_micro_version. If cln-config is correct, then it is" |
79 |
- echo "*** best to upgrade to the required version." |
80 |
- echo "*** If cln-config was wrong, set the environment variable CLN_CONFIG" |
81 |
- echo "*** to point to the correct copy of cln-config, and remove the file" |
82 |
- echo "*** config.cache before re-running configure." |
83 |
- ifelse([$3], , :, [$3]) |
84 |
+ if $PKG_CONFIG cln --atleast-version=${cln_min_version}; then |
85 |
+ echo "Found cln >= ${cln_min_version}" |
86 |
+ CLN_CPPFLAGS=`$PKG_CONFIG cln --cflags` |
87 |
+ CLN_LIBS=`$PKG_CONFIG cln --libs` |
88 |
else |
89 |
-dnl The versions match so far. Now do a sanity check: Does the result of cln-config |
90 |
-dnl match the version of the headers and the version built into the library, too? |
91 |
- no_cln="" |
92 |
- if test "x$enable_clntest" = "xyes" ; then |
93 |
- ac_save_CPPFLAGS="$CPPFLAGS" |
94 |
- ac_save_LIBS="$LIBS" |
95 |
- CPPFLAGS="$CPPFLAGS $CLN_CPPFLAGS" |
96 |
- LIBS="$LIBS $CLN_LIBS" |
97 |
- rm -f conf.clntest |
98 |
- AC_TRY_RUN([ |
99 |
-#include <stdio.h> |
100 |
-#include <string.h> |
101 |
-#include <cln/version.h> |
102 |
- |
103 |
-/* we do not #include <stdlib.h> because autoconf in C++ mode inserts a |
104 |
- prototype for exit() that conflicts with the one in stdlib.h */ |
105 |
-extern "C" int system(const char *); |
106 |
- |
107 |
-int main(void) |
108 |
-{ |
109 |
- system("touch conf.clntest"); |
110 |
- |
111 |
- if ((CL_VERSION_MAJOR != $cln_config_major_version) || |
112 |
- (CL_VERSION_MINOR != $cln_config_minor_version) || |
113 |
- (CL_VERSION_PATCHLEVEL != $cln_config_micro_version)) { |
114 |
- printf("\n*** 'cln-config --version' returned %d.%d.%d, but the header file I found\n", $cln_config_major_version, $cln_config_minor_version, $cln_config_micro_version); |
115 |
- printf("*** corresponds to %d.%d.%d. This mismatch suggests your installation of CLN\n", CL_VERSION_MAJOR, CL_VERSION_MINOR, CL_VERSION_PATCHLEVEL); |
116 |
- printf("*** is corrupted or you have specified some wrong -I compiler flags.\n"); |
117 |
- printf("*** Please inquire and consider reinstalling CLN.\n"); |
118 |
- return 1; |
119 |
- } |
120 |
- if ((cln::version_major != $cln_config_major_version) || |
121 |
- (cln::version_minor != $cln_config_minor_version) || |
122 |
- (cln::version_patchlevel != $cln_config_micro_version)) { |
123 |
- printf("\n*** 'cln-config --version' returned %d.%d.%d, but the library I found\n", $cln_config_major_version, $cln_config_minor_version, $cln_config_micro_version); |
124 |
- printf("*** corresponds to %d.%d.%d. This mismatch suggests your installation of CLN\n", cln::version_major, cln::version_minor, cln::version_patchlevel); |
125 |
- printf("*** is corrupted or you have specified some wrong -L compiler flags.\n"); |
126 |
- printf("*** Please inquire and consider reinstalling CLN.\n"); |
127 |
- return 1; |
128 |
- } |
129 |
- return 0; |
130 |
-} |
131 |
-],, no_cln=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
132 |
- CPPFLAGS="$ac_save_CPPFLAGS" |
133 |
- LIBS="$ac_save_LIBS" |
134 |
- fi |
135 |
- if test "x$no_cln" = x ; then |
136 |
- AC_MSG_RESULT([yes, $cln_config_version]) |
137 |
- ifelse([$2], , :, [$2]) |
138 |
- else |
139 |
- AC_MSG_RESULT(no) |
140 |
- if test ! -f conf.clntest ; then |
141 |
- echo "*** Could not run CLN test program, checking why..." |
142 |
- CPPFLAGS="$CFLAGS $CLN_CPPFLAGS" |
143 |
- LIBS="$LIBS $CLN_LIBS" |
144 |
- AC_TRY_LINK([ |
145 |
-#include <stdio.h> |
146 |
-#include <cln/version.h> |
147 |
-], [ return 0; ], |
148 |
- [ echo "*** The test program compiled, but did not run. This usually means" |
149 |
- echo "*** that the run-time linker is not finding CLN or finding the wrong" |
150 |
- echo "*** version of CLN. If it is not finding CLN, you'll need to set your" |
151 |
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
152 |
- echo "*** to the installed location. Also, make sure you have run ldconfig if that" |
153 |
- echo "*** is required on your system."], |
154 |
- [ echo "*** The test program failed to compile or link. See the file config.log for the" |
155 |
- echo "*** exact error that occured. This usually means CLN was incorrectly installed" |
156 |
- echo "*** or that you have moved CLN since it was installed. In the latter case, you" |
157 |
- echo "*** may want to edit the cln-config script: $CLN_CONFIG." ]) |
158 |
- CPPFLAGS="$ac_save_CPPFLAGS" |
159 |
- LIBS="$ac_save_LIBS" |
160 |
- fi |
161 |
- CLN_CPPFLAGS="" |
162 |
- CLN_LIBS="" |
163 |
- ifelse([$3], , :, [$3]) |
164 |
- fi |
165 |
+ echo "ERROR: cln >= ${cln_min_version} not found" |
166 |
+ ifelse([$3], , :, [$3]) |
167 |
fi |
168 |
fi |
169 |
AC_SUBST(CLN_CPPFLAGS) |
170 |
AC_SUBST(CLN_LIBS) |
171 |
-rm -f conf.clntest |
172 |
]) |
173 |
|
174 |
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
175 |
|
176 |
|
177 |
|
178 |
-- |
179 |
gentoo-commits@l.g.o mailing list |