aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/mendexk-euc/Makefile
blob: b5f5751a0659be0f17ecf220125c505022242f6d (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
# New ports collection makefile for:    mendexk-euc
# Date created:         1 Dec 1997
# Whom:                 Makoto WATANABE <watanabe@zlab.phys.nagoya-u.ac.jp>
#
# $FreeBSD$
#

PORTNAME=   mendexk
PORTVERSION=    2.5
CATEGORIES= japanese print
MASTER_SITES=   ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/mendex/
PKGNAMESUFFIX=  -${KANJICODE}
DISTNAME=   ${PORTNAME}${PORTVERSION}

MAINTAINER= watanabe@zlab.phys.nagoya-u.ac.jp
COMMENT=    Index formatter for Japanese

KANJICODE?= euc

EXTRACT_DEPENDS=    ${NONEXISTENT}:${PORTSDIR}/japanese/ptex-base:configure
.if ${KANJICODE} == "sjis"
EXTRACT_DEPENDS+=   nkf:${PORTSDIR}/japanese/nkf
.endif

USE_GMAKE=  yes
DIST_SUBDIR=    teTeX
WRKSRC= ${WRKDIRPREFIX}${.CURDIR}/../ptex-base/work/tetex-src-${TETEX_VERSION}/texk/${DISTNAME}
ALL_TARGET= mendex

TETEX_VERSION=  2.0.2
KANJI_FILES=    kana.h ktable.h

MANLANG=    ja
MAN1=       mendex.1

post-extract:
    @${RM} -rf ${WRKSRC}
    @${MV} ${WRKDIR}/${DISTNAME} ${WRKSRC}
.if ${KANJICODE} == "sjis"
    @( cd ${WRKSRC} ; \
        for i in ${KANJI_FILES}; do \
          ${MV} $$i $$i.orig ; \
          nkf -s $$i.orig > $$i ; \
        done )
.endif

pre-build:
    @(cd ${WRKSRC}/../kpathsea; ${MAKE})

do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/mendex ${PREFIX}/bin
    @${MKDIR} ${PREFIX}/man/${MANLANG}/man1
    @${INSTALL_MAN} ${WRKSRC}/mendex.1 ${PREFIX}/man/${MANLANG}/man1
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

pre-clean:
    @${RM} -rf ${WRKSRC}

.include <bsd.port.mk>