source: trunk/dports/tex/texlive-common/Portfile @ 69215

Last change on this file since 69215 was 69215, checked in by dports@…, 9 years ago

Total nit: "mktexlsr" is the canonical name for "texhash"
nowadays. Not a functional change since texhash is a symlink to
mktexlsr anyway, just trying to satisfy my inner pedant.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 69215 2010-06-28 23:44:16Z dports@macports.org $
3
4PortSystem          1.0
5PortGroup           texlive 1.0
6
7name                texlive-common
8version             2009
9revision            1
10
11categories          tex
12maintainers         dports
13description         TeX Live common infrastructure.
14long_description    This port provides files that support a MacPorts    \
15                    installation of TeX Live, such as configuration     \
16                    files and the scripts that generate them.
17
18homepage            http://www.tug.org/texlive/
19platforms           darwin
20supported_archs     noarch
21
22master_sites        http://flute.csail.mit.edu/texlive/
23worksrcdir          ${distname}
24use_bzip2           yes
25checksums           md5     8f2f1f88a2c7944204e2c2c09becaa03 \
26                    sha1    4b6052734c78aff3cbfed303b78dea0d67f3a685 \
27                    rmd160  48c92d5a815587034691446c0e9f93a7a5fabf6d
28
29livecheck.type  regex
30livecheck.url   ${master_sites}
31livecheck.regex ${name}-(\[\\d-\]+)\\.tar\\.bz2
32
33
34post-patch {
35    foreach x {texmf.cnf texlive-update-cnf} {
36        reinplace "s|@@TEXMFMAIN@@|${texlive_texmfmain}|g" ${worksrcpath}/${x}
37        reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|g" ${worksrcpath}/${x}
38        reinplace "s|@@TEXMFLOCAL@@|${texlive_texmflocal}|g" ${worksrcpath}/${x}
39        reinplace "s|@@TEXMFSYSVAR@@|${texlive_texmfsysvar}|g" ${worksrcpath}/${x}
40        reinplace "s|@@TEXMFSYSCONFIG@@|${texlive_texmfsysconfig}|g" ${worksrcpath}/${x}
41    }
42}
43
44use_configure   no
45
46build           { }
47
48destroot {
49    # Create texmf directories
50    xinstall -d ${destroot}${texlive_texmfmain}
51    xinstall -d ${destroot}${texlive_texmfdist}
52    xinstall -d ${destroot}${texlive_texmflocal}
53    xinstall -d ${destroot}${texlive_texmfsysvar}
54    xinstall -d ${destroot}${texlive_texmfsysconfig}
55
56    # Create empty ls-R files so that they're marked as owned by this
57    # port. The contents will be generated/updated by mktexlsr.
58    touch ${destroot}${texlive_texmfmain}/ls-R
59    touch ${destroot}${texlive_texmfdist}/ls-R
60    touch ${destroot}${texlive_texmflocal}/ls-R
61    touch ${destroot}${texlive_texmfsysvar}/ls-R
62    touch ${destroot}${texlive_texmfsysconfig}/ls-R
63
64    # Install texmf.cnf and symlink to its usual expected location
65    xinstall -d ${destroot}${texlive_texmflocal}/web2c
66    xinstall -m 644 ${worksrcpath}/texmf.cnf \
67        ${destroot}${texlive_texmfsysconfig}/texmf.cnf
68    ln -s ${texlive_texmfsysconfig}/texmf.cnf \
69        ${destroot}${texlive_texmflocal}/web2c/texmf.cnf
70
71    # Create fmt/updmap/hyphen files, directories, and install update script
72    xinstall -d ${destroot}${texlive_texmfsysconfig}/fmtutil.d
73    xinstall -d ${destroot}${texlive_texmfsysconfig}/language.d
74    xinstall -d ${destroot}${texlive_texmfsysconfig}/updmap.d
75    xinstall -m 644 ${worksrcpath}/updmap-hdr.cfg \
76        ${destroot}${texlive_texmfsysconfig}/updmap.d/00updmap-hdr.cfg
77    xinstall -m 644 ${worksrcpath}/fmtutil-hdr.cnf \
78        ${destroot}${texlive_texmfsysconfig}/fmtutil.d/00fmtutil-hdr.cnf
79    xinstall -m 644 ${worksrcpath}/language.us \
80        ${destroot}${texlive_texmfsysconfig}/language.d/00language.us.dat
81    xinstall -m 644 ${worksrcpath}/language.us.def \
82        ${destroot}${texlive_texmfsysconfig}/language.d/00language.us.def
83    xinstall -d ${destroot}${texlive_texmfsysvar}/web2c
84    touch ${destroot}${texlive_texmfsysvar}/web2c/updmap.cfg
85    touch ${destroot}${texlive_texmfsysvar}/web2c/fmtutil.cnf
86    xinstall -d ${destroot}${texlive_texmfsysvar}/tex/generic/config
87    touch ${destroot}${texlive_texmfsysvar}/tex/generic/config/language.dat
88    xinstall -m 755 ${worksrcpath}/texlive-update-cnf \
89        ${destroot}${prefix}/libexec/texlive-update-cnf
90}
91
92pre-activate {
93    # Delete ls-R index file if it exists
94    if [file exists ${texlive_texmflocal}/ls-R] {
95        delete ${texlive_texmflocal}/ls-R
96    }
97
98    # Deactivate any of the texlive 2007 ports. replaced_by does not
99    # accomplish this because not all of these ports conflict with
100    # this one (although they will cause problems later).
101    foreach oldport {texlive_base texlive_texmf-full texlive_texmf-minimal texlive_texmf-docs} {
102        if {![catch {registry_active $oldport}]} {
103            registry_deactivate $oldport "" [list ports_nodepcheck 1]
104        }
105    }
106}
107
108post-activate {
109    system "${prefix}/libexec/texlive-update-cnf fmtutil.cnf"
110    system "${prefix}/libexec/texlive-update-cnf language.dat"
111    system "${prefix}/libexec/texlive-update-cnf language.def"
112    system "${prefix}/libexec/texlive-update-cnf updmap.cfg"
113}
Note: See TracBrowser for help on using the repository browser.