diff --git a/misc/chmlib/Makefile b/misc/chmlib/Makefile index 23dd1c95ebe5..f5d819186f14 100644 --- a/misc/chmlib/Makefile +++ b/misc/chmlib/Makefile @@ -1,19 +1,22 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= chmlib PORTVERSION= 0.40 PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= http://www.jedrea.com/chmlib/ MAINTAINER= ports@FreeBSD.org COMMENT= Library for dealing with Microsoft ITSS/CHM format files +LICENSE= LGPL21 +LICENSE_FILE= ${WRKSRC}/COPYING + GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-io64 --disable-pread --exec-prefix=${PREFIX} --disable-static --enable-examples INSTALL_TARGET= install-strip USES= gmake libtool tar:bzip2 USE_LDCONFIG= yes .include diff --git a/misc/chmlib/files/patch-chm_lib.c b/misc/chmlib/files/patch-chm_lib.c index bc32cdd9d069..5d336ab7ad97 100644 --- a/misc/chmlib/files/patch-chm_lib.c +++ b/misc/chmlib/files/patch-chm_lib.c @@ -1,20 +1,20 @@ ---- src/chm_lib.c.orig Tue Apr 8 10:33:30 2003 -+++ src/chm_lib.c Tue Apr 8 10:40:56 2003 -@@ -156,6 +156,17 @@ +--- src/chm_lib.c.orig 2009-05-23 14:43:31 UTC ++++ src/chm_lib.c +@@ -149,6 +149,17 @@ typedef unsigned __int32 UInt32; typedef __int64 Int64; typedef unsigned __int64 UInt64; +/* FreeBSD */ +#elif __FreeBSD__ +#include +typedef unsigned char UChar; +typedef int16_t Int16; +typedef uint16_t UInt16; +typedef int32_t Int32; +typedef uint32_t UInt32; +typedef int64_t Int64; +typedef uint64_t UInt64; + /* I386, 32-bit, non-Windows */ /* Sparc */ /* MIPS */ diff --git a/misc/chmlib/files/patch-chm_lib.h b/misc/chmlib/files/patch-chm_lib.h index b32ffd4f3e82..e88a115ce0f2 100644 --- a/misc/chmlib/files/patch-chm_lib.h +++ b/misc/chmlib/files/patch-chm_lib.h @@ -1,25 +1,23 @@ ---- src/chm_lib.h.orig Fri Feb 25 21:26:09 2005 -+++ src/chm_lib.h Fri Feb 25 21:26:57 2005 -@@ -78,6 +78,12 @@ +--- src/chm_lib.h.orig 2009-05-23 14:43:31 UTC ++++ src/chm_lib.h +@@ -82,6 +82,12 @@ struct chmUnitInfo char path[CHM_MAX_PATHLEN+1]; }; +typedef struct chmUnitInfo chmUnitInfo; +typedef struct chm_dir { + int nentries; + char **info; +} chm_dir; + /* open an ITS archive */ #ifdef PPC_BSTR /* RWE 6/12/2003 */ -@@ -133,6 +139,7 @@ +@@ -137,6 +143,7 @@ int chm_enumerate_dir(struct chmFile *h, CHM_ENUMERATOR e, void *context); +chm_dir get_names(struct chmFile *h); #ifdef __cplusplus } #endif - -