Gentoo Archives: gentoo-commits

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