pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/hanzim DESTDIR support. Fix problems building the...
details: https://anonhg.NetBSD.org/pkgsrc/rev/519508649621
branches: trunk
changeset: 603201:519508649621
user: dholland <dholland%pkgsrc.org@localhost>
date: Mon Apr 30 04:01:08 2012 +0000
description:
DESTDIR support. Fix problems building the database.
diffstat:
misc/hanzim/Makefile | 4 +++-
misc/hanzim/distinfo | 8 +++++---
misc/hanzim/patches/patch-aa | 32 +++++++++++++++++++++-----------
misc/hanzim/patches/patch-ab | 31 ++++++++++++++++++++++++++++---
misc/hanzim/patches/patch-hanzim_h | 15 +++++++++++++++
misc/hanzim/patches/patch-hutil_c | 15 +++++++++++++++
6 files changed, 87 insertions(+), 18 deletions(-)
diffs (166 lines):
diff -r a3221a800012 -r 519508649621 misc/hanzim/Makefile
--- a/misc/hanzim/Makefile Mon Apr 30 03:19:49 2012 +0000
+++ b/misc/hanzim/Makefile Mon Apr 30 04:01:08 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2010/10/03 13:03:51 obache Exp $
+# $NetBSD: Makefile,v 1.8 2012/04/30 04:01:08 dholland Exp $
#
DISTNAME= hanzim-1.3
@@ -11,6 +11,8 @@
HOMEPAGE= http://kamares.ucsd.edu/~arobert/hanzim.html
COMMENT= Chinese character learning-aid program
+PKG_DESTDIR_SUPPORT= user-destdir
+
WRKSRC= ${WRKDIR}/Hanzim
BUILD_TARGET= hanzim
diff -r a3221a800012 -r 519508649621 misc/hanzim/distinfo
--- a/misc/hanzim/distinfo Mon Apr 30 03:19:49 2012 +0000
+++ b/misc/hanzim/distinfo Mon Apr 30 04:01:08 2012 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.2 2007/12/27 15:37:44 joerg Exp $
+$NetBSD: distinfo,v 1.3 2012/04/30 04:01:08 dholland Exp $
SHA1 (hanzim-1.3.tgz) = f81cc5a5b382520f4304815f2e59488731cae9a6
RMD160 (hanzim-1.3.tgz) = 650b65017fdb271554995f886fa79f60586b3de8
Size (hanzim-1.3.tgz) = 570776 bytes
-SHA1 (patch-aa) = 98b7ef24a3a87d5ef1f7039999eaf888f254dc70
-SHA1 (patch-ab) = cbbf10a46d6c2267074e30bf1684f7332f847d50
+SHA1 (patch-aa) = 6dee6654a2bda3ab2e94f7f641fe9ce63d92bc90
+SHA1 (patch-ab) = 5a6326b0bb735b5c816680726d74fc272f5ad169
+SHA1 (patch-hanzim_h) = d88fedc60b180e7aa3baa8a006b0f42e99e0c7fc
+SHA1 (patch-hutil_c) = fad3cda984a44fc125fff16f1f266b16cb3a73e2
diff -r a3221a800012 -r 519508649621 misc/hanzim/patches/patch-aa
--- a/misc/hanzim/patches/patch-aa Mon Apr 30 03:19:49 2012 +0000
+++ b/misc/hanzim/patches/patch-aa Mon Apr 30 04:01:08 2012 +0000
@@ -1,6 +1,9 @@
-$NetBSD: patch-aa,v 1.2 2007/12/27 15:37:44 joerg Exp $
+$NetBSD: patch-aa,v 1.3 2012/04/30 04:01:08 dholland Exp $
---- Makefile.orig 2002-03-20 13:59:19.000000000 +0800
+- configure for pkgsrc
+- destdir support
+
+--- Makefile.orig 2002-03-20 05:59:19.000000000 +0000
+++ Makefile
@@ -6,11 +6,11 @@
@@ -57,7 +60,7 @@
DIST_FILES = Hanzim/hanzim.h Hanzim/hgb_utf.h \
Hanzim/hanzim.c Hanzim/hanwin.c Hanzim/hinit.c Hanzim/hutil.c \
-@@ -87,13 +87,13 @@ DIST_FILES = Hanzim/hanzim.h Hanzim/hgb_
+@@ -87,16 +87,17 @@ DIST_FILES = Hanzim/hanzim.h Hanzim/hgb_
$(CC) $(CFLAGS) -c hutil.c
install : hanzim
@@ -66,14 +69,21 @@
- $(INSTALL) -m 0755 -d $(DOCDIR)
- $(INSTALL) -m 0644 hanzim.doc $(DOCDIR)
- $(INSTALL) -m 0755 -d $(LIBDIR)
-+ $(BSD_INSTALL_PROGRAM) hanzim $(BINDIR)
-+ $(BSD_INSTALL_MAN) hanzim.man $(MANDIR)/man1/hanzim.1
-+ $(BSD_INSTALL_DATA_DIR) $(DOCDIR)
-+ $(BSD_INSTALL_DATA) hanzim.doc $(DOCDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(LIBDIR)
- cd Data ; \
+- cd Data ; \
- $(INSTALL) -m 0644 hanwin.tcl fonts.unix fonts.windows \
++ $(BSD_INSTALL_PROGRAM) hanzim $(DESTDIR)$(BINDIR)
++ $(BSD_INSTALL_MAN) hanzim.man $(DESTDIR)$(MANDIR)/man1/hanzim.1
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DOCDIR)
++ $(BSD_INSTALL_DATA) hanzim.doc $(DESTDIR)$(DOCDIR)
++ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(LIBDIR)
++ cd Data && \
+ $(BSD_INSTALL_DATA) hanwin.tcl fonts.unix \
zidianf.gb zidianfl.b5 bushou.gb \
- cidianf.gb sanzicidianf.gb parts.gb $(LIBDIR)
- $(BINDIR)/hanzim -buildDB
+- cidianf.gb sanzicidianf.gb parts.gb $(LIBDIR)
+- $(BINDIR)/hanzim -buildDB
++ cidianf.gb sanzicidianf.gb parts.gb \
++ $(DESTDIR)$(LIBDIR)
++ HANZIM_LIB=$(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)/hanzim -buildDB
+
+ uninstall :
+ $(RM) $(BINDIR)/hanzim
diff -r a3221a800012 -r 519508649621 misc/hanzim/patches/patch-ab
--- a/misc/hanzim/patches/patch-ab Mon Apr 30 03:19:49 2012 +0000
+++ b/misc/hanzim/patches/patch-ab Mon Apr 30 04:01:08 2012 +0000
@@ -1,8 +1,33 @@
-$NetBSD: patch-ab,v 1.1.1.1 2006/01/16 13:18:29 rxg Exp $
+$NetBSD: patch-ab,v 1.2 2012/04/30 04:01:08 dholland Exp $
+
+- honor HANZIM_LIB when doing -buildDB, for destdir support
+- use time_t properly
---- hanzim.c.orig Wed Jun 26 17:26:48 2002
+--- hanzim.c.orig 2002-03-20 06:34:31.000000000 +0000
+++ hanzim.c
-@@ -460,10 +460,10 @@
+@@ -164,13 +164,19 @@ int
+ buildOnly(char *dst, char *key, char *nextArg)
+ {
+ char fname[100];
+- char datadir[80];
++ char datadir[400];
++ char *ev;
+
+ fprintf(stderr,"Hanzim: (re)building database...\n");
+
+ /* set datadir to LIBDIR; in future should allow simultaneous use of
+ '-db' and '-buildDB' */
+- strcpy(datadir,LIBDIR);
++ ev = getenv("HANZIM_LIB");
++ if (ev != NULL && strlen(ev) < sizeof(datadir)) {
++ strcpy(datadir, ev);
++ } else {
++ strcpy(datadir,LIBDIR);
++ }
+
+ /* This code a subset of what occurs in db_init() below. */
+ if (!init_vars(datadir)) {
+@@ -460,10 +466,10 @@ db_init(char *datadir, Tcl_Interp *inter
struct _timeb tp;
_ftime(&tp);
#else
diff -r a3221a800012 -r 519508649621 misc/hanzim/patches/patch-hanzim_h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/hanzim/patches/patch-hanzim_h Mon Apr 30 04:01:08 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-hanzim_h,v 1.1 2012/04/30 04:01:08 dholland Exp $
+
+- Avoid overflows indexing own data file.
+
+--- hanzim.h~ 2002-03-20 06:31:28.000000000 +0000
++++ hanzim.h
+@@ -27,7 +27,7 @@
+ /* max number of characters with same pronunciation */
+ #define MAXPCHAR 56
+ /* max number of pronunciations for one character */
+-#define MAXCPRON 5
++#define MAXCPRON 19
+ /* max number of characters one character will be remainder of */
+ #define MAXREMOF 25
+ /* number of radicals (depends on file "bushou.gb") */
diff -r a3221a800012 -r 519508649621 misc/hanzim/patches/patch-hutil_c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/hanzim/patches/patch-hutil_c Mon Apr 30 04:01:08 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-hutil_c,v 1.1 2012/04/30 04:01:08 dholland Exp $
+
+- Use ctype.h functions correctly; fixes problems reading in the data files.
+
+--- hutil.c~ 2001-03-29 07:50:51.000000000 +0000
++++ hutil.c
+@@ -207,7 +207,7 @@ getnextline(FILE *fp, char *line, int ma
+ }
+
+ /*read in line*/
+- while(isspace(c)) c=getc(fp); /* skip any indentation */
++ while(isascii((u_char)c) && isspace((u_char)c)) c=getc(fp); /* skip any indentation */
+ for (tpos=line;(c!='\n') && (++numRead < maxlen);c=getc(fp))
+ *tpos++ = c;
+
Home |
Main Index |
Thread Index |
Old Index