Browse Source

libandroid-support: do not use iconv.h header

emacs-27
Leonid Plyushch 6 years ago
parent
commit
e359cbd63f
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 2
      packages/libandroid-support/build.sh
  2. 20
      packages/libandroid-support/iconv-decls.patch
  3. 16
      packages/libandroid-support/iconv.h.patch

2
packages/libandroid-support/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://github.com/termux/libandroid-support
TERMUX_PKG_DESCRIPTION="Library extending the Android C library (Bionic) for additional multibyte, locale and math support"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=24
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=https://github.com/termux/libandroid-support/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e14e262429a60bea733d5bed69d2f3a1cada53fcadaf76787fca5c8b0d4dae2f
TERMUX_PKG_PRE_DEPENDS="dpkg (>= 1.19.4-3)"

20
packages/libandroid-support/iconv-decls.patch

@ -0,0 +1,20 @@
diff -uNr libandroid-support-24/src/musl-locale/iconv.c libandroid-support-24.mod/src/musl-locale/iconv.c
--- libandroid-support-24/src/musl-locale/iconv.c 2019-01-25 03:17:10.000000000 +0200
+++ libandroid-support-24.mod/src/musl-locale/iconv.c 2019-05-23 02:25:07.770702362 +0300
@@ -1,4 +1,3 @@
-#include <iconv.h>
#include <errno.h>
#include <wchar.h>
#include <string.h>
@@ -6,6 +5,11 @@
#include <limits.h>
#include <stdint.h>
+typedef void* iconv_t;
+iconv_t iconv_open(const char*, const char*);
+size_t iconv(iconv_t, char**, size_t*, char**, size_t*);
+int iconv_close(iconv_t);
+
#define UTF_32BE 0300
#define UTF_16LE 0301
#define UTF_16BE 0302

16
packages/libandroid-support/iconv.h.patch

@ -1,16 +0,0 @@
diff -uNr libandroid-support-24/include/iconv.h libandroid-support-24.mod/include/iconv.h
--- libandroid-support-24/include/iconv.h 1970-01-01 03:00:00.000000000 +0300
+++ libandroid-support-24.mod/include/iconv.h 2019-04-28 22:49:00.107252621 +0300
@@ -0,0 +1,12 @@
+#ifndef _ICONV_H
+#define _ICONV_H
+
+#include <stddef.h>
+
+typedef void* iconv_t;
+
+iconv_t iconv_open(const char*, const char*);
+size_t iconv(iconv_t, char**, size_t*, char**, size_t*);
+int iconv_close(iconv_t);
+
+#endif
Loading…
Cancel
Save