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

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

Merge texlive 2010 update from /users/dports to /trunk

texlive: update to TeX Live 2010 (#26430)

  • generate texmf.cnf from contents of $prefix/etc/texmf/texmf.cnf.d (#24204)
  • build binaries in texlive-bin but stage them in $prefix/libexec/texlive/binaries until they are activated by other ports when their support files are installed (#25460, #25875)
  • symlink binaries to $prefix/libexec/texlive/texbin for MacTeX support (#26784)
  • fix up some dependency problems, including pulling pgf out of texlive-pictures so texlive-latex-recommended can depend on it (#25478)
  • add pre-activate hooks to deactivate texlive 2009 ports when necessary to avoid conflicts during upgrade
  • remove asymptote and xindy texmf files so that we can have separate ports someday
  • many minor changes to packaging
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.3 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 73314 2010-11-10 04:19:13Z dports@macports.org $
3
4PortSystem          1.0
5PortGroup           texlive 1.0
6
7name                texlive-common
8version             2010
9
10categories          tex
11maintainers         dports
12description         TeX Live common infrastructure.
13long_description    This port provides files that support a MacPorts    \
14                    installation of TeX Live, such as configuration     \
15                    files and the scripts that generate them.
16
17homepage            http://www.tug.org/texlive/
18platforms           darwin
19supported_archs     noarch
20
21master_sites        http://flute.csail.mit.edu/texlive/
22worksrcdir          ${distname}
23use_xz              yes
24checksums           sha1     4bbab1829c4218b51e00eb07d7bd741cf29fce55 \
25                    rmd160   fc20939680399ec60e2ff80c312f994f975cfd83
26
27livecheck.type  regex
28livecheck.url   ${master_sites}
29livecheck.regex ${name}-(\[\\d-\]+)\\.tar
30
31
32post-patch {
33    foreach x {texmf.cnf.d/10paths.cnf texlive-update-cnf} {
34        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/${x}
35        reinplace "s|@@TEXMFMAIN@@|${texlive_texmfmain}|g" ${worksrcpath}/${x}
36        reinplace "s|@@TEXMFDIST@@|${texlive_texmfdist}|g" ${worksrcpath}/${x}
37        reinplace "s|@@TEXMFPORTS@@|${texlive_texmfports}|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_texmfports}
53    xinstall -d ${destroot}${texlive_texmflocal}
54    xinstall -d ${destroot}${texlive_texmfsysvar}
55    xinstall -d ${destroot}${texlive_texmfsysconfig}
56
57    # Create empty ls-R files so that they're marked as owned by this
58    # port. The contents will be generated/updated by mktexlsr.
59    touch ${destroot}${texlive_texmfmain}/ls-R
60    touch ${destroot}${texlive_texmfdist}/ls-R
61    touch ${destroot}${texlive_texmfports}/ls-R
62    touch ${destroot}${texlive_texmflocal}/ls-R
63    touch ${destroot}${texlive_texmfsysvar}/ls-R
64    touch ${destroot}${texlive_texmfsysconfig}/ls-R
65
66    # Create fmt/updmap/hyphen files, directories, and install update script
67    xinstall -d ${destroot}${texlive_texmfsysconfig}/fmtutil.d
68    xinstall -d ${destroot}${texlive_texmfsysconfig}/language.d
69    xinstall -d ${destroot}${texlive_texmfsysconfig}/updmap.d
70    xinstall -m 644 ${worksrcpath}/updmap-hdr.cfg \
71        ${destroot}${texlive_texmfsysconfig}/updmap.d/00updmap-hdr.cfg
72    xinstall -m 644 ${worksrcpath}/fmtutil-hdr.cnf \
73        ${destroot}${texlive_texmfsysconfig}/fmtutil.d/00fmtutil-hdr.cnf
74    xinstall -m 644 ${worksrcpath}/language.us \
75        ${destroot}${texlive_texmfsysconfig}/language.d/00language.us.dat
76    xinstall -m 644 ${worksrcpath}/language.us.def \
77        ${destroot}${texlive_texmfsysconfig}/language.d/00language.us.def
78    xinstall -d ${destroot}${texlive_texmfsysvar}/web2c
79    touch ${destroot}${texlive_texmfsysvar}/web2c/updmap.cfg
80    touch ${destroot}${texlive_texmfsysvar}/web2c/fmtutil.cnf
81    xinstall -d ${destroot}${texlive_texmfsysvar}/tex/generic/config
82    touch ${destroot}${texlive_texmfsysvar}/tex/generic/config/language.dat
83    xinstall -m 755 ${worksrcpath}/texlive-update-cnf \
84        ${destroot}${prefix}/libexec/texlive-update-cnf
85
86    # Install texmf.cnf files
87    touch ${destroot}${texlive_texmfsysconfig}/texmf.cnf
88    xinstall -d ${destroot}${texlive_texmfsysconfig}/texmf.cnf.d
89    foreach cnffile [glob -directory ${worksrcpath}/texmf.cnf.d *.cnf] {
90        xinstall -m 644 $cnffile \
91            ${destroot}${texlive_texmfsysconfig}/texmf.cnf.d/
92    }
93
94    # Symlink texmf.cnf to its usual expected location, just in case
95    # anything tries to look for it there
96    xinstall -d ${destroot}${texlive_texmflocal}/web2c
97    ln -s ${texlive_texmfsysconfig}/texmf.cnf \
98        ${destroot}${texlive_texmflocal}/web2c/texmf.cnf
99}
100
101pre-activate {
102    # Delete ls-R index file if it exists
103    if [file exists ${texlive_texmflocal}/ls-R] {
104        delete ${texlive_texmflocal}/ls-R
105    }
106
107    # Deactivate any of the texlive 2007 ports. replaced_by does not
108    # accomplish this because not all of these ports conflict with
109    # this one (although they will cause problems later).
110    foreach oldport {texlive_base texlive_texmf-full texlive_texmf-minimal texlive_texmf-docs} {
111        if {![catch {registry_active $oldport}]} {
112            registry_deactivate $oldport "" [list ports_nodepcheck 1]
113        }
114    }
115}
116
117post-activate {
118    system "${prefix}/libexec/texlive-update-cnf texmf.cnf"
119    system "${prefix}/libexec/texlive-update-cnf fmtutil.cnf"
120    system "${prefix}/libexec/texlive-update-cnf language.dat"
121    system "${prefix}/libexec/texlive-update-cnf language.def"
122    system "${prefix}/libexec/texlive-update-cnf updmap.cfg"
123
124    # run mktexlsr if it exists (i.e. if we are upgrading an existing
125    # installation)
126    if [file exists ${prefix}/bin/mktexlsr] {
127        system "${prefix}/bin/mktexlsr"
128    }
129}
Note: See TracBrowser for help on using the repository browser.