ports/122420: [UPDATE] Update archivers/unrar-iconv
Yarodin
yarodin at gmail.com
Thu Apr 3 15:20:02 UTC 2008
>Number: 122420
>Category: ports
>Synopsis: [UPDATE] Update archivers/unrar-iconv
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 03 15:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Yarodin
>Release: 6.3-RELEASE
>Organization:
>Environment:
>Description:
- Fix unicode support
- Add some little notes.
How to apply patch:
1) Put patch-unrar-iconv.txt to /usr/ports/archivers/
2) cd /usr/ports/archivers/ && patch -p <patch-unrar-iconv.txt && find /usr/ports/archivers/unrar-iconv/ -type f -name "*.orig" -exec rm -f {} \;
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- unrar-iconv.orig/Makefile 2008-02-17 01:13:28.000000000 +0500
+++ unrar-iconv/Makefile 2008-04-03 20:59:33.000000000 +0600
@@ -18,5 +18,7 @@
post-install:
@${ECHO_MSG} "===> Added iconv support, see new switches:"
@${ECHO_MSG} " la, ll and lo at \"unrar -?\""
+ @${ECHO_MSG} "===> REMEMBER!!!: Windows rar archives using old DOS encodings as internal encoding."
+ @${ECHO_MSG} " CP866 for russian lang for exmaple."
.include "${MASTERDIR}/Makefile"
--- unrar-iconv.orig/files/patch-iconv 2007-10-17 19:03:52.000000000 +0600
+++ unrar-iconv/files/patch-iconv 2008-04-03 21:15:46.000000000 +0600
@@ -152,10 +152,10 @@
#ifdef S_IFLNK
#define SAVE_LINKS
#endif
---- strfn.cpp Tue Oct 4 11:57:54 2005
-+++ strfn.cpp Mon Jan 16 18:04:41 2006
+--- strfn.cpp.orig 2007-09-10 17:49:28.000000000 +0600
++++ strfn.cpp 2008-04-03 21:15:08.000000000 +0600
@@ -22,23 +22,49 @@
-
+
void ExtToInt(const char *Src,char *Dest)
{
+#ifdef WITH_ICONV
@@ -163,23 +163,23 @@
+ ret = (size_t)(-1);
+ if (h_E2I != (iconv_t)(-1)) {
+ static size_t inbytesleft, outbytesleft;
-+
-+ inbytesleft = strlen(Src);
-+ outbytesleft = inbytesleft;
++ inbytesleft = strlen(Src)+1;
++ outbytesleft = NM;
+ ret = iconv(h_E2I, &Src, &inbytesleft, &Dest, &outbytesleft);
++ Dest[outbytesleft-inbytesleft]=NULL;
+ }
-+ if (ret == (size_t)(-1)) strcpy(Dest, Src);
-+#else /* !WITH_ICONV */
++ if (ret == (size_t)(-1)) strcpy(Dest, Src);
++#else /* !WITH_ICONV */
#if defined(_WIN_32)
CharToOem(Src,Dest);
#else
if (Dest!=Src)
strcpy(Dest,Src);
#endif
-+#endif /* !WITH_ICONV */
++#endif /* !WITH_ICONV */
}
-
-
+
+
void IntToExt(const char *Src,char *Dest)
{
+#ifdef WITH_ICONV
@@ -187,18 +187,18 @@
+ ret = (size_t)(-1);
+ if (h_I2E != (iconv_t)(-1)) {
+ static size_t inbytesleft, outbytesleft;
-+
-+ inbytesleft = strlen(Src);
-+ outbytesleft = inbytesleft;
++ inbytesleft = strlen(Src)+1;
++ outbytesleft = NM;
+ ret = iconv(h_I2E, &Src, &inbytesleft, &Dest, &outbytesleft);
++ Dest[outbytesleft-inbytesleft]=NULL;
+ }
-+ if (ret == (size_t)(-1)) strcpy(Dest, Src);
-+#else /* !WITH_ICONV */
++ if (ret == (size_t)(-1)) strcpy(Dest,Src);
++#else /* !WITH_ICONV */
#if defined(_WIN_32)
OemToChar(Src,Dest);
#else
if (Dest!=Src)
strcpy(Dest,Src);
#endif
-+#endif /* !WITH_ICONV */
++#endif /* !WITH_ICONV */
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list