From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Feb 19 03:50:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC9D41065670 for ; Sun, 19 Feb 2012 03:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 90D158FC19 for ; Sun, 19 Feb 2012 03:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1J3o1lc043624 for ; Sun, 19 Feb 2012 03:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1J3o1rg043623; Sun, 19 Feb 2012 03:50:01 GMT (envelope-from gnats) Resent-Date: Sun, 19 Feb 2012 03:50:01 GMT Resent-Message-Id: <201202190350.q1J3o1rg043623@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Kozlov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 429BC1065672 for ; Sun, 19 Feb 2012 03:44:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CE05D8FC19 for ; Sun, 19 Feb 2012 03:44:02 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q1J3i209099691 for ; Sun, 19 Feb 2012 03:44:02 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q1J3i2iX099672; Sun, 19 Feb 2012 03:44:02 GMT (envelope-from nobody) Message-Id: <201202190344.q1J3i2iX099672@red.freebsd.org> Date: Sun, 19 Feb 2012 03:44:02 GMT From: Alex Kozlov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/165287: [update] converters/chmview various fixes, take maintainership X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 03:50:01 -0000 >Number: 165287 >Category: ports >Synopsis: [update] converters/chmview various fixes, take maintainership >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Feb 19 03:50:01 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Alex Kozlov >Release: RELENG_8 >Organization: private >Environment: >Description: - use chmlib-0.40 instead of embedded chmlib-0.19, remove patch-bb - improve Makefile, remove unnecessary do-install target - make WARNS=6 clean - remove ONLY_FOR_ARCH, new chmlib don't have such limitation - take maintainership >How-To-Repeat: >Fix: rm converters/chmview/files/patch-bb apply patch Patch attached with submission follows: Index: converters/chmview/Makefile @@ -7,27 +7,24 @@ PORTNAME= chmview DISTVERSION= 2.0b3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= converters textproc MASTER_SITES= SF/trexinc/CHMView/2.0%20beta%203 DISTNAME= CHMView_${DISTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= spam@rm-rf.kiev.ua COMMENT= Extractor from .chm files +LIB_DEPENDS= chm:${PORTSDIR}/misc/chmlib + USE_ZIP= yes -USE_DOS2UNIX= yes +USE_DOS2UNIX= chmview.c utf8.c utf8.h WRKSRC= ${WRKDIR}/src PLIST_FILES= bin/chmview MAKE_JOBS_SAFE= yes -ONLY_FOR_ARCHS= i386 amd64 - pre-patch: - @${CP} ${FILESDIR}/Makefile ${WRKSRC} - -do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/chmview ${PREFIX}/bin/ + @${CP} ${FILESDIR}/Makefile ${WRKSRC} .include Index: converters/chmview/files/Makefile @@ -1,27 +1,14 @@ -# -# $FreeBSD: ports/converters/chmview/files/Makefile,v 1.3 2007/03/05 12:15:12 rafan Exp $ -# -OBJDIR = . -EXEDIR = . -EXENAME = $(EXEDIR)/chmview - -CFLAGS += -DUNIX - -all: $(EXENAME) - -OBJS = $(OBJDIR)/chmview.o \ - $(OBJDIR)/chm_lib.o \ - $(OBJDIR)/lzx.o \ - $(OBJDIR)/utf8.o - -$(OBJDIR)/chmview.o: chmview.c chm_lib.h -$(OBJDIR)/chm_lib.o: chm_lib.c chm_lib.h lzx.h -$(OBJDIR)/utf8.o: utf8.c utf8.h -$(OBJDIR)/lzx.o: lzx.c lzx.h - -.c.o: - $(CC) $(CFLAGS) -c ${.IMPSRC} - -$(EXENAME): $(OBJS) - echo $(OBJS) - $(CC) $(LFLAGS) -o $(EXENAME) ${.ALLSRC} +BINDIR?= ${PREFIX}/bin + +CFLAGS+= -DUNIX -I${LOCALBASE}/include +LDADD+= -L${LOCALBASE}/lib -lchm + +WARNS?= 6 + +NO_MAN= yes + +PROG= chmview + +SRCS= chmview.c utf8.h utf8.c + +.include Index: converters/chmview/files/patch-aa @@ -1,7 +1,5 @@ -diff -ruN src.old/chmview.c src/chmview.c ---- src.old/chmview.c 2005-03-07 21:29:18.000000000 +0100 -+++ chmview.c 2008-08-18 14:39:39.000000000 +0200 -@@ -17,19 +17,33 @@ +Index: chmview.c +@@ -17,19 +17,47 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -9,6 +7,8 @@ #include +#endif + ++#include ++#include #include #include #include @@ -21,7 +21,8 @@ #include +#endif - #include "chm_lib.h" +-#include "chm_lib.h" ++#include #include "utf8.h" +#ifdef UNIX @@ -29,6 +30,18 @@ +#define MODE 0755 +#endif + ++char *pointtoname(char *path); ++void ReplaceIllegalChars(char *ptr); ++void extract(struct chmFile *c, struct chmUnitInfo *ui, ++ long extractwithoutpath); ++int _extract_callback_all(struct chmFile *c, struct chmUnitInfo *ui, ++ void *context); ++int _extract_callback_dir(struct chmFile *c, struct chmUnitInfo *ui, ++ void *context); ++int extractdir(struct chmFile *c, char *path, long extractwithoutpath); ++int _print_ui(struct chmFile *c __unused, struct chmUnitInfo *ui, ++ void *context __unused); ++ struct cb_data { - int extractwithoutpath; @@ -36,7 +49,7 @@ char *path; int pathlen; }; -@@ -44,6 +58,7 @@ +@@ -44,6 +72,7 @@ return p; } @@ -44,7 +57,7 @@ int makedir(char *path) { char *end; -@@ -75,6 +90,39 @@ +@@ -75,13 +104,45 @@ } return 1; } @@ -52,7 +65,7 @@ +static int makedir(char *path) +{ + char *slash; -+ int was_error, done, err; ++ int was_error, done; + + slash = path; + done = 0; @@ -84,7 +97,14 @@ const char ILLEGAL_SYMB[] = "<>:|?*\""; const char ILLEGAL_REPL[] = "()_!__'"; -@@ -94,7 +142,7 @@ + + void ReplaceIllegalChars(char *ptr) + { +- char *org = ptr; + while ( *ptr ) + { + const char *zz; +@@ -94,15 +155,17 @@ } } @@ -93,7 +113,8 @@ { LONGINT64 length=0; char *outbuf=NULL; -@@ -103,6 +151,9 @@ +- char *p; + FILE *f; char fullpath[CHM_MAX_PATHLEN*2+1]; char target[CHM_MAX_PATHLEN*2+1]; wchar_t temp[CHM_MAX_PATHLEN+1]; @@ -103,7 +124,7 @@ if (ui->length) { -@@ -116,13 +167,32 @@ +@@ -116,13 +179,32 @@ return -1; } } @@ -136,7 +157,7 @@ ReplaceIllegalChars(target); strcat(fullpath,extractwithoutpath?pointtoname(target):(target[0]=='/'?target+1:target)); if (!extractwithoutpath) -@@ -147,26 +217,30 @@ +@@ -147,30 +229,38 @@ return 0; } @@ -163,23 +184,41 @@ printf("OK\n"); } - int _extract_callback_all(struct chmFile *c, struct chmUnitInfo *ui, void *context) +-int _extract_callback_all(struct chmFile *c, struct chmUnitInfo *ui, void *context) ++int _extract_callback_all(struct chmFile *c, ++ struct chmUnitInfo *ui, ++ void *context) { - extract(c,ui,(int)context); + extract(c,ui,(long)context); return CHM_ENUMERATOR_CONTINUE; } -@@ -180,7 +254,7 @@ +-int _extract_callback_dir(struct chmFile *c, struct chmUnitInfo *ui, void *context) ++int _extract_callback_dir(struct chmFile *c, ++ struct chmUnitInfo *ui, ++ void *context) + { + struct cb_data *data = (struct cb_data *)context; + if (!_strnicmp(ui->path,data->path,data->pathlen)) +@@ -180,29 +270,35 @@ return CHM_ENUMERATOR_CONTINUE; } -extractdir(struct chmFile *c, char *path, int extractwithoutpath) -+extractdir(struct chmFile *c, char *path, long extractwithoutpath) ++int extractdir(struct chmFile *c, char *path, long extractwithoutpath) { struct cb_data data = {extractwithoutpath,path,strlen(path)}; chm_enumerate(c,CHM_ENUMERATE_ALL,_extract_callback_dir,(void *)&data); -@@ -193,7 +267,11 @@ + return 0; + } + +-int _print_ui(struct chmFile *c, struct chmUnitInfo *ui, void *context) ++int _print_ui(struct chmFile *c __unused, ++ struct chmUnitInfo *ui, ++ void *context __unused) + { + char target[CHM_MAX_PATHLEN*2+1]; wchar_t temp[CHM_MAX_PATHLEN+1]; decode_UTF8(temp,ui->path); @@ -191,7 +230,27 @@ if ((target)[0] == '/') { -@@ -243,6 +321,9 @@ +- printf("%12.12u ",ui->length); ++ printf("%12.12llu ",ui->length); + printf("%s\n",target); + } + else + { +- printf("%12.12u ",ui->length); ++ printf("%12.12llu ",ui->length); + printf("/"); + printf("%s\n",target); + } +@@ -231,8 +327,6 @@ + struct chmFile *c; + char *infname; + char *command; +- FILE *fh; +- int i; + struct chmUnitInfo ui; + + if (argc < 3) +@@ -243,6 +337,9 @@ infname = argv[2]; @@ -201,7 +260,7 @@ c = chm_open(infname); if (!c) exit(-1); -@@ -265,7 +346,7 @@ +@@ -265,7 +362,7 @@ char target[CHM_MAX_PATHLEN*2+1]; wchar_t temp[CHM_MAX_PATHLEN+1]; int status; @@ -210,7 +269,7 @@ if (argc == 4) { -@@ -305,7 +386,11 @@ +@@ -305,7 +402,11 @@ strcat(target,name+1); else strcat(target,name); >Release-Note: >Audit-Trail: >Unformatted: