summaryrefslogtreecommitdiff
path: root/print/auctex/Makefile
blob: 85281e9ba4b6ee9085da8de388c2b25f73f48db9 (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
# $NetBSD: Makefile,v 1.8 2002/03/13 17:37:33 fredb Exp $

DISTNAME=		auctex-10.0g
PKGREVISION=		1
CATEGORIES=		print
MASTER_SITES=		ftp://ftp.sunsite.auc.dk/pub/emacs/auctex/ftp/auctex/

MAINTAINER=		packages@netbsd.org
HOMEPAGE=		http://sunsite.auc.dk/auctex/
COMMENT=		Enhanced LaTeX mode for Emacs

DEPENDS+=		teTeX-[0-9]*:../../print/teTeX

USE_GMAKE=		#defined

TEX_PREFIX_DEFAULT=	${LOCALBASE}
EVAL_PREFIX+=		TEX_PREFIX=teTeX

.if defined(USE_XEMACS)
DEPENDS+=		xemacs-[0-9]*:../../editors/xemacs
MAKE_ENV+=		EMACS=xemacs
LISPDIR=		lib/xemacs/xemacs-packages/lisp
INFODIR=		lib/xemacs/xemacs-packages/info
.else
DEPENDS+=		emacs-[0-9]*:../../editors/emacs
MAKE_ENV+=		EMACS=emacs
LISPDIR=		share/emacs/site-lisp
INFODIR=		info
INFO_FILES+=		auctex
.endif

PLIST_SUBST+=		LISPDIR=${LISPDIR} INFODIR=${INFODIR}
MESSAGE_SUBST+=		LISPDIR=${LISPDIR}

post-patch:
	${MV} ${WRKSRC}/tex-site.el ${WRKSRC}/tex-site.el.orig
	${SED} -e 's:@LISPDIR@:'${LISPDIR}':g'			\
		-e 's:@TEX_PREFIX@:'${TEX_PREFIX}':g'		\
	${WRKSRC}/tex-site.el.orig > ${WRKSRC}/tex-site.el
	${CP} ${WRKSRC}/tex-site.el ${WRKSRC}/tex-site.el.dist

post-build:
	${RM} -f ${WRKSRC}/doc/auctex*
	cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${MAKE} auctex

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/${LISPDIR}/auctex
	${INSTALL_DATA} ${WRKSRC}/tex-site.el ${PREFIX}/${LISPDIR}
	${INSTALL_DATA} ${WRKSRC}/tex-site.el.dist ${PREFIX}/${LISPDIR}
.if !exists(${PREFIX}/${LISPDIR}/tex-site.el)
	${INSTALL_DATA} ${WRKSRC}/tex-site.el ${PREFIX}/${LISPDIR}
.endif
	for f in auc-old.el bib-cite.el font-latex.el hilit-LaTeX.el	   \
	latex.el lpath.el multi-prompt.el tex-buf.el tex-info.el tex-jp.el \
	tex.el texmathp.el; do						   \
	${INSTALL_DATA} ${WRKSRC}/$$f* ${PREFIX}/${LISPDIR}/auctex/; 	   \
	done
	${INSTALL_DATA_DIR} ${PREFIX}/${LISPDIR}/auctex/style
	${INSTALL_DATA} ${WRKSRC}/style/*.el* ${PREFIX}/${LISPDIR}/auctex/style
	${INSTALL_DATA} ${WRKSRC}/doc/auctex* ${PREFIX}/${INFODIR}

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