commit 78ca7943db5ff84236e2c9cd5e833f1be0b4f64c
parent 45118a647c43c7d044bf0dc0d5fd225b2e40f035
Author: champtar <champetier.etienne@gmail.com>
Date: Tue, 8 Jul 2014 19:22:53 +0200
Merge pull request #85 from Naoir/libidn
libidn: Import from oldpackages, update to latest upstream, fix building, add myself as maintainer
Diffstat:
3 files changed, 203 insertions(+), 0 deletions(-)
diff --git a/libs/libidn/Makefile b/libs/libidn/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2009-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libidn
+PKG_VERSION:=1.28
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/libidn
+PKG_MD5SUM:=43a6f14b16559e10a492acc65c4b0acc
+
+PKG_LICENSE:=GPLv2 GPLv3 LGPLv2.1 LGPLv3 APACHEv2
+PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=GNUmakefile aclocal.m4
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libidn
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Stringprep, Punycode and IDNA implementation
+ URL:=http://www.gnu.org/software/libidn/
+endef
+
+define Package/libidn/description
+ GNU Libidn is a fully documented implementation of the Stringprep,
+ Punycode and IDNA specifications. Libidn's purpose is to encode and
+ decode internationalized domain names.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+
+MAKE_FLAGS += \
+ CC="$(TARGET_CC)" \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libidn/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libidn))
diff --git a/libs/libidn/patches/002-disable-po-docs-examples.patch b/libs/libidn/patches/002-disable-po-docs-examples.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -16,7 +16,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-SUBDIRS = gl lib/gl lib po src doc gltests lib/gltests tests examples \
++SUBDIRS = gl lib/gl lib src \
+ java csharp
+
+ EXTRA_DIST = cfg.mk maint.mk .clcopying
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,8 +51,6 @@ AC_PROG_LIBTOOL
+ # Checks for programs.
+ AM_MISSING_PROG(PERL, perl, $missing_dir)
+ AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+-AM_GNU_GETTEXT(external)
+-AM_GNU_GETTEXT_VERSION(0.18.3)
+ AM_ICONV
+ AM_PATH_LISPDIR
+
diff --git a/libs/libidn/patches/010-fix-idn-error-usage.patch b/libs/libidn/patches/010-fix-idn-error-usage.patch
@@ -0,0 +1,119 @@
+--- a/src/idn.c
++++ b/src/idn.c
+@@ -169,7 +169,7 @@ main (int argc, char *argv[])
+ (args_info.idna_to_unicode_given ? 1 : 0) +
+ (args_info.nfkc_given ? 1 : 0) != 1)
+ {
+- error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified"));
++ error (0, 0, "%s", _("only one of -s, -e, -d, -a, -u or -n can be specified"));
+ usage (EXIT_FAILURE);
+ }
+
+@@ -184,7 +184,7 @@ main (int argc, char *argv[])
+ if (!args_info.quiet_given
+ && args_info.inputs_num == 0
+ && isatty (fileno (stdin)))
+- fprintf (stderr, _("Type each input string on a line by itself, "
++ fprintf (stderr, "%s", _("Type each input string on a line by itself, "
+ "terminated by a newline character.\n"));
+
+ do
+@@ -199,7 +199,7 @@ main (int argc, char *argv[])
+ if (feof (stdin))
+ break;
+
+- error (EXIT_FAILURE, errno, _("input error"));
++ error (EXIT_FAILURE, errno, "%s", _("input error"));
+ }
+
+ if (readbuf[strlen (readbuf) - 1] == '\n')
+@@ -216,7 +216,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -241,7 +241,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (r);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -277,7 +277,7 @@ main (int argc, char *argv[])
+ q = stringprep_utf8_to_ucs4 (p, -1, &len);
+ free (p);
+ if (!q)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+
+ if (args_info.debug_given)
+@@ -336,7 +336,7 @@ main (int argc, char *argv[])
+ r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
+ free (q);
+ if (!r)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+
+ p = stringprep_utf8_to_locale (r);
+@@ -360,7 +360,7 @@ main (int argc, char *argv[])
+ q = stringprep_utf8_to_ucs4 (p, -1, NULL);
+ free (p);
+ if (!q)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+
+ if (args_info.debug_given)
+@@ -438,7 +438,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+ }
+
+@@ -494,7 +494,7 @@ main (int argc, char *argv[])
+ r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
+ free (q);
+ if (!r)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+
+ p = stringprep_utf8_to_locale (r);
+@@ -523,7 +523,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -537,7 +537,7 @@ main (int argc, char *argv[])
+ r = stringprep_utf8_nfkc_normalize (p, -1);
+ free (p);
+ if (!r)
+- error (EXIT_FAILURE, 0, _("could not do NFKC normalization"));
++ error (EXIT_FAILURE, 0, "%s", _("could not do NFKC normalization"));
+
+ if (args_info.debug_given)
+ {
+@@ -547,7 +547,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (r);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+