Changeset 68968


Ignore:
Timestamp:
Jun 18, 2010, 10:16:40 PM (8 years ago)
Author:
dports@…
Message:

texlive-1.0.tcl: fix installation with -doc variant (#25329):

  • remove dependencies on texlive-documentation-* ports when -doc is specified
  • install a file in $prefix/share/doc/texlive containing the list of TeX packages installed by each texmf port. Besides being ostensibly useful information, this keeps MacPorts from erroring out if no other files were installed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/texlive-1.0.tcl

    r68892 r68968  
    6565set texlive_texmfsysconfig "${prefix}/etc/texmf"
    6666
     67# Remove dependencies on any texlive-documentation-* ports, for use by
     68# -doc variants
     69proc texlive.removedocdepends {} {
     70    global depends_lib
     71    set toremove {}
     72    foreach dep $depends_lib {
     73        if [regexp {^port:texlive-documentation-} $dep] {
     74            lappend toremove $dep
     75        }
     76    }
     77    depends_lib-delete $toremove
     78}
    6779
    6880#
     
    108120    default_variants +doc
    109121
     122    if {![variant_isset "doc"]} {
     123        # Skip any dependencies on texlive-documentation-* ports
     124        texlive.removedocdepends
     125    }
     126   
    110127    use_configure   no
    111128
     
    155172        }
    156173
     174        # install a documentation file containing the list of TeX
     175        # packages installed. This also ensures that each port
     176        # provides at least one file, even if there's nothing to
     177        # install (e.g. documentation ports with -doc)
     178        xinstall -d ${destroot}${prefix}/share/doc/texlive
     179        set docfile [open ${destroot}${prefix}/share/doc/texlive/${name} "w"]
     180        puts $docfile "${name} version ${version} (MacPorts revision ${version}_${revision})"
     181        puts $docfile "\nTeX Live packages contained in this port:"
     182        set pkgfile [open ${worksrcpath}/tlpkginfo/pkgs]
     183        while {[gets $pkgfile line] >= 0} {
     184            set splitline [split $line]
     185            set pkg [lindex $splitline 0]
     186            set pkgdesc [join [lrange $splitline 1 end]]
     187            puts $docfile "    $pkg: $pkgdesc"
     188        }
     189        close $pkgfile
     190        close $docfile
     191
     192        # install fmtutil.cnf file
    157193        if {${texlive.formats} != ""} {
    158194            xinstall -d ${destroot}${texlive_texmfsysconfig}/fmtutil.d
     
    186222        }
    187223
     224        # install updmap.cfg file
    188225        if {${texlive.maps} != ""} {
    189226            xinstall -d ${destroot}${texlive_texmfsysconfig}/updmap.d
     
    197234        }
    198235
     236        # install languages.dat and languages.def files
    199237        if {${texlive.languages} != ""} {
    200238            xinstall -d ${destroot}${texlive_texmfsysconfig}/language.d
Note: See TracChangeset for help on using the changeset viewer.