diff options
author | drochner <drochner@pkgsrc.org> | 2009-12-01 11:18:48 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-12-01 11:18:48 +0000 |
commit | 0fe6bafff009db34d35a8b96ffba6b5d55284465 (patch) | |
tree | e502b8a04e005409315e65d8978eddb7e186675b /comms/obexapp | |
parent | a9f91279340f3d334b38c85def603dc2851fc6b4 (diff) | |
download | pkgsrc-0fe6bafff009db34d35a8b96ffba6b5d55284465.tar.gz |
Make this work with BSD native iconv(3).
This was tested by sending vcards with non-ASCII names; the result
was identical as before with GNU libiconv.
bump PKGREVISION
approved by plunky
Diffstat (limited to 'comms/obexapp')
-rw-r--r-- | comms/obexapp/Makefile | 5 | ||||
-rw-r--r-- | comms/obexapp/distinfo | 4 | ||||
-rw-r--r-- | comms/obexapp/patches/patch-ac | 73 |
3 files changed, 75 insertions, 7 deletions
diff --git a/comms/obexapp/Makefile b/comms/obexapp/Makefile index 27044d4a0d8..2f26f7ee966 100644 --- a/comms/obexapp/Makefile +++ b/comms/obexapp/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.23 2009/11/24 16:43:16 plunky Exp $ +# $NetBSD: Makefile,v 1.24 2009/12/01 11:18:48 drochner Exp $ # DISTNAME= obexapp-1.4.12 +PKGREVISION= 1 CATEGORIES= comms MASTER_SITES= http://people.freebsd.org/~emax/obexapp/ @@ -30,8 +31,6 @@ SUBST_SED.paths+= -e "s|/usr/local/man|${PREFIX}|" SUBST_SED.paths+= -e "s|/usr/local|${PREFIX}|" SUBST_SED.paths+= -e "s|/var|${VARBASE}|" -# Sigh, this needs the GNU libiconv. -USE_GNU_ICONV= yes USE_BSD_MAKEFILE= yes .include "../../mk/bsd.prefs.mk" diff --git a/comms/obexapp/distinfo b/comms/obexapp/distinfo index 026e17735cb..c3c9d58248f 100644 --- a/comms/obexapp/distinfo +++ b/comms/obexapp/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.13 2009/08/21 07:16:18 plunky Exp $ +$NetBSD: distinfo,v 1.14 2009/12/01 11:18:48 drochner Exp $ SHA1 (obexapp-1.4.12.tar.gz) = 3ad061b611d113e94d1c44fa3ce7aa2cf90c1d98 RMD160 (obexapp-1.4.12.tar.gz) = 60c33d242be4659bfbe81a767d3d22cd5c38a734 Size (obexapp-1.4.12.tar.gz) = 33179 bytes -SHA1 (patch-ac) = 7cae80c5a71fdd6cd97785dbf723aecf55e8cb2f +SHA1 (patch-ac) = 5134aa913f69f7e78ecccc47eef0a65e778eb273 SHA1 (patch-af) = cbab3674b8b5fabcddea20c350586986e834c29f diff --git a/comms/obexapp/patches/patch-ac b/comms/obexapp/patches/patch-ac index a2970ff5981..ceb39bac947 100644 --- a/comms/obexapp/patches/patch-ac +++ b/comms/obexapp/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.3 2007/05/22 18:53:56 plunky Exp $ +$NetBSD: patch-ac,v 1.4 2009/12/01 11:18:48 drochner Exp $ ---- util.c.orig 2007-05-21 19:57:51.000000000 +0100 +--- util.c.orig 2009-08-20 23:57:18.000000000 +0200 +++ util.c @@ -30,9 +30,9 @@ */ @@ -13,3 +13,72 @@ $NetBSD: patch-ac,v 1.3 2007/05/22 18:53:56 plunky Exp $ #include <iconv.h> #include <libgen.h> #include <limits.h> +@@ -43,6 +43,7 @@ + #include <string.h> + #include <time.h> + #include <unistd.h> ++#include <langinfo.h> + + #include <readline/readline.h> + #include <readline/history.h> +@@ -66,26 +67,12 @@ static iconv_t locale2utf16be = (iconv + int + obexapp_util_locale_init(void) + { +- int one = 1; + +- locale = setlocale(LC_CTYPE, ""); ++ setlocale(LC_CTYPE, ""); ++ locale = nl_langinfo(CODESET); + if (locale == NULL) + return (-1); + +- if (strcmp(locale, "ASCII") == 0 || +- strcmp(locale, "C") == 0 || +- strcmp(locale, "POSIX") == 0 || +- strcmp(locale, "US-ASCII") == 0) +- locale = "en_US.US-ASCII"; +- +- locale = strchr(locale, '.'); +- if (locale == NULL) +- return (-1); +- +- locale ++; +- if (locale[0] == '\0') +- return (-1); +- + utf16 = (strstr(locale, "UTF-16") != NULL)? 1 : 0; + + /* UTF-8 -> current locale */ +@@ -94,7 +81,6 @@ obexapp_util_locale_init(void) + return (-1); + + iconv(utf82locale, NULL, NULL, NULL, NULL); +- iconvctl(utf82locale, ICONV_SET_DISCARD_ILSEQ, &one); + + /* current locale -> UTF-8 */ + locale2utf8 = iconv_open("UTF-8", locale); +@@ -104,7 +90,6 @@ obexapp_util_locale_init(void) + } + + iconv(locale2utf8, NULL, NULL, NULL, NULL); +- iconvctl(locale2utf8, ICONV_SET_DISCARD_ILSEQ, &one); + + /* UTF-16BE -> current locale */ + utf16be2locale = iconv_open(locale, "UTF-16BE"); +@@ -114,7 +99,6 @@ obexapp_util_locale_init(void) + } + + iconv(utf16be2locale, NULL, NULL, NULL, NULL); +- iconvctl(utf16be2locale, ICONV_SET_DISCARD_ILSEQ, &one); + + /* current locale -> UTF-16BE */ + locale2utf16be = iconv_open("UTF-16BE", locale); +@@ -124,7 +108,6 @@ obexapp_util_locale_init(void) + } + + iconv(locale2utf16be, NULL, NULL, NULL, NULL); +- iconvctl(locale2utf16be, ICONV_SET_DISCARD_ILSEQ, &one); + + return (0); + } |