summaryrefslogtreecommitdiff
path: root/print/tex-texlive-scripts/Makefile
blob: 323b02f1713d952c30bcff8e6b88a2c0e81dc1ef (plain)
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
68
69
# $NetBSD: Makefile,v 1.23 2021/06/06 23:29:22 markd Exp $

DISTNAME=	texlive-scripts
PKGNAME=	tex-${DISTNAME}-2021
TEXLIVE_REV=	59470

MAINTAINER=	minskim@NetBSD.org
COMMENT=	TeX Live infrastructure programs
LICENSE=	gnu-gpl-v2 AND public-domain

DEPENDS+=	kpathsea-[0-9]*:../../print/kpathsea
DEPENDS+=	tex-kpathsea>=2012nb1:../../print/tex-kpathsea
DEPENDS+=	tex-texlive.infra-[0-9]*:../../print/tex-texlive.infra
# We want the manual pages
DEPENDS+=	tex-texlive-scripts-doc-[0-9]*:../../print/tex-texlive-scripts-doc

USE_TOOLS+=	gs:run perl:run sh:run

REPLACE_PERL=	bin/updmap bin/fmtutil texmf-dist/scripts/texlive/mktexlsr.pl
REPLACE_SH=	bin/fmtutil-sys bin/fmtutil-user bin/updmap-sys bin/updmap-user
REPLACE_TEXLUA=	bin/rungs

PKG_SYSCONFSUBDIR=	texmf

MAKE_DIRS+=	${PKG_SYSCONFDIR}/web2c
CONF_FILES+=	${PREFIX}/share/texmf-dist/web2c/updmap.cfg \
		${PKG_SYSCONFDIR}/web2c/updmap.cfg

TEX_TEXMF_DIRS+=	${PKG_SYSCONFDIR} ${PREFIX}/share/texmf-dist

FILES_SUBST+=		UPDMAP_SYS=${PREFIX}/bin/updmap-sys

SUBST_CLASSES+=		paths
SUBST_MESSAGE.paths=	Setting paths to commands.
SUBST_STAGE.paths=	pre-configure
SUBST_FILES.paths=	bin/rungs bin/mktexmf bin/mktexpk bin/mktextfm \
			bin/fmtutil bin/fmtutil-sys bin/updmap bin/updmap-sys
SUBST_SED.paths+=	-e 's,@GS@,${TOOLS_PATH.gs},g'
SUBST_SED.paths+=	-e 's,@KPSEWHICH@,${PREFIX}/bin/kpsewhich,g'
SUBST_SED.paths+=	-e 's,@MKTEXMF@,${PREFIX}/bin/mktexmf,g'
SUBST_SED.paths+=	-e 's,@UPDMAP@,${PREFIX}/bin/updmap,g'
SUBST_SED.paths+=	-e 's,@FMTUTIL@,${PREFIX}/bin/fmtutil,g'

#TEX_MAP_FILES+=		mathpple.map

.include "../../print/texlive/package.mk"

post-extract:
	${MKDIR} ${WRKSRC}/bin
	${MV} ${WRKSRC}/texmf-dist/scripts/texlive/rungs.tlu \
		${WRKSRC}/bin/rungs
.for script in mktexmf mktexpk mktextfm
	${MV} ${WRKSRC}/texmf-dist/scripts/texlive/${script} \
		${WRKSRC}/bin/${script}
.endfor
.for script in fmtutil-sys.sh fmtutil-user.sh updmap-sys.sh updmap-user.sh
	${MV} ${WRKSRC}/texmf-dist/scripts/texlive/${script} \
		${WRKSRC}/bin/${script:S/.sh//}
.endfor
.for script in fmtutil.pl updmap.pl
	${MV} ${WRKSRC}/texmf-dist/scripts/texlive/${script} \
		${WRKSRC}/bin/${script:S/.pl//}
.endfor

post-install:
	${LN} -sf fmtutil ${DESTDIR}${PREFIX}/bin/mktexfmt
	${LN} -sf mktexlsr ${DESTDIR}${PREFIX}/bin/texhash

.include "../../mk/bsd.pkg.mk"