Browse Source

- remove stripped down iconv binary from image

master
vanhofen 5 years ago
parent
commit
02207a47a0
  1. 5
      make/neutrino-plugins.mk
  2. 35
      make/target-libs.mk
  3. 27
      patches/libiconv/disable_transliterations.patch
  4. 3512
      patches/libiconv/strip_charsets.patch

5
make/neutrino-plugins.mk

@ -31,11 +31,6 @@ NP_DEPS += luacurl
NP_DEPS += luaposix
NP_DEPS += lua-feedparser
# build only stripped down iconv binary if not exists the full-blown version
ifeq ($(wildcard $(TARGET_DIR)/bin/iconv),)
NP_DEPS += iconv-bin
endif
# -----------------------------------------------------------------------------
NP_CONFIGURE_ADDITIONS = \

35
make/target-libs.mk

@ -1388,41 +1388,6 @@ libiconv: $(ARCHIVE)/$(LIBICONV_SOURCE) | $(TARGET_DIR)
# -----------------------------------------------------------------------------
LIBICONV-STRIPPED_VER = 1.13.1
LIBICONV-STRIPPED_TMP = libiconv-$(LIBICONV-STRIPPED_VER)
LIBICONV-STRIPPED_SOURCE = libiconv-$(LIBICONV-STRIPPED_VER).tar.gz
LIBICONV-STRIPPED_URL = https://ftp.gnu.org/gnu/libiconv
$(ARCHIVE)/$(LIBICONV-STRIPPED_SOURCE):
$(DOWNLOAD) $(LIBICONV-STRIPPED_URL)/$(LIBICONV-STRIPPED_SOURCE)
LIBICONV-STRIPPED_PATCH = disable_transliterations.patch
LIBICONV-STRIPPED_PATCH += strip_charsets.patch
# builds only stripped down iconv binary used by smarthomeinfo plugin
iconv-bin: $(ARCHIVE)/$(LIBICONV-STRIPPED_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(LIBICONV-STRIPPED_TMP)
$(UNTAR)/$(LIBICONV-STRIPPED_SOURCE)
$(CHDIR)/$(LIBICONV-STRIPPED_TMP); \
$(call apply_patches, $(addprefix libiconv/,$(LIBICONV-STRIPPED_PATCH))); \
sed -i -e '/preload/d' Makefile.in; \
$(CONFIGURE) \
--target=$(TARGET) \
--prefix= \
--datarootdir=$(remove-datarootdir) \
--includedir=$(remove-includedir) \
--libdir=$(remove-libdir) \
--enable-static \
--disable-shared \
--enable-relocatable \
; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(REMOVE)/$(LIBICONV-STRIPPED_TMP)
$(TOUCH)
# -----------------------------------------------------------------------------
GRAPHLCD_VER = git
GRAPHLCD_TMP = graphlcd-base.$(GRAPHLCD_VER)
GRAPHLCD_SOURCE = graphlcd-base.$(GRAPHLCD_VER)

27
patches/libiconv/disable_transliterations.patch

@ -1,27 +0,0 @@
--- 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
patches/libiconv/strip_charsets.patch

File diff suppressed because it is too large
Loading…
Cancel
Save