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