summaryrefslogtreecommitdiff
path: root/japanese/xjman
diff options
context:
space:
mode:
authorsakamoto <sakamoto>1999-11-02 11:19:12 +0000
committersakamoto <sakamoto>1999-11-02 11:19:12 +0000
commit262defb8c7bf11d43f17debe9519d23aa435ff62 (patch)
tree4d68f863523be459890bc5e3fb3d57ec9c5b36bb /japanese/xjman
parentcfe8a55e0751a1e540a338d2758bce02480f7f4f (diff)
downloadpkgsrc-262defb8c7bf11d43f17debe9519d23aa435ff62.tar.gz
Adapt this package to NetBSD.
Diffstat (limited to 'japanese/xjman')
-rw-r--r--japanese/xjman/Makefile106
-rw-r--r--japanese/xjman/files/Makefile6
-rw-r--r--japanese/xjman/files/Makefile.inc32
-rw-r--r--japanese/xjman/files/md52
-rw-r--r--japanese/xjman/pkg/MESSAGE2
-rw-r--r--japanese/xjman/pkg/PLIST6
-rw-r--r--japanese/xjman/scripts/configure47
7 files changed, 74 insertions, 127 deletions
diff --git a/japanese/xjman/Makefile b/japanese/xjman/Makefile
index 948168dd810..a530c0289ae 100644
--- a/japanese/xjman/Makefile
+++ b/japanese/xjman/Makefile
@@ -1,66 +1,72 @@
-# New ports collection makefile for: X Japanese man documents
-# Version required: 0.4
-# Date created: 24 Dec 1998
-# Based on: Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp>'s
-# japanese/man-doc
-# Whom: SADA Kenji <sada@FreeBSD.org>
-#
-# $FreeBSD: ports/japanese/xjman/Makefile,v 1.10 1999/10/30 15:34:24 sada Exp $
-#
+# $NetBSD: Makefile,v 1.2 1999/11/02 11:19:12 sakamoto Exp $
+# FreeBSD Id: ports/japanese/xjman/Makefile,v 1.10 1999/10/30 15:34:24 sada Exp
DISTNAME= xjman-0.4
-PKGNAME= ja-${DISTNAME}
-CATEGORIES= japanese
-MASTER_SITES= ${MASTER_SITE_PORTS_JP} \
- http://xjman.dsl.gr.jp/
+CATEGORIES= japanese x11
+MASTER_SITES= http://xjman.dsl.gr.jp/
+EXTRACT_SUFX= .tar.bz2
-MAINTAINER= sada@FreeBSD.org
+MAINTAINER= sakamoto@netbsd.org
+HOMEPAGE= http://xjman.dsl.gr.jp/
-NO_MTREE= yes
-PLIST= ${WRKDIR}/PLIST
-USE_BZIP2= yes
+DEPENDS+= ja-man-19990531:../../japanese/man
+
+USE_X11BASE= yes
+PLIST_SRC= ${WRKDIR}/PLIST
WRKSRC= ${WRKDIR}/man/ja_JP.ujis
-SCRIPTS_ENV+= MANSECS="${MANSECS}"
+XJMANDIR= man/ja_JP.EUC
+MAKE_ENV+= XJMANDIR=${XJMANDIR}
+
+NO_CONFIGURE= yes
-MANSECS= 1 3 5
+.include "../../mk/bsd.prefs.mk"
+.ifdef MANZ
+MANCOMPRESSED= yes
+.endif
post-extract:
-.for i in Makefile Makefile.inc
- @${CP} ${FILESDIR}/$i ${WRKSRC}
+.for f in Makefile Makefile.inc
+ @${CP} ${FILESDIR}/${f} ${WRKSRC}
.endfor
-post-build:
- @${RM} -f ${PLIST}
- @for sec in ${MANSECS}; do \
- if [ -d ${WRKSRC}/man$${sec} ]; then \
- cd ${WRKSRC}/man$${sec}; \
- list=`${MAKE} pages-list`; \
- set `${ECHO} $$list " "|${SED} 's/\.\([0-9]\)x /.\1x \1 /g'`; \
- while : ; do \
- case $$# in \
- 0) break;; \
- [1]) ${ECHO} "can not happen"; break;; \
- esac; \
- ${ECHO} man/ja/man$$2/$$1.gz; shift 2; \
- done; \
- fi; \
- done|sort|uniq >>${PLIST}
- @${ECHO} "@exec ${LN} -sf %D/man/ja %D/man/ja_JP.EUC" >>${PLIST}
- @${ECHO} "@unexec ${RM} -f %D/man/ja_JP.EUC" >>${PLIST}
- @${ECHO} "share/doc/xjman/COPYRIGHT" >>${PLIST}
- @${ECHO} "share/doc/xjman/COPYRIGHT.XJDP" >>${PLIST}
- @${ECHO} "@dirrm share/doc/xjman" >>${PLIST}
-
-pre-install:
-.for sec in ${MANSECS}
- @${MKDIR} ${PREFIX}/man/ja/man${sec}
+pre-build:
+.for dir in man1 man3 man5
+ @(cd ${WRKSRC}/${dir}; \
+ for file in *; do \
+ f=`${ECHO} $$file|${SED} -e 's|x$$||'`; \
+ mlink=`head -1 $$file|grep '^\.so man./'| \
+ ${SED} -e 's|.*man./\(.*\)x|\1|'`; \
+ if [ "$$mlink" = "" ]; then \
+ ${ECHO} "MAN+= $$f" >> Makefile; \
+ ${MV} $$file $$f; \
+ else \
+ ${ECHO} "MLINKS+= $$mlink $$f" >> Makefile; \
+ ${SED} -e 's|x$$||' $$file > $$f; \
+ ${RM} $$file; \
+ fi; \
+ done; \
+ ${ECHO} ".include <bsd.prog.mk>" >> Makefile; \
+ )
.endfor
+post-build:
+ @${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
+ @(cd ${WRKSRC}; \
+ find man1/*.1 man3/*.3 man5/*.5 -type f | \
+ ${SED} -e 's|^|${XJMANDIR}/|' | sort >> ${PLIST_SRC})
+.if ${MKCATPAGES} != no
+ @(cd ${WRKSRC}; \
+ find man1/*.1 man3/*.3 man5/*.5 -type f | \
+ ${SED} -e 's|^|${XJMANDIR}/|' \
+ -e 's|man[135]\(/.*\)\.\([135]\)$$|cat\2\1.0|' | \
+ sort >> ${PLIST_SRC})
+.endif
+
post-install:
- @${MKDIR} ${PREFIX}/share/doc/xjman
+ @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xjman
.for i in COPYRIGHT COPYRIGHT.XJDP
- @${INSTALL_DATA} ${FILESDIR}/$i ${PREFIX}/share/doc/xjman/
+ @${INSTALL_DATA} ${FILESDIR}/$i ${PREFIX}/share/doc/xjman
.endfor
- @${CAT} ${PKGDIR}/MESSAGE
+ @${INSTALL_DATA} ${WRKDIR}/man/README ${PREFIX}/share/doc/xjman
-.include <bsd.port.mk>
+.include "../../mk/bsd.pkg.mk"
diff --git a/japanese/xjman/files/Makefile b/japanese/xjman/files/Makefile
index 4bb9b19b920..af0d7b795a5 100644
--- a/japanese/xjman/files/Makefile
+++ b/japanese/xjman/files/Makefile
@@ -1,7 +1,3 @@
-BINDIR= ${PREFIX}
-SUBDIR= man1 man3 man5
-
-makedb:
- LANG=ja_JP.EUC jmakewhatis ${DESTDIR}${BINDIR}/man/ja/
+SUBDIR= man1 man3 man5
.include <bsd.subdir.mk>
diff --git a/japanese/xjman/files/Makefile.inc b/japanese/xjman/files/Makefile.inc
index 25a10387c55..57436e9185c 100644
--- a/japanese/xjman/files/Makefile.inc
+++ b/japanese/xjman/files/Makefile.inc
@@ -1,23 +1,9 @@
-PREFIX?= /usr/local
-MANDIR= ${PREFIX}/man/ja/man
-MROFF_CMD= /usr/local/bin/groff -Tnippon -man
-
-NOMLINKS= yes
-
-afterinstall:
-.if defined(MLINKS) && !empty(MLINKS)
- @set `echo ${MLINKS} " " | sed 's/\.\([^.]\)\([^.]*\) /.\1\2 \1 /g'`; \
- while : ; do \
- case $$# in \
- 0) break;; \
- [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \
- esac; \
- name=$$1; shift; sect=$$1; shift; \
- l=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
- name=$$1; shift; sect=$$1; shift; \
- t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
- ${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
- rm -f $${t} $${t}${MCOMPRESS_EXT}; \
- ln $${l}${ZEXT} $${t}${ZEXT}; \
- done
-.endif
+NROFF= jgnroff -Tnippon
+MANDIR= ${PREFIX}/${XJMANDIR}
+TMACDIR= ${LOCALBASE}/share/groff/tmac
+CATDEPS= ${TMACDIR}/tmac.andocj \
+ ${TMACDIR}/tmac.docj \
+ ${TMACDIR}/mdoc/doc-ditroffj \
+ ${TMACDIR}/mdoc/doc-commonj \
+ ${TMACDIR}/mdoc/doc-nroffj \
+ ${TMACDIR}/mdoc/doc-symsj
diff --git a/japanese/xjman/files/md5 b/japanese/xjman/files/md5
index 1b536d7b976..784b48954d3 100644
--- a/japanese/xjman/files/md5
+++ b/japanese/xjman/files/md5
@@ -1 +1,3 @@
+$NetBSD: md5,v 1.2 1999/11/02 11:19:13 sakamoto Exp $
+
MD5 (xjman-0.4.tar.bz2) = f78128dd9a31bc67dad4f0cd5d35fee9
diff --git a/japanese/xjman/pkg/MESSAGE b/japanese/xjman/pkg/MESSAGE
index d05a06213d0..37c92ff1d40 100644
--- a/japanese/xjman/pkg/MESSAGE
+++ b/japanese/xjman/pkg/MESSAGE
@@ -5,4 +5,4 @@ Copyright (c) 1998-1999 The X Japanese Documentation Project.
This product includes software developed by
the University of California, Lawrence Berkeley Laboratory.
--
-Refer to the documentations at `/usr/local/share/doc/xjman/'.
+Refer to the documentations at `${X11BASE}/share/doc/xjman/'.
diff --git a/japanese/xjman/pkg/PLIST b/japanese/xjman/pkg/PLIST
index 9e2d4e55b57..142c7cc3bcd 100644
--- a/japanese/xjman/pkg/PLIST
+++ b/japanese/xjman/pkg/PLIST
@@ -1 +1,5 @@
-@comment
+@comment $NetBSD: PLIST,v 1.2 1999/11/02 11:19:13 sakamoto Exp $
+share/doc/xjman/COPYRIGHT
+share/doc/xjman/COPYRIGHT.XJDP
+share/doc/xjman/README
+@dirrm share/doc/xjman
diff --git a/japanese/xjman/scripts/configure b/japanese/xjman/scripts/configure
deleted file mode 100644
index eb66aa64523..00000000000
--- a/japanese/xjman/scripts/configure
+++ /dev/null
@@ -1,47 +0,0 @@
-exec /usr/bin/perl -Sx "$0" ${1+"$@"}
-#! perl
-
-$WRKSRC = $ENV{'WRKSRC'};
-@MANSECS = split(/\s+/, $ENV{'MANSECS'});
-
-for $sec (@MANSECS) {
- print "===> Creating Makefile in man${sec}\n";
-
- chdir "$WRKSRC/man$sec";
- @manpages = ();
- @mlinks = ();
-
- for $manpage (<*.${sec}x>) {
- open(F, $manpage) || die "cannot open $manpage: $!\n";
- $_ = <F>;
- chop;
- close(F);
- if (/^\.so /) {
- ($real = $') =~ s!^man./!!;
- push(@mlinks, "$real\t$manpage");
- }
- else {
- push(@manpages, $manpage);
- }
- }
-
- open(MAKEFILE, '>Makefile');
-
- if (@manpages) {
- print MAKEFILE join("\t\\\n\t", "MAN${sec} =", sort @manpages);
- print MAKEFILE "\n\n";
- }
- if (@mlinks) {
- print MAKEFILE join("\t\\\n\t", "MLINKS =", sort @mlinks);
- print MAKEFILE "\n\n";
- }
-
- print MAKEFILE <<EOF;
-pages-list:
- @\${ECHO} \${MAN${sec}} \${MLINKS}
-
-.include <bsd.prog.mk>
-EOF
-
- close(MAKEFILE);
-}