libandroid-support: Add iconv for 64-bit build
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 4 Jan 2016 11:39:40 +0000 (06:39 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 4 Jan 2016 11:39:40 +0000 (06:39 -0500)
packages/libandroid-support/build.sh
packages/libandroid-support/iconv.h.patch [new file with mode: 0644]

index 576ee4d..30ab92c 100755 (executable)
@@ -13,9 +13,9 @@ termux_step_post_extract_package () {
                mkdir -p src/musl-locale/ src/musl-multibyte/ include/
                cp $NDK/sources/android/support/src/musl-multibyte/mblen.c src/musl-multibyte/
                cp $NDK/sources/android/support/src/musl-locale/{catclose.c,catgets.c,catopen.c} src/musl-locale/
-               cp $NDK/sources/android/support/src/musl-locale/{langinfo.c,intl.c} src/musl-locale/
+               cp $NDK/sources/android/support/src/musl-locale/{langinfo.c,intl.c,iconv.c} src/musl-locale/
                cp $NDK/sources/android/support/include/* include/
-               cp $NDK/sources/android/support/src/musl-locale/libc.h include/
+               cp $NDK/sources/android/support/src/musl-locale/{libc.h,codepages.h,legacychars.h,jis0208.h,gb18030.h,big5.h,hkscs.h,ksc.h} include/
        else
                cp -Rf $NDK/sources/android/support/* .
                # See Android.mk for files not to build:
diff --git a/packages/libandroid-support/iconv.h.patch b/packages/libandroid-support/iconv.h.patch
new file mode 100644 (file)
index 0000000..a709ee3
--- /dev/null
@@ -0,0 +1,19 @@
+diff -u -r /home/fornwall/lib/android-ndk/sources/android/support/include/iconv.h ./include/iconv.h
+--- /home/fornwall/lib/android-ndk/sources/android/support/include/iconv.h     2014-06-03 13:15:33.000000000 -0400
++++ ./include/iconv.h  2016-01-03 21:17:16.472527767 -0500
+@@ -28,8 +28,6 @@
+ #ifndef NDK_ANDROID_SUPPORT_ICONV_H
+ #define NDK_ANDROID_SUPPORT_ICONV_H
+-#if !defined(__LP64__)
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -46,6 +44,4 @@
+ }  // extern "C"
+ #endif
+-#endif // !__LP64__
+-
+ #endif  // NDK_ANDROID_SUPPORT_ICONV_H