aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/platex-japanese/Makefile
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-03-15 04:38:15 +0800
committermiwi <miwi@FreeBSD.org>2008-03-15 04:38:15 +0800
commit144bfbf20530368a0967bea2b0ad34ba3cdaab3d (patch)
treee0849f7e661cb2dcd8412d970da9381b855f106e /japanese/platex-japanese/Makefile
parente812b137eade3711ddffcbf235b705f52ad24c04 (diff)
downloadfreebsd-ports-gnome-144bfbf20530368a0967bea2b0ad34ba3cdaab3d.tar.gz
freebsd-ports-gnome-144bfbf20530368a0967bea2b0ad34ba3cdaab3d.tar.zst
freebsd-ports-gnome-144bfbf20530368a0967bea2b0ad34ba3cdaab3d.zip
The original babel package for LaTeX does not have an option Japanese.
This port adds Japanese option to babel. WWW: http://www.ctan.org/tex-archive/language/japanese/japanese/ PR: ports/121709 Submitted by: Koji Yokota <yokota at res.otaru-uc.ac.jp>
Diffstat (limited to 'japanese/platex-japanese/Makefile')
-rw-r--r--japanese/platex-japanese/Makefile72
1 files changed, 72 insertions, 0 deletions
diff --git a/japanese/platex-japanese/Makefile b/japanese/platex-japanese/Makefile
new file mode 100644
index 000000000000..adb241683ca6
--- /dev/null
+++ b/japanese/platex-japanese/Makefile
@@ -0,0 +1,72 @@
+# New ports collection makefile for: latex-japanese
+# Date created: 2007-11-19
+# Whom: Koji Yokota <yokota@res.otaru-uc.ac.jp>
+#
+# $FreeBSD$
+#
+
+PORTNAME= japanese
+PORTVERSION= 1.3
+CATEGORIES= japanese print
+MASTER_SITES= ${MASTER_SITE_TEX_CTAN}
+MASTER_SITE_SUBDIR= language/japanese
+PKGNAMEPREFIX= latex-
+DISTNAME= ${PORTNAME}
+DIST_SUBDIR= latex
+
+MAINTAINER= yokota@res.otaru-uc.ac.jp
+COMMENT= LaTeX package that literally provides japanese option to babel
+
+BUILD_DEPENDS= ${LOCALBASE}/share/texmf:${PORTSDIR}/print/teTeX-texmf \
+ ptex:${PORTSDIR}/japanese/ptex \
+ iconv:${PORTSDIR}/converters/libiconv
+
+USE_ZIP= yes
+
+TEXMFDIR= share/texmf
+STYDIR= tex/generic/babel
+DOCSDIR= doc/generic/babel/${PORTNAME}
+INSFILE= ${PORTNAME}.ins
+DTXFILE= ${PORTNAME}.dtx
+LDFFILE= ${PORTNAME}.ldf
+SAMPLEFILE= sample.tex
+PDFFILE= sample.pdf
+TEXTFILE= README
+ENCODING?= EUC-JP
+ICONV= ${LOCALBASE}/bin/iconv
+MKTEXLSR= ${LOCALBASE}/bin/mktexlsr
+
+.SILENT::
+pre-configure:
+ @${ECHO_MSG}
+ @${ECHO_MSG} Using ${ENCODING} to set locale of installing files.
+ @${ECHO_MSG} To change it, set the $$\{ENCODING\} variable to a desirable iconv\'s locale.
+ @${ECHO_MSG} See \'iconv -l\' for available values.
+ @${ECHO_MSG}
+
+post-configure:
+ ( cd ${WRKSRC} && ${MV} ${INSFILE} ${INSFILE:S/$/.orig/} && \
+ ${SED} -e 's/\(sample\.tex\)/j\1/g' ${INSFILE:S/$/.orig/} \
+ > ${INSFILE} && \
+ ${MV} ${DTXFILE} ${DTXFILE}.orig && \
+ ${ICONV} -f ISO-2022-JP -t ${ENCODING} ${DTXFILE}.orig > ${DTXFILE} )
+
+do-build:
+ ( cd ${WRKSRC} && platex ${INSFILE} && \
+ ${MV} j${SAMPLEFILE} ${SAMPLEFILE})
+
+do-install:
+ ( cd ${WRKSRC} && \
+ ${MKDIR} ${PREFIX}/${TEXMFDIR}/${STYDIR} && \
+ ${CP} -pv ${LDFFILE} ${PREFIX}/${TEXMFDIR}/${STYDIR} )
+.if !defined(NOPORTDOCS)
+ ( cd ${WRKSRC} && \
+ ${MKDIR} ${PREFIX}/${TEXMFDIR}/${DOCSDIR} && \
+ for _FILE in ${PDFFILE} ${TEXTFILE} ${SAMPLEFILE} ; do \
+ ${CP} -pv $${_FILE} ${PREFIX}/${TEXMFDIR}/${DOCSDIR} ; done )
+.endif
+
+post-install:
+ ${MKTEXLSR} ${PREFIX}/${TEXMFDIR}
+
+.include <bsd.port.mk>