/[gentoo-x86]/games-simulation/openttd/files/libiconv.patch
Gentoo

Contents of /games-simulation/openttd/files/libiconv.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Oct 23 04:29:56 2008 UTC (6 years, 2 months ago) by robbat2
Branch: MAIN
Version bump per bug 233929.
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-rc6-00521-gcdbf87e x86_64)

1 Index: config.lib
2 ===================================================================
3 --- config.lib (revision 14474)
4 +++ config.lib (working copy)
5 @@ -1225,10 +1225,12 @@
6
7 if [ "$with_iconv" != "0" ]; then
8 CFLAGS="$CFLAGS -DWITH_ICONV"
9 - LIBS="$LIBS -liconv"
10 - if [ "$with_iconv" != "2" ]; then
11 - CFLAGS="$CFLAGS -I$with_iconv/include"
12 - LIBS="$LIBS -L$with_iconv/lib"
13 + if [ "$link_to_iconv" = "yes" ]; then
14 + LIBS="$LIBS -liconv"
15 + if [ "$with_iconv" != "2" ]; then
16 + CFLAGS="$CFLAGS -I$with_iconv/include"
17 + LIBS="$LIBS -L$with_iconv/lib"
18 + fi
19 fi
20
21 if [ "$have_broken_iconv" != "no" ]; then
22 @@ -2161,6 +2163,27 @@
23 log 2 " exit code $ret"
24 if [ "$ret" = "0" ]; then have_broken_iconv="no"; else have_broken_iconv="yes"; fi
25 log 1 "checking if iconv has non-const inbuf... $have_broken_iconv"
26 +
27 + cat > tmp.iconv.cpp << EOF
28 +#include "src/stdafx.h"
29 +#include <iconv.h>
30 +int main() {
31 + static char buf[1024];
32 + iconv_t convd = 0;
33 + char *inbuf = "";
34 + char *outbuf = buf;
35 + size_t outlen = 1023;
36 + size_t inlen = 0;
37 + return iconv(convd, &inbuf, &inlen, &outbuf, &outlen);
38 +}
39 +EOF
40 + execute="$cxx_host $CFLAGS tmp.iconv.cpp -o tmp.iconv -DTESTING 2>&1"
41 + eval $execute >&/dev/null
42 + ret=$?
43 + log 2 "executing $execute"
44 + log 2 " exit code $ret"
45 + if [ "$ret" = "0" ]; then link_to_iconv="no"; else link_to_iconv="yes"; fi
46 + log 1 "checking whether to link to iconv... $link_to_iconv"
47 rm -f tmp.iconv tmp.iconv.cpp
48 }
49

  ViewVC Help
Powered by ViewVC 1.1.20