Date: Sat, 18 Sep 2010 10:05:39 GMT From: KOMATSU Shinichiro <koma2@lovepeers.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/150699: archivers/unzip: Add patch to convert filename encoding to current locale. Message-ID: <201009181005.o8IA5d2u029475@www.freebsd.org> Resent-Message-ID: <201009181010.o8IAA6mX005333@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 150699 >Category: ports >Synopsis: archivers/unzip: Add patch to convert filename encoding to current locale. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Sep 18 10:10:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: KOMATSU Shinichiro >Release: FreeBSD 7.3-RELEASE-p2 amd64 >Organization: >Environment: FreeBSD 7.3-RELEASE-p2 amd64 >Description: Zip files created on Japanese Windows XP contains filenames encoded in Shift-JIS, and filenames are garbled when extracted by unzip. I found the patch to fix this problem at the following location: https://bugs.archlinux.org/task/15256 This patch adds options "-O" and "-I" to specify encoding of filenames in zip files, and convert it to current locale using iconv. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/archivers/unzip/Makefile,v retrieving revision 1.67 diff -u -r1.67 Makefile --- Makefile 6 Nov 2009 05:18:58 -0000 1.67 +++ Makefile 16 Sep 2010 13:13:35 -0000 @@ -7,6 +7,7 @@ PORTNAME= unzip PORTVERSION= 6.0 +PORTREVISION= 1 CATEGORIES?= archivers MASTER_SITES= SF/infozip/UnZip%206.x%20%28latest%29/UnZip%20${PORTVERSION}/:main \ SF/infozip/UnZip%205.x%20and%20earlier/5.51/:unreduce @@ -36,6 +37,16 @@ LOCAL_UNZIP+= -DUSE_SMITH_CODE .endif +.if defined(WITH_ICONV) +PATCH_SITES= ${MASTER_SITE_LOCAL} +PATCH_SITE_SUBDIR= nork +PATCHFILES= unzip60-alt-iconv-utf8.patch +PATCH_DIST_STRIP= -p1 +USE_ICONV= yes +CFLAGS+= -I${LOCALBASE}/include -DNATIVE +MAKE_ARGS+= LFLAGS1="-L${LOCALBASE}/lib -liconv" +.endif + MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}" \ D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 Index: distinfo =================================================================== RCS file: /home/ncvs/ports/archivers/unzip/distinfo,v retrieving revision 1.17 diff -u -r1.17 distinfo --- distinfo 26 Oct 2009 13:27:24 -0000 1.17 +++ distinfo 16 Sep 2010 13:23:15 -0000 @@ -4,3 +4,6 @@ MD5 (unreduce_full.zip) = b7cde206d69b403e7551b9b0c25bd345 SHA256 (unreduce_full.zip) = 1f4d93d2250dc1a1d1d2b8aac09d9989d4f9dd2cb0967373bf41fdf5f108cec1 SIZE (unreduce_full.zip) = 2849 +MD5 (unzip60-alt-iconv-utf8.patch) = 4dcfb2084e9db5a3f411f470d92ab2a4 +SHA256 (unzip60-alt-iconv-utf8.patch) = 6abf9d5e538b948ddb43f11000162348ce46ac0fa93826e6c8edae4ffa488f00 +SIZE (unzip60-alt-iconv-utf8.patch) = 13369 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009181005.o8IA5d2u029475>