Переглянути джерело

Merge pull request #85 from Naoir/libidn

libidn: Import from oldpackages, update to latest upstream, fix building, add myself as maintainer
champtar 10 роки тому
джерело
коміт
78ca7943db

+ 62
- 0
libs/libidn/Makefile Переглянути файл

@@ -0,0 +1,62 @@
1
+#
2
+# Copyright (C) 2009-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libidn
11
+PKG_VERSION:=1.28
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=@GNU/libidn
16
+PKG_MD5SUM:=43a6f14b16559e10a492acc65c4b0acc
17
+
18
+PKG_LICENSE:=GPLv2 GPLv3 LGPLv2.1 LGPLv3 APACHEv2
19
+PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
20
+PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_REMOVE_FILES:=GNUmakefile aclocal.m4
24
+PKG_INSTALL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/libidn
29
+  SECTION:=libs
30
+  CATEGORY:=Libraries
31
+  TITLE:=Stringprep, Punycode and IDNA implementation
32
+  URL:=http://www.gnu.org/software/libidn/
33
+endef
34
+
35
+define Package/libidn/description
36
+  GNU Libidn is a fully documented implementation of the Stringprep,
37
+  Punycode and IDNA specifications. Libidn's purpose is to encode and
38
+  decode internationalized domain names.
39
+endef
40
+
41
+TARGET_CFLAGS += $(FPIC)
42
+
43
+CONFIGURE_ARGS += \
44
+	--enable-shared \
45
+	--enable-static \
46
+
47
+MAKE_FLAGS += \
48
+	CC="$(TARGET_CC)" \
49
+
50
+define Build/InstallDev
51
+	$(INSTALL_DIR) $(1)/usr/include
52
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
53
+	$(INSTALL_DIR) $(1)/usr/lib
54
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
55
+endef
56
+
57
+define Package/libidn/install
58
+	$(INSTALL_DIR) $(1)/usr/lib
59
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so.* $(1)/usr/lib/
60
+endef
61
+
62
+$(eval $(call BuildPackage,libidn))

+ 22
- 0
libs/libidn/patches/002-disable-po-docs-examples.patch Переглянути файл

@@ -0,0 +1,22 @@
1
+--- a/Makefile.am
2
++++ b/Makefile.am
3
+@@ -16,7 +16,7 @@
4
+ # You should have received a copy of the GNU General Public License
5
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
6
+ 
7
+-SUBDIRS = gl lib/gl lib po src doc gltests lib/gltests tests examples	\
8
++SUBDIRS = gl lib/gl lib src \
9
+ 	java csharp
10
+ 
11
+ EXTRA_DIST = cfg.mk maint.mk .clcopying
12
+--- a/configure.ac
13
++++ b/configure.ac
14
+@@ -51,8 +51,6 @@ AC_PROG_LIBTOOL
15
+ # Checks for programs.
16
+ AM_MISSING_PROG(PERL, perl, $missing_dir)
17
+ AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
18
+-AM_GNU_GETTEXT(external)
19
+-AM_GNU_GETTEXT_VERSION(0.18.3)
20
+ AM_ICONV
21
+ AM_PATH_LISPDIR
22
+ 

+ 119
- 0
libs/libidn/patches/010-fix-idn-error-usage.patch Переглянути файл

@@ -0,0 +1,119 @@
1
+--- a/src/idn.c
2
++++ b/src/idn.c
3
+@@ -169,7 +169,7 @@ main (int argc, char *argv[])
4
+       (args_info.idna_to_unicode_given ? 1 : 0) +
5
+       (args_info.nfkc_given ? 1 : 0) != 1)
6
+     {
7
+-      error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified"));
8
++      error (0, 0, "%s", _("only one of -s, -e, -d, -a, -u or -n can be specified"));
9
+       usage (EXIT_FAILURE);
10
+     }
11
+ 
12
+@@ -184,7 +184,7 @@ main (int argc, char *argv[])
13
+   if (!args_info.quiet_given
14
+       && args_info.inputs_num == 0
15
+       && isatty (fileno (stdin)))
16
+-    fprintf (stderr, _("Type each input string on a line by itself, "
17
++    fprintf (stderr, "%s", _("Type each input string on a line by itself, "
18
+ 		       "terminated by a newline character.\n"));
19
+ 
20
+   do
21
+@@ -199,7 +199,7 @@ main (int argc, char *argv[])
22
+ 	  if (feof (stdin))
23
+ 	    break;
24
+ 
25
+-	  error (EXIT_FAILURE, errno, _("input error"));
26
++	  error (EXIT_FAILURE, errno, "%s", _("input error"));
27
+ 	}
28
+ 
29
+       if (readbuf[strlen (readbuf) - 1] == '\n')
30
+@@ -216,7 +216,7 @@ main (int argc, char *argv[])
31
+ 	  if (!q)
32
+ 	    {
33
+ 	      free (p);
34
+-	      error (EXIT_FAILURE, 0,
35
++	      error (EXIT_FAILURE, 0, "%s",
36
+ 		     _("could not convert from UTF-8 to UCS-4"));
37
+ 	    }
38
+ 
39
+@@ -241,7 +241,7 @@ main (int argc, char *argv[])
40
+ 	  if (!q)
41
+ 	    {
42
+ 	      free (r);
43
+-	      error (EXIT_FAILURE, 0,
44
++	      error (EXIT_FAILURE, 0, "%s",
45
+ 		     _("could not convert from UTF-8 to UCS-4"));
46
+ 	    }
47
+ 
48
+@@ -277,7 +277,7 @@ main (int argc, char *argv[])
49
+ 	  q = stringprep_utf8_to_ucs4 (p, -1, &len);
50
+ 	  free (p);
51
+ 	  if (!q)
52
+-	    error (EXIT_FAILURE, 0,
53
++	    error (EXIT_FAILURE, 0, "%s",
54
+ 		   _("could not convert from UTF-8 to UCS-4"));
55
+ 
56
+ 	  if (args_info.debug_given)
57
+@@ -336,7 +336,7 @@ main (int argc, char *argv[])
58
+ 	  r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
59
+ 	  free (q);
60
+ 	  if (!r)
61
+-	    error (EXIT_FAILURE, 0,
62
++	    error (EXIT_FAILURE, 0, "%s",
63
+ 		   _("could not convert from UCS-4 to UTF-8"));
64
+ 
65
+ 	  p = stringprep_utf8_to_locale (r);
66
+@@ -360,7 +360,7 @@ main (int argc, char *argv[])
67
+ 	  q = stringprep_utf8_to_ucs4 (p, -1, NULL);
68
+ 	  free (p);
69
+ 	  if (!q)
70
+-	    error (EXIT_FAILURE, 0,
71
++	    error (EXIT_FAILURE, 0, "%s",
72
+ 		   _("could not convert from UCS-4 to UTF-8"));
73
+ 
74
+ 	  if (args_info.debug_given)
75
+@@ -438,7 +438,7 @@ main (int argc, char *argv[])
76
+ 	  if (!q)
77
+ 	    {
78
+ 	      free (p);
79
+-	      error (EXIT_FAILURE, 0,
80
++	      error (EXIT_FAILURE, 0, "%s",
81
+ 		     _("could not convert from UCS-4 to UTF-8"));
82
+ 	    }
83
+ 
84
+@@ -494,7 +494,7 @@ main (int argc, char *argv[])
85
+ 	  r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
86
+ 	  free (q);
87
+ 	  if (!r)
88
+-	    error (EXIT_FAILURE, 0,
89
++	    error (EXIT_FAILURE, 0, "%s",
90
+ 		   _("could not convert from UTF-8 to UCS-4"));
91
+ 
92
+ 	  p = stringprep_utf8_to_locale (r);
93
+@@ -523,7 +523,7 @@ main (int argc, char *argv[])
94
+ 	      if (!q)
95
+ 		{
96
+ 		  free (p);
97
+-		  error (EXIT_FAILURE, 0,
98
++		  error (EXIT_FAILURE, 0, "%s",
99
+ 			 _("could not convert from UTF-8 to UCS-4"));
100
+ 		}
101
+ 
102
+@@ -537,7 +537,7 @@ main (int argc, char *argv[])
103
+ 	  r = stringprep_utf8_nfkc_normalize (p, -1);
104
+ 	  free (p);
105
+ 	  if (!r)
106
+-	    error (EXIT_FAILURE, 0, _("could not do NFKC normalization"));
107
++	    error (EXIT_FAILURE, 0, "%s", _("could not do NFKC normalization"));
108
+ 
109
+ 	  if (args_info.debug_given)
110
+ 	    {
111
+@@ -547,7 +547,7 @@ main (int argc, char *argv[])
112
+ 	      if (!q)
113
+ 		{
114
+ 		  free (r);
115
+-		  error (EXIT_FAILURE, 0,
116
++		  error (EXIT_FAILURE, 0, "%s",
117
+ 			 _("could not convert from UTF-8 to UCS-4"));
118
+ 		}
119
+