upgrade to 0.38

This commit is contained in:
Ying-Chieh Liao 2006-06-19 01:34:37 +00:00
parent 1c5505fe93
commit 0096ad9ff0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=165727
6 changed files with 23 additions and 78 deletions

View file

@ -7,19 +7,18 @@
#
PORTNAME= chmlib
PORTVERSION= 0.37.4
PORTVERSION= 0.38
CATEGORIES= misc
MASTER_SITES= http://66.93.236.84/~jedwin/projects/chmlib/
EXTRACT_SUFX= .tgz
MASTER_SITES= http://morte.jedrea.com/~jedwin/projects/chmlib/
MAINTAINER= ports@FreeBSD.org
COMMENT= A library for dealing with Microsoft ITSS/CHM format files
USE_BZIP2= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-io64 --disable-pread --exec-prefix=${PREFIX}
USE_GMAKE= yes
INSTALLS_SHLIB= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-0.37
post-patch:
@${REINPLACE_CMD} -e "s,-lpthread,${PTHREAD_LIBS}," ${WRKSRC}/configure

View file

@ -1,3 +1,3 @@
MD5 (chmlib-0.37.4.tgz) = 458c14c7a38c441263e6984924a05b24
SHA256 (chmlib-0.37.4.tgz) = 9c6dde31330b77e760600c187c8279f38bc8b7fada8e03bb9cf5cfd9f91d2aab
SIZE (chmlib-0.37.4.tgz) = 363315
MD5 (chmlib-0.38.tar.bz2) = d72661526aaea377ed30e9f58a086964
SHA256 (chmlib-0.38.tar.bz2) = 086a8a5d12c1dbacaf4ccd74b5a506dc834573c2a49e2ed6cfb2bd9890834b59
SIZE (chmlib-0.38.tar.bz2) = 262494

View file

@ -1,69 +0,0 @@
--- Makefile.in.orig Wed Oct 26 16:13:45 2005
+++ Makefile.in Thu Oct 27 21:33:48 2005
@@ -30,7 +31,7 @@
src/%.lo: $(srcdir)/src/%.c
${LIBTOOL} --mode=compile ${CC} -c -o $@ $^ ${CFLAGS}
-src/libchm.la: src/chm_lib.lo src/lzx.lo
+src/libchm.la: src/chm_lib.lo src/lzx.lo src/az_chmlib_add.lo
${LIBTOOL} --mode=link ${CC} -o $@ $^ ${LDFLAGS} -rpath $(libdir)
install: src/libchm.la
patch-az_chmlib_add.c
--- /dev/null Fri Feb 25 18:33:00 2005
+++ src/az_chmlib_add.c Fri Feb 25 18:29:45 2005
@@ -0,0 +1,54 @@
+#include <string.h>
+#include "chm_lib.h"
+
+/*
+ * callback function for enumerate API
+ */
+int _get_name(struct chmFile *h,
+ chmUnitInfo *ui,
+ void *context)
+{
+ int i;
+
+
+ chm_dir *dirp = (chm_dir *)context;
+
+ dirp->info=realloc(dirp->info,(dirp->nentries+1)*sizeof (char*));
+
+ dirp->info[dirp->nentries] = malloc(sizeof(ui->path));
+ strcpy(dirp->info[dirp->nentries], ui->path);
+
+ dirp->nentries++;
+ return CHM_ENUMERATOR_CONTINUE;
+}
+
+chm_dir get_names(struct chmFile *h)
+//note: you should free() dir.info and all dir.info[i] in caller
+{
+ chm_dir dir;
+
+ dir.nentries=0;
+ dir.info = NULL;
+
+ if (! chm_enumerate(h,
+ CHM_ENUMERATE_ALL,
+ _get_name,
+ (void *)&dir))
+ printf(" *** ERROR ***\n");
+
+ return dir;
+}
+
+
+int main()
+{
+ int i;
+
+ struct chmFile *h = chm_open("/home/az/new/txt/chm/reg.chm");
+ chm_dir dir=get_names(h);
+ for(i=0;i<dir.nentries;i++)
+ printf("%d: %s\n",i,dir.info[i]);
+
+ return 0;
+}
+

View file

@ -0,0 +1,15 @@
--- ltmain.sh.orig Mon Jun 19 09:26:24 2006
+++ ltmain.sh Mon Jun 19 09:26:40 2006
@@ -6003,10 +6003,12 @@
fi
# Install the pseudo-library for information purposes.
+ if /usr/bin/false ; then
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
$show "$install_prog $instname $destdir/$name"
$run eval "$install_prog $instname $destdir/$name" || exit $?
+ fi
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"

View file

@ -4,4 +4,4 @@ now, it is a very simple library, but sufficient for dealing with all of the
into this particular file format, even a small library is able to gain
reasonably good performance indexing into ITSS archives.
WWW: http://66.93.236.84/~jedwin/projects/chmlib/
WWW: http://morte.jedrea.com/~jedwin/projects/chmlib/

View file

@ -1,5 +1,5 @@
include/chm_lib.h
include/lzx.h
lib/libchm.a
lib/libchm.la
lib/libchm.so
lib/libchm.so.0