New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80956


Ignore:
Timestamp:
07/21/11 17:06:34 (4 years ago)
Author:
dports@…
Message:

texlive portgroup: create a texlive.mktexlsr function that runs
mktexlsr, and also runs mtxrun --generate (for ConTeXt) if it's
installed.

Add texlive.use_mktexlsr option (on by default) to control whether to
run mktexlsr during post-activate. texlive-documentation-base needs to
disable it because it is installed before texlive-basic.

Location:
users/dports/ports
Files:
3 edited

Legend:

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

    r80924 r80956  
    8787set texlive_mactex_texbindir "${prefix}/libexec/texlive/texbin" 
    8888 
     89# update texmf file path databases (ls-R) 
     90# 
     91# This should be run in the post-activate/deactivate hooks of any port 
     92# that installs texmf files. It updates the kpathsea database using 
     93# mktexlsr (formerly texhash), as well as ConTeXt's cache. 
     94proc texlive.mktexlsr {} { 
     95    global prefix 
     96 
     97    # Run mktexlsr. If that's not available, something's wrong. 
     98    system "${prefix}/bin/mktexlsr" 
     99 
     100    # If mtxrun is available (i.e. ConTeXt is installed), update its 
     101    # cache too. If it's not installed, that's OK. 
     102    if [file exists "${prefix}/bin/mtxrun"] { 
     103        system "${prefix}/bin/mtxrun --generate" 
     104    } 
     105} 
     106 
    89107# Remove dependencies on any texlive-documentation-* ports, for use by 
    90108# -doc variants 
     
    113131default texlive.maps {} 
    114132 
     133# Whether to regenerate all config files, maps, and formats after 
     134# activation regardless of whether any new ones are installed. 
    115135options texlive.forceupdatecnf 
    116136default texlive.forceupdatecnf no 
     137 
     138# Whether to run mktexlsr after activation. Usually required if 
     139# installing any texmf files. 
     140options texlive.use_mktexlsr 
     141default texlive.use_mktexlsr yes 
    117142 
    118143proc texlive.texmfport {} { 
     
    360385 
    361386    post-activate { 
    362         system "${texlive_bindir}/mktexlsr" 
     387        if {${texlive.use_mktexlsr}} { 
     388            texlive.mktexlsr 
     389        } 
     390         
    363391        if {${texlive.forceupdatecnf}} { 
    364392            # If force was specified, update all the config files, and 
     
    406434        # Update ls-R and any config files to reflect that the package 
    407435        # is now gone 
    408         system "${texlive_bindir}/mktexlsr" 
     436        texlive.mktexlsr 
    409437        if {${texlive.forceupdatecnf} || ${texlive.languages} != ""} { 
    410438            system "${prefix}/libexec/texlive-update-cnf language.dat" 
  • users/dports/ports/tex/texlive-common/Portfile

    r80925 r80956  
    147147    # installation) 
    148148    if [file exists ${prefix}/bin/mktexlsr] { 
    149         system "${prefix}/bin/mktexlsr" 
     149        texlive.mktexlsr 
    150150    } 
    151151} 
  • users/dports/ports/tex/texlive-documentation-base/Portfile

    r80561 r80956  
    1818                    rmd160  c51afcda5cabe1e3f6b2accc967d9277d0748fd5 
    1919 
     20# This port is installed prior to texlive-basic, so mktexlsr is not 
     21# available yet. Do not try to run it in post-activate. 
     22texlive.use_mktexlsr no 
    2023 
    2124texlive.texmfport 
Note: See TracChangeset for help on using the changeset viewer.