Browse Source

- rewrite iconv target to reduce binary size (needs testing)

master
gixxpunk 7 years ago
parent
commit
31c2221083
  1. 27
      archive-patches/iconv-disable_transliterations.patch
  2. 3512
      archive-patches/iconv-strip_charsets.patch
  3. 4
      make/archives.mk
  4. 4
      make/system-tools-extra.mk

27
archive-patches/iconv-disable_transliterations.patch

@ -0,0 +1,27 @@
--- a/lib/loop_unicode.h
+++ b/lib/loop_unicode.h
@@ -24,6 +24,7 @@
static int unicode_transliterate (conv_t cd, ucs4_t wc,
unsigned char* outptr, size_t outleft)
{
+#if 0 /* Korean */
if (cd->oflags & HAVE_HANGUL_JAMO) {
/* Decompose Hangul into Jamo. Use double-width Jamo (contained
in all Korean encodings and ISO-2022-JP-2), not half-width Jamo
@@ -56,6 +57,8 @@
return RET_TOOSMALL;
}
}
+#endif
+#if 0 /* CJKV */
{
/* Try to use a variant, but postfix it with
U+303E IDEOGRAPHIC VARIATION INDICATOR
@@ -104,6 +107,7 @@
}
}
}
+#endif
if (wc >= 0x2018 && wc <= 0x201a) {
/* Special case for quotation marks 0x2018, 0x2019, 0x201a */
ucs4_t substitute =

3512
archive-patches/iconv-strip_charsets.patch

File diff suppressed because it is too large

4
make/archives.mk

@ -150,8 +150,8 @@ LIBMAD_VER=0.15.1b
$(ARCHIVE)/libmad-$(LIBMAD_VER).tar.gz:
$(WGET) http://downloads.sourceforge.net/project/mad/libmad/$(LIBMAD_VER)/libmad-$(LIBMAD_VER).tar.gz
LIBICONV_VER=1.15
ibiconv-$(LIBICONV_VER).tar.gz:
LIBICONV_VER=1.13.1
$(ARCHIVE)/libiconv-$(LIBICONV_VER).tar.gz:
$(WGET) http://ftp.gnu.org/gnu/libiconv/libiconv-$(LIBICONV_VER).tar.gz
LIBJPEG-TURBO_VER=1.5.2

4
make/system-tools-extra.mk

@ -25,11 +25,15 @@ make special-tools:
$(D)/iconv: $(ARCHIVE)/libiconv-$(LIBICONV_VER).tar.gz | $(TARGETPREFIX)
$(UNTAR)/libiconv-$(LIBICONV_VER).tar.gz
pushd $(BUILD_TMP)/libiconv-$(LIBICONV_VER) && \
$(PATCH)/iconv-disable_transliterations.patch && \
$(PATCH)/iconv-strip_charsets.patch && \
$(CONFIGURE) \
--target=$(TARGET) \
--prefix= \
--enable-static \
--disable-shared \
--enable-relocatable \
--disable-rpath \
--datarootdir=/.remove && \
$(MAKE) && \
$(MAKE) install DESTDIR=$(TARGETPREFIX)

Loading…
Cancel
Save