summaryrefslogtreecommitdiffstats
path: root/print/jadetex/Makefile
blob: 05c2ad75ecb34d0547b2762c4a33a84c980f1f9a (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
# New ports collection makefile for:    jadetex
# Date created:         5 December 1998
# Whom:                 Sean Kelly <kelly@ad1440.net>
#
# $FreeBSD$
#

PORTNAME=		jadetex
PORTVERSION=		3.12
PORTREVISION=		1
CATEGORIES=		print
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	jadetex

MAINTAINER=		nik@FreeBSD.org

BUILD_DEPENDS=		hugelatex:${PORTSDIR}/print/hugelatex
LIB_DEPENDS=		png.5:${PORTSDIR}/graphics/png
RUN_DEPENDS=		tex:${PORTSDIR}/print/teTeX

MAKE_ENV=		TEXMFCNF=${FILESDIR}:${LOCALBASE}/share/texmf/web2c

MESSAGE=		${PKGDIR}/pkg-message
PKGMESSAGE=		${WRKDIR}/pkg-message

MAN1=			jadetex.1 pdfjadetex.1

post-patch: patch-makefile patch-message

patch-makefile:
	@${ECHO_CMD} all: betterdefault > ${WRKSRC}/Makefile.tmp
	@${ECHO_CMD} betterdefault: jadetex.fmt pdfjadetex.fmt >> ${WRKSRC}/Makefile.tmp
	@${CAT} ${WRKSRC}/Makefile >> ${WRKSRC}/Makefile.tmp
	@${MV} ${WRKSRC}/Makefile.tmp ${WRKSRC}/Makefile

pre-patch:
	@${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},' ${MESSAGE} > ${PKGMESSAGE}

do-install:
	@cd ${WRKSRC}; TEXMFMAIN=$$(kpsewhich -expand-var '$$TEXMFMAIN'); \
	 ${INSTALL_DATA} jadetex.fmt pdfjadetex.fmt $$TEXMFMAIN/web2c; \
	 ${MKDIR} -m 555 $$TEXMFMAIN/tex/jadetex; \
	 ${INSTALL_DATA} dsssl.def jadetex.ltx $$TEXMFMAIN/tex/jadetex; \
	 ${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1
	@${LN} -sf ${PREFIX}/bin/tex ${PREFIX}/bin/jadetex
	@${LN} -sf ${PREFIX}/bin/pdftex ${PREFIX}/bin/pdfjadetex

post-install: rebuild-tex-database display-message

rebuild-tex-database:
	${LOCALBASE}/bin/mktexlsr

display-message:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud