From nobody@FreeBSD.org  Sat Sep 18 10:05:39 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD920106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2010 10:05:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 820CB8FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2010 10:05:39 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8IA5dgZ029476
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Sep 2010 10:05:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8IA5d2u029475;
	Sat, 18 Sep 2010 10:05:39 GMT
	(envelope-from nobody)
Message-Id: <201009181005.o8IA5d2u029475@www.freebsd.org>
Date: Sat, 18 Sep 2010 10:05:39 GMT
From: KOMATSU Shinichiro <koma2@lovepeers.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: archivers/unzip: Add patch to convert filename encoding to current locale.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150699
>Category:       ports
>Synopsis:       archivers/unzip: Add patch to convert filename encoding to current locale.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    ache
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 18 10:10:06 UTC 2010
>Closed-Date:    Mon Sep 20 06:15:16 UTC 2010
>Last-Modified:  Mon Sep 20 06:20:02 UTC 2010
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->ache 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Sep 18 10:10:13 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150699 
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Mon Sep 20 06:14:53 UTC 2010 
State-Changed-Why:  
Committed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150699 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150699: commit references a PR
Date: Mon, 20 Sep 2010 06:14:30 +0000 (UTC)

 ache        2010-09-20 06:14:25 UTC
 
   FreeBSD ports repository
 
   Modified files:
     archivers/unzip      Makefile distinfo 
   Log:
   Add optional (WITH_ICONV) patch to convert between local and OEM charsets.
   
   PR:             150699
   Submitted by:   KOMATSU Shinichiro <koma2@lovepeers.org>
   
   Revision  Changes    Path
   1.68      +10 -0     ports/archivers/unzip/Makefile
   1.18      +3 -0      ports/archivers/unzip/distinfo
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
