aboutsummaryrefslogtreecommitdiff
path: root/japanese/plain2
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2011-10-01 08:01:54 +0000
committerHiroki Sato <hrs@FreeBSD.org>2011-10-01 08:01:54 +0000
commite973d1d25946aff98c94509a15d606e0f4bdfbb8 (patch)
treec13ec18ad4b3fae8a16d536acbceaad440b5893e /japanese/plain2
parent0b5e43518939628fd537f59d50adf5134cefd20b (diff)
downloadports-e973d1d25946aff98c94509a15d606e0f4bdfbb8.tar.gz
ports-e973d1d25946aff98c94509a15d606e0f4bdfbb8.zip
- Resurrect japanese/plain2 and update maintainership.
- Fix CFLAGS. - Use %%DATADIR%% in pkg-plist. PR: ports/161141
Notes
Notes: svn path=/head/; revision=282726
Diffstat (limited to 'japanese/plain2')
-rw-r--r--japanese/plain2/Makefile43
-rw-r--r--japanese/plain2/distinfo4
-rw-r--r--japanese/plain2/files/patch-src-Makefile24
-rw-r--r--japanese/plain2/files/patch-src::macro.c31
-rw-r--r--japanese/plain2/files/patch-src__macro.h17
-rw-r--r--japanese/plain2/pkg-descr17
6 files changed, 136 insertions, 0 deletions
diff --git a/japanese/plain2/Makefile b/japanese/plain2/Makefile
new file mode 100644
index 000000000000..a8062e16118e
--- /dev/null
+++ b/japanese/plain2/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: plain2
+# Date created: 20 April 1997
+# Whom: nkazushi@highway.or.jp
+#
+# $FreeBSD$
+#
+
+PORTNAME= plain2
+PORTVERSION= 2.54.1
+PORTREVISION= 2
+CATEGORIES= japanese textproc
+MASTER_SITES= LOCAL
+MASTER_SITE_SUBDIR= hrs
+DISTNAME= ${PORTNAME}_${PORTVERSION:R}p${PORTVERSION:E}.orig
+
+PATCH_SITES= ${MASTER_SITES}
+PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR}
+PATCHFILES= ${PORTNAME}_${PORTVERSION:R}p${PORTVERSION:E}-4.2.diff.gz
+PATCH_DIST_STRIP= -p1
+
+MAINTAINER= turutani@scphys.kyoto-u.ac.jp
+COMMENT= A text converter from plain to any format
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}p${PORTVERSION:E}.orig
+BUILD_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}p${PORTVERSION:E}.orig/src
+PLIST_FILES= bin/plain2
+PORTDATA= OHP.p2 OHP_t.p2 header.p2 header_t.p2 jbook.p2 supsnum.p2
+
+CFLAGS+= -DBSD -DKANJI -DPICTURE -DHTML
+ALL_TARGET= ${PORTNAME}
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|/usr/lib/plain2|${DATADIR}|g' ${BUILD_WRKSRC}/plain2.h
+
+do-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${PREFIX}/bin
+.if !defined(NOPORTDATA)
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/*.p2 ${DATADIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/japanese/plain2/distinfo b/japanese/plain2/distinfo
new file mode 100644
index 000000000000..465402944fbb
--- /dev/null
+++ b/japanese/plain2/distinfo
@@ -0,0 +1,4 @@
+SHA256 (plain2_2.54p1.orig.tar.gz) = 2364b26b1b8781413db5eaad428d4862c84d64b62b4918827ce0689a168cb18e
+SIZE (plain2_2.54p1.orig.tar.gz) = 233513
+SHA256 (plain2_2.54p1-4.2.diff.gz) = b9dbd84b4abf6db7e5722f2990987a592021f2815cb73fa0a69dbc8a50fbe52d
+SIZE (plain2_2.54p1-4.2.diff.gz) = 78135
diff --git a/japanese/plain2/files/patch-src-Makefile b/japanese/plain2/files/patch-src-Makefile
new file mode 100644
index 000000000000..d1c807891c7b
--- /dev/null
+++ b/japanese/plain2/files/patch-src-Makefile
@@ -0,0 +1,24 @@
+--- src/Makefile.orig 2011-10-01 00:07:58.000000000 +0900
++++ src/Makefile 2011-10-01 00:08:17.000000000 +0900
+@@ -12,8 +12,8 @@
+
+ DEFINES=-DKANJI -DPICTURE -DHTML
+
+-CC=gcc
+-CFLAGS= -fwritable-strings ${DEFINES} -DBSD -DDEBUG -O2 -s
++CC?=gcc
++CFLAGS?= -fwritable-strings ${DEFINES} -DBSD -DDEBUG -O2 -s
+
+ #CC=cc
+ #CFLAGS= -O -fwritable-strings ${DEFINES} -DBSD -DDEBUG
+@@ -33,8 +33,8 @@
+ OBJS_KANJI=roffout.o analyze.o table.o title.o picture.o ftitle.o
+
+ HDRS=plain2.h table.h picture.h kanji.h
+-LIBS=
+-LDFLAGS=
++LIBS?=
++LDFLAGS?=
+
+ plain2: ${OBJS_NOKANJI} ${OBJS_KANJI}
+ ${CC} ${CFLAGS} ${LDFLAGS} -o plain2 ${OBJS_NOKANJI} ${OBJS_KANJI} ${LIBES}
diff --git a/japanese/plain2/files/patch-src::macro.c b/japanese/plain2/files/patch-src::macro.c
new file mode 100644
index 000000000000..aa8e9b3e65c2
--- /dev/null
+++ b/japanese/plain2/files/patch-src::macro.c
@@ -0,0 +1,31 @@
+--- src/macro.c.orig Sat Oct 18 23:46:14 2003
++++ src/macro.c Sat Oct 18 23:47:36 2003
+@@ -8,7 +8,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "plain2.h"
+ #include "macro.h"
+
+@@ -189,9 +189,7 @@
+ buf++;
+ }
+ }
+-putMacro(macroNum, va_alist)
+-int macroNum;
+-va_dcl
++putMacro(int macroNum, char *fmt, ...)
+ {
+ va_list ap;
+ union macroArg {
+@@ -226,7 +224,7 @@
+ }
+ mip = mip->cmac_next;
+ }
+- va_start(ap);
++ va_start(ap, fmt);
+ for (i = 1; i <= maxarg; i++) {
+ switch(argtype[i]) {
+ case ATYPE_VOID:
diff --git a/japanese/plain2/files/patch-src__macro.h b/japanese/plain2/files/patch-src__macro.h
new file mode 100644
index 000000000000..e0b960a3c406
--- /dev/null
+++ b/japanese/plain2/files/patch-src__macro.h
@@ -0,0 +1,17 @@
+--- src/macro.h.orig 2009-03-01 20:11:52.000000000 +0800
++++ src/macro.h 2009-03-01 20:12:31.000000000 +0800
+@@ -2,6 +2,7 @@
+ * Copyright (C) 1992,1993 NEC Corporation.
+ * $Id: macro.h,v 2.6 1994/04/19 10:16:49 uchida Exp $ (NEC)
+ */
++#define MAX_MACRO_LEN 320
+ #define MACRO_MAXARG 10
+
+ #define M_DOC_BEGIN 0
+@@ -74,5 +75,5 @@
+
+ struct macDefs {
+ int mdef_number;
+- char *mdef_def;
++ char mdef_def[MAX_MACRO_LEN];
+ };
diff --git a/japanese/plain2/pkg-descr b/japanese/plain2/pkg-descr
new file mode 100644
index 000000000000..7df050a3d5fa
--- /dev/null
+++ b/japanese/plain2/pkg-descr
@@ -0,0 +1,17 @@
+plain2 r2.54 1994/04 by A.Uchida NEC Corporation
+
+usage: plain2 [options] [files ...]
+ ---- parser options ---- ---- output options ----(default)
+-table=dd: table factor [0-100](def=50) -roff: troff output
+-exam=dd: example factor[0-100](def=50) -ms/-mm: troff macro (mm)
+-indsec: sections can be indented -tex: tex output
+-ktable:enable JIS keisen table -tstyle=ss:tex style
+-ref: figure/picture reference -renum: renumbering only
+ -[no]listd:list decoration (on)
+ ---- Others ---- -[no]space:spacing (on)
+-v: verbose output -[no]pre: preamble block (on)
+-dLevel: debug level -[no]acursec: section numbers (off)
+ ----- experimental ---- -raw: quote special chars(off)
+-pt=Size: font size -jis: JIS code output
+ -sjis: Shift-JIS code input/output
+ -f file: output customization