aboutsummaryrefslogtreecommitdiffstats
path: root/print/latex-beamer/Makefile
blob: 9a19781f626483baefb52324922d2f5beb053591 (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
63
64
65
66
67
68
69
70
71
72
# New ports collection makefile for:    latex-beamer
# Date created:     24 Jan 2004
# Whom:         hrs@FreeBSD.org
#
# $FreeBSD$

PORTNAME=   latex-beamer
PORTVERSION=    3.01
CATEGORIES= print
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= hrs@FreeBSD.org
COMMENT=    A LaTeX class to create a beamer presentation

BUILD_DEPENDS=  mktexlsr:${PORTSDIR}/print/teTeX-base \
        ${TEXMFLOCAL_LSR}:${PORTSDIR}/print/tex-texmflocal
RUN_DEPENDS=    latex:${PORTSDIR}/print/teTeX-base \
        ${LOCALBASE}/${TEXMFLOCAL}/tex/latex/xcolor/xcolor.sty:${PORTSDIR}/print/latex-xcolor \
        ${LOCALBASE}/${TEXMFLOCAL}/tex/latex/pgf/pgf.sty:${PORTSDIR}/print/latex-pgf \
        ${TEXMFLOCAL_LSR}:${PORTSDIR}/print/tex-texmflocal

NO_BUILD=   YES
PLIST=      ${WRKDIR}/pkg-plist

TEXMFLOCAL= share/texmf-local
TEXMFLOCAL_LSR= ${LOCALBASE}/${TEXMFLOCAL}/ls-R
MKTEXLSR=   ${LOCALBASE}/bin/mktexlsr
CLASSDIR=   ${TEXMFLOCAL}/tex/latex/${PORTNAME:S/^latex-//}
WRKSRC=     ${WRKDIR}/${PORTNAME:S/^latex-//}

CLASS_SUBDIRS=  base emulation emacs examples extensions lyx themes
DOC_SUBDIRS=    AUTHORS ChangeLog FILES INSTALL README TODO \
        doc solutions

IGNORE=     is already included in the teTeX distribution

pre-install:
    ${RM} -f ${PLIST}
    ${TOUCH} ${PLIST}
    cd ${WRKSRC} && ( \
        ${FIND} ${CLASS_SUBDIRS} -type f | \
        ${SED} -e "s%^%${CLASSDIR:S,^${PREFIX}/,,}/%"; \
        ${FIND} ${CLASS_SUBDIRS} -type d | \
        ${SORT} -r | ${SED} -e "s,^,@dirrm ${CLASSDIR:S,^${PREFIX}/,,}/,"; \
    ) >> ${PLIST}
.if !defined(NOPORTDOCS)
    cd ${WRKSRC} && ( \
        ${FIND} ${DOC_SUBDIRS} -type f | \
        ${SED} -e "s%^%${DOCSDIR:S,^${PREFIX}/,,}/%"; \
        ${FIND} ${DOC_SUBDIRS} -type d | \
        ${SORT} -r | ${SED} -e "s%^%@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/%"; \
        ${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}"; \
    ) >> ${PLIST}
.endif
    ${ECHO_CMD} "@unexec ${MKTEXLSR}" >> ${PLIST}
    ${ECHO_CMD} "@exec ${MKTEXLSR}" >> ${PLIST}

do-install:
    ${MKDIR} ${PREFIX}/${CLASSDIR}
    ( cd ${WRKSRC} && ${TAR} cf - ${CLASS_SUBDIRS} ) | \
        ( cd ${PREFIX}/${CLASSDIR} && ${TAR} xf - )
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ( cd ${WRKSRC} && ${TAR} cf - ${DOC_SUBDIRS} ) | \
        ( cd ${DOCSDIR} && ${TAR} xf - )
.endif

post-install:
    ${MKTEXLSR}

.include <bsd.port.mk>