aboutsummaryrefslogtreecommitdiffstats
path: root/print/tex-dvipdfmx/Makefile
blob: 023442fedf358536c34c2a87c1aa30ae7da26988 (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
73
74
75
76
# Created by: Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
# $FreeBSD$

PORTNAME=   dvipdfmx
PORTVERSION=    20150315
CATEGORIES= print
MASTER_SITES=   ftp://tug.org/historic/systems/texlive/2015/
PKGNAMEPREFIX=  tex-
DISTNAME=   texlive-${DISTVERSION_TEXLIVE_SOURCE}-source
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        ${DISTNAME_TEXMF}${EXTRACT_SUFX}
DIST_SUBDIR=    TeX
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= hrs@FreeBSD.org
COMMENT=    DVI Previewer(kpathsearch) for X

LICENSE=    GPLv2

LIB_DEPENDS=    libpng.so:${PORTSDIR}/graphics/png \
        libpaper.so:${PORTSDIR}/print/libpaper \
        libfreetype.so:${PORTSDIR}/print/freetype2
RUN_DEPENDS=    ${LOCALBASE}/share/fonts/adobe-cmaps/ai0/CMap/Identity-H:${PORTSDIR}/print/adobe-cmaps

USES=       gmake pkgconfig tar:xz
USE_TEX=    kpathsea web2c texmf dvipsk luatex texhash
TEXHASHDIRS=    ${TEXMFDISTDIR} ${TEXMFDIR}
EXTRACT_AFTER_ARGS= ${EXTRACT_FILES:S,^,${DISTNAME}/,}
EXTRACT_FILES=  am \
        m4 \
        build-aux \
        texk/dvipdfm-x
EXTRACT_AFTER_ARGS_TEXMF= \
    | ${TAR} -xf - -C ${STAGEDIR}${PREFIX}/share \
    --strip-components 1 --no-same-permission --no-same-owner \
    ${EXCLUDE_FILES_TEXMF:S,^,--exclude ${DISTNAME_TEXMF}/,} \
    ${EXTRACT_FILES_TEXMF:S,^,${DISTNAME_TEXMF}/,}
DISTVERSION_TEXLIVE_SOURCE= 20150521
DISTVERSION_TEXLIVE_TEXMF=  20150523
DISTNAME_TEXMF= texlive-${DISTVERSION_TEXLIVE_TEXMF}-texmf
EXCLUDE_FILES_TEXMF= \
    texmf-dist/fonts/map/dvipdfmx/jfontmaps \
    texmf-dist/fonts/map/dvipdfmx/japanese-otf \
    texmf-dist/fonts/map/dvipdfmx/ptex \
    texmf-dist/fonts/map/dvipdfmx/updmap/kanjix.map
EXTRACT_FILES_TEXMF= \
    texmf-dist/doc/dvipdfmx/ \
    texmf-dist/dvipdfmx/ \
    texmf-dist/fonts/cmap/dvipdfmx/ \
    texmf-dist/fonts/map/dvipdfmx/ \
    texmf-dist/fonts/map/dvipdfm/
WRKSRC= ${WRKDIR}/${DISTNAME}/texk/dvipdfm-x
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-system-freetype2 \
        --with-freetype2-includes=${LOCALBASE}/include/freetype2 \
        --with-freetype2-libdir=${LOCALBASE}/lib \
        --with-system-kpathsea \
        --with-kpathsea-includes=${LOCALBASE}/include \
        --with-kpathsea-libdir=${LOCALBASE}/lib \
        --with-system-libpaper \
        --with-libpaper-includes=${LOCALBASE}/include \
        --with-libpaper-libdir=${LOCALBASE}/lib \
        --with-system-libpng \
        --with-system-zlib
CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

pre-install:
    ${CAT} ${DISTDIR}/${DIST_SUBDIR}/texlive-${DISTVERSION_TEXLIVE_TEXMF}-texmf${EXTRACT_SUFX} \
        ${EXTRACT_AFTER_ARGS_TEXMF}

post-install:
    ${LN} -f -s ${LOCALBASE}/share/fonts/adobe-cmaps \
        ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/fonts/cmap/adobe-cmaps

.include <bsd.port.mk>