[149448] trunk/dports/textproc
raimue at macports.org
raimue at macports.org
Tue Jun 21 03:06:24 PDT 2016
Revision: 149448
https://trac.macports.org/changeset/149448
Author: raimue at macports.org
Date: 2016-06-21 03:06:24 -0700 (Tue, 21 Jun 2016)
Log Message:
-----------
textproc/epwutil:
New port, EPWING dictionary utilities, closes #51396
Added Paths:
-----------
trunk/dports/textproc/epwutil/
trunk/dports/textproc/epwutil/Portfile
trunk/dports/textproc/epwutil/files/
trunk/dports/textproc/epwutil/files/patch-catdump-getline.diff
Added: trunk/dports/textproc/epwutil/Portfile
===================================================================
--- trunk/dports/textproc/epwutil/Portfile (rev 0)
+++ trunk/dports/textproc/epwutil/Portfile 2016-06-21 10:06:24 UTC (rev 149448)
@@ -0,0 +1,45 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name epwutil
+version 1.1
+categories textproc
+platforms darwin
+maintainers madlon-kay.com:aaron+macports openmaintainer
+license public-domain
+
+description EPWING dictionary utilities
+
+long_description A package of utilities for creating and manipulating \
+ EPWING-format dictionaries. Includes: bookinfo (for \
+ managing Book entries), catdump (for converting Catalogs \
+ files), and squeeze (for compressing dictionaries).
+
+homepage http://openlab.jp/edict/
+master_sites http://openlab.jp/edict/epwutil/
+
+checksums rmd160 7f00f92fc116c17b2364cac7a1ba9b6d10a92682 \
+ sha256 a45c4998a7b4fc0c3c9ad5eeadc24faa3517432bec46d9980b0fe691504ae9fb
+
+use_configure no
+
+variant universal {}
+
+patch.pre_args -p1
+patchfiles patch-catdump-getline.diff
+
+build.args CC="${configure.cc} [get_canonical_archflags cc]"
+build.cmd make -f makefile.unx
+
+pre-build {
+ foreach fileName [glob ${build.dir}/*.c] {
+ exec iconv -f euc-jp -t utf-8 $fileName > $fileName-fixed
+ file rename -force $fileName-fixed $fileName
+ }
+}
+
+destroot {
+ xinstall -W ${worksrcpath} bookinfo catdump squeeze ${destroot}${prefix}/bin/
+}
Property changes on: trunk/dports/textproc/epwutil/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/textproc/epwutil/files/patch-catdump-getline.diff
===================================================================
--- trunk/dports/textproc/epwutil/files/patch-catdump-getline.diff (rev 0)
+++ trunk/dports/textproc/epwutil/files/patch-catdump-getline.diff 2016-06-21 10:06:24 UTC (rev 149448)
@@ -0,0 +1,71 @@
+From 6981c596ece878ff581556a719608513f88208ae Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto at cante.net>
+Date: Sat, 9 Jan 2010 20:40:44 +0200
+Subject: [PATCH] Rename getline() to getline2() to avoid clash
+
+Signed-off-by: Jari Aalto <jari.aalto at cante.net>
+---
+ catdump.c | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/catdump.c b/catdump.c
+index b40bb27..8874db8 100644
+--- a/catdump.c
++++ b/catdump.c
+@@ -201,7 +201,7 @@ void outhex();
+ void outstr();
+ void outjstr();
+ int undump();
+-uchr *getline();
++uchr *getline2(); /* getline() is declared in /usr/include/stdio.h */
+ uchr *getvalue();
+ int gethex();
+ int hexdigit();
+@@ -561,7 +561,7 @@ char *txtfile, *catalog;
+ err = 0;
+ line = 0;
+
+- if (getline(buf, fp) == NULL ||
++ if (getline2(buf, fp) == NULL ||
+ strncmp(buf, CAT_ENTRY, strlen(CAT_ENTRY))) {
+ fprintf(stderr, "ERR: \xB9\xE0\xCC\xDC %s \xA4\xAC\xA4\xA2\xA4\xEA\xA4ޤ\xBB\xA4\xF3\n", CAT_ENTRY);
+ fclose(fp);
+@@ -571,7 +571,7 @@ char *txtfile, *catalog;
+ st = 0;
+ hdr = (HDR_T *)catbuf;
+ mask = 0L;
+- while (getline(buf, fp) != NULL && *buf != '[') {
++ while (getline2(buf, fp) != NULL && *buf != '[') {
+ if ((p = getvalue(buf)) == NULL) {
+ fprintf(stderr, "ERR: line %d: \xB9\xBDʸ\xA4˸\xED\xA4꤬\xA4\xA2\xA4\xEA\xA4ޤ\xB9\n", line);
+ err++;
+@@ -666,7 +666,7 @@ char *txtfile, *catalog;
+ if (strncmp(buf, BOOK_ENTRY, strlen(BOOK_ENTRY))) {
+ fprintf(stderr, "ERR: line %d: \xC9\xD4\xCC\xC0\xA4ʹ\xE0\xCCܤǤ\xB9(%s)\n", line, buf);
+ err++;
+- while (getline(buf, fp) != NULL && *buf != '[')
++ while (getline2(buf, fp) != NULL && *buf != '[')
+ ;
+ if (*buf == '\0')
+ break;
+@@ -680,7 +680,7 @@ char *txtfile, *catalog;
+ break;
+ }
+ mask = 0;
+- while (getline(buf, fp) != NULL && *buf != '[') {
++ while (getline2(buf, fp) != NULL && *buf != '[') {
+ if ((p = getvalue(buf)) == NULL) {
+ fprintf(stderr, "ERR: line %d: \xB9\xBDʸ\xA4˸\xED\xA4꤬\xA4\xA2\xA4\xEA\xA4ޤ\xB9\n", line);
+ err++;
+@@ -917,7 +917,7 @@ char *txtfile, *catalog;
+ }
+
+ uchr *
+-getline(buf, fp)
++getline2(buf, fp)
+ uchr *buf;
+ FILE *fp;
+ {
+--
+1.6.5
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160621/570d63c9/attachment.html>
More information about the macports-changes
mailing list