blob: ad6f1188e026c067b5267cf522507e741f023ad9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Created by: Koji Yokota <yokota@res.otaru-uc.ac.jp>
# $FreeBSD$
PORTNAME= japanese
PORTVERSION= 1.3
PORTREVISION= 5
CATEGORIES= japanese print
MASTER_SITES= ${MASTER_SITE_TEX_CTAN}
MASTER_SITE_SUBDIR= language/japanese
PKGNAMEPREFIX= platex-
DISTNAME= ${PORTNAME}
DIST_SUBDIR= latex
MAINTAINER= yokota@res.otaru-uc.ac.jp
COMMENT= pLaTeX package that literally provides Japanese option to babel
USE_ZIP= yes
USE_TEX= latex ptex
USES= iconv:build
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
MKTEXLSR= ${LOCALBASE}/bin/mktexlsr
NO_STAGE= yes
.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_CMD} -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>
|