1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

- Resurrect japanese/plain2 and update maintainership.

- Fix CFLAGS.
- Use %%DATADIR%% in pkg-plist.

PR:	ports/161141
This commit is contained in:
Hiroki Sato 2011-10-01 08:01:54 +00:00
parent 0b5e435189
commit e973d1d259
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282726
6 changed files with 136 additions and 0 deletions

43
japanese/plain2/Makefile Normal file
View File

@ -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>

4
japanese/plain2/distinfo Normal file
View File

@ -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

View File

@ -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}

View File

@ -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:

View File

@ -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];
};

17
japanese/plain2/pkg-descr Normal file
View File

@ -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