summaryrefslogtreecommitdiff
path: root/print/auctex/Makefile
blob: 065c6e86a0eed24b41c24d1fe15ef1585b6fb291 (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.17 2004/01/24 14:58:00 grant Exp $

DISTNAME=		auctex-11.13
PKGREVISION=		1
CATEGORIES=		print
MASTER_SITES=		http://savannah.nongnu.org/download/auctex/stable.pkg/11.13/

MAINTAINER=		tech-pkg@NetBSD.org
HOMEPAGE=		http://www.nongnu.org/auctex/
COMMENT=		Enhanced LaTeX mode for Emacs

USE_GNU_TOOLS+=		make
USE_PKGINSTALL=		yes

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

MAKEFLAGS+=		EMACS=${EMACS_BIN}

USE_MAKEINFO=		YES

.if defined(USE_XEMACS)
LISPDIR=		${EMACS_LISPPREFIX}
INFODIR=		${EMACS_LISPPREFIX}/../info
.else
LISPDIR=		${EMACS_LISPPREFIX}
INFODIR=		info
INFO_FILES=		auctex
.endif

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

EGDIR=			${PREFIX}/share/examples/auctex
CONF_FILES=		${EGDIR}/tex-site.el ${EMACS_LISPPREFIX}/auctex/tex-site.el

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} ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/tex-site.el ${EGDIR}
#	${INSTALL_DATA} ${WRKSRC}/tex-site.el.dist ${EGDIR}
	${INSTALL_DATA_DIR} ${EMACS_LISPPREFIX}/auctex
	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* ${EMACS_LISPPREFIX}/auctex; 	   \
	done
	${INSTALL_DATA_DIR} ${EMACS_LISPPREFIX}/auctex/style
	${INSTALL_DATA} ${WRKSRC}/style/*.el* ${EMACS_LISPPREFIX}/auctex/style
	${INSTALL_DATA} ${WRKSRC}/doc/auctex* ${PREFIX}/${INFODIR}

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