From 2566366990a8531763576a222617c35215c32d3f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 15 Mar 2013 11:28:03 +0100 Subject: [PATCH] add libiconv patch and document it. --- README.macos | 16 ++++++++++++++++ build/macos/libiconv-macos.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 build/macos/libiconv-macos.patch diff --git a/README.macos b/README.macos index bb78575b..dd39c2f6 100644 --- a/README.macos +++ b/README.macos @@ -99,4 +99,20 @@ For a better appearance, you can install the gtk-quartz-engine (a gtk theme) tha Generate a new bundle to have it included. +libiconv hack +************* + +The Makefile.am rules used to generate the bundle fetch a libiconv.2.dylib from a linphone download page. +This library adds some additional symbols so that dependencies requiring the iconv from /usr/lib and the ones requiring from the bundle are both satisfied. +In case this library needs to generated, here are the commands: + $ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz + $ cd libiconv-1.14 + $ patch -p1 < ../linphone/build/macos/libiconv-macos.patch + $ ./configure --prefix=/opt/local --disable-static 'CFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5' 'LDFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5' CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5" && make + $ make install DESTDIR=/tmp + +The resulted library can be found in /tmp/opt/local/lib + + + diff --git a/build/macos/libiconv-macos.patch b/build/macos/libiconv-macos.patch new file mode 100644 index 00000000..e0654843 --- /dev/null +++ b/build/macos/libiconv-macos.patch @@ -0,0 +1,26 @@ +--- libiconv-1.14.orig/lib/iconv.c 2013-03-14 16:30:50.000000000 +0100 ++++ libiconv-1.14/lib/iconv.c 2013-03-15 10:24:38.000000000 +0100 +@@ -607,4 +607,23 @@ + strong_alias (libiconv_close, iconv_close) + #endif + ++#undef iconv_open ++#undef iconv ++#undef iconv_close ++ ++LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode){ ++ return libiconv_open(tocode,fromcode); ++} ++ ++LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd, ++ ICONV_CONST char* * inbuf, size_t *inbytesleft, ++ char* * outbuf, size_t *outbytesleft){ ++ return libiconv(icd,inbuf,inbytesleft,outbuf,outbytesleft); ++} ++ ++LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd){ ++ return libiconv_close(icd); ++} ++ ++ + #endif -- 2.39.2