[72667] users/dports/ports
dports at macports.org
dports at macports.org
Sat Oct 23 00:54:26 PDT 2010
Revision: 72667
http://trac.macports.org/changeset/72667
Author: dports at macports.org
Date: 2010-10-23 00:54:21 -0700 (Sat, 23 Oct 2010)
Log Message:
-----------
Copy texlive ports in preparation for TL2010 update
Added Paths:
-----------
users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl
users/dports/ports/tex/texlive/
users/dports/ports/tex/texlive-basic/
users/dports/ports/tex/texlive-bibtex-extra/
users/dports/ports/tex/texlive-bin/
users/dports/ports/tex/texlive-bin-extra/
users/dports/ports/tex/texlive-common/
users/dports/ports/tex/texlive-context/
users/dports/ports/tex/texlive-documentation-arabic/
users/dports/ports/tex/texlive-documentation-base/
users/dports/ports/tex/texlive-documentation-bulgarian/
users/dports/ports/tex/texlive-documentation-chinese/
users/dports/ports/tex/texlive-documentation-czechslovak/
users/dports/ports/tex/texlive-documentation-dutch/
users/dports/ports/tex/texlive-documentation-english/
users/dports/ports/tex/texlive-documentation-finnish/
users/dports/ports/tex/texlive-documentation-french/
users/dports/ports/tex/texlive-documentation-german/
users/dports/ports/tex/texlive-documentation-italian/
users/dports/ports/tex/texlive-documentation-japanese/
users/dports/ports/tex/texlive-documentation-korean/
users/dports/ports/tex/texlive-documentation-mongolian/
users/dports/ports/tex/texlive-documentation-polish/
users/dports/ports/tex/texlive-documentation-portuguese/
users/dports/ports/tex/texlive-documentation-russian/
users/dports/ports/tex/texlive-documentation-slovenian/
users/dports/ports/tex/texlive-documentation-spanish/
users/dports/ports/tex/texlive-documentation-thai/
users/dports/ports/tex/texlive-documentation-turkish/
users/dports/ports/tex/texlive-documentation-ukrainian/
users/dports/ports/tex/texlive-documentation-vietnamese/
users/dports/ports/tex/texlive-fonts-extra/
users/dports/ports/tex/texlive-fonts-recommended/
users/dports/ports/tex/texlive-fontutils/
users/dports/ports/tex/texlive-formats-extra/
users/dports/ports/tex/texlive-games/
users/dports/ports/tex/texlive-generic-extra/
users/dports/ports/tex/texlive-generic-recommended/
users/dports/ports/tex/texlive-htmlxml/
users/dports/ports/tex/texlive-humanities/
users/dports/ports/tex/texlive-lang-african/
users/dports/ports/tex/texlive-lang-arabic/
users/dports/ports/tex/texlive-lang-armenian/
users/dports/ports/tex/texlive-lang-cjk/
users/dports/ports/tex/texlive-lang-croatian/
users/dports/ports/tex/texlive-lang-cyrillic/
users/dports/ports/tex/texlive-lang-czechslovak/
users/dports/ports/tex/texlive-lang-danish/
users/dports/ports/tex/texlive-lang-dutch/
users/dports/ports/tex/texlive-lang-finnish/
users/dports/ports/tex/texlive-lang-french/
users/dports/ports/tex/texlive-lang-german/
users/dports/ports/tex/texlive-lang-greek/
users/dports/ports/tex/texlive-lang-hebrew/
users/dports/ports/tex/texlive-lang-hungarian/
users/dports/ports/tex/texlive-lang-indic/
users/dports/ports/tex/texlive-lang-italian/
users/dports/ports/tex/texlive-lang-latin/
users/dports/ports/tex/texlive-lang-latvian/
users/dports/ports/tex/texlive-lang-lithuanian/
users/dports/ports/tex/texlive-lang-mongolian/
users/dports/ports/tex/texlive-lang-norwegian/
users/dports/ports/tex/texlive-lang-other/
users/dports/ports/tex/texlive-lang-polish/
users/dports/ports/tex/texlive-lang-portuguese/
users/dports/ports/tex/texlive-lang-spanish/
users/dports/ports/tex/texlive-lang-swedish/
users/dports/ports/tex/texlive-lang-tibetan/
users/dports/ports/tex/texlive-lang-ukenglish/
users/dports/ports/tex/texlive-lang-vietnamese/
users/dports/ports/tex/texlive-latex/
users/dports/ports/tex/texlive-latex-extra/
users/dports/ports/tex/texlive-latex-recommended/
users/dports/ports/tex/texlive-latex3/
users/dports/ports/tex/texlive-luatex/
users/dports/ports/tex/texlive-math-extra/
users/dports/ports/tex/texlive-metapost/
users/dports/ports/tex/texlive-music/
users/dports/ports/tex/texlive-omega/
users/dports/ports/tex/texlive-pictures/
users/dports/ports/tex/texlive-plain-extra/
users/dports/ports/tex/texlive-pstricks/
users/dports/ports/tex/texlive-publishers/
users/dports/ports/tex/texlive-science/
users/dports/ports/tex/texlive-xetex/
users/dports/ports/tex/texlive_base/
users/dports/ports/tex/texlive_texmf-docs/
users/dports/ports/tex/texlive_texmf-full/
users/dports/ports/tex/texlive_texmf-minimal/
Copied: users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl (from rev 72570, trunk/dports/_resources/port1.0/group/texlive-1.0.tcl)
===================================================================
--- users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl (rev 0)
+++ users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl 2010-10-23 07:54:21 UTC (rev 72667)
@@ -0,0 +1,342 @@
+# $Id$
+#
+# Copyright (c) 2010 Dan R. K. Ports <dports at macports.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# This portgroup contains common definitions for a MacPorts
+# installation of TeX Live. It can be used in one of two ways:
+#
+# 1. for installing "texmf ports". These contain tex files and are
+# installed from preprocessed distfiles made from TeXLive
+# packages. These ports should invoke texlive.texmfport to set up
+# the installation process.
+#
+# 2. other ports, like texlive-common or texlive-bin can include this
+# portgroup (but not call texlive.texmfport) to get texlive path
+# definitions and the like.
+
+#
+# texmf tree paths
+#
+
+# texmf files installed by texlive
+set texlive_texmfmain "${prefix}/share/texmf-texlive"
+
+# texmf files installed by texlive, but nominally distribution-independent
+# not clear it's really necessary to separate these from texmfmain,
+# but texlive goes to great effort to keep them separate, so we might as
+# well too
+set texlive_texmfdist "${prefix}/share/texmf-texlive-dist"
+
+# "local" texmf files, e.g. installed by ports other than texlive
+set texlive_texmflocal "${prefix}/share/texmf"
+
+# variable runtime data, e.g. formats
+set texlive_texmfsysvar "${prefix}/var/db/texmf"
+
+# configuration data from texconfig
+set texlive_texmfsysconfig "${prefix}/etc/texmf"
+
+# Remove dependencies on any texlive-documentation-* ports, for use by
+# -doc variants
+proc texlive.removedocdepends {} {
+ global depends_lib
+ foreach dep $depends_lib {
+ if [regexp {^port:texlive-documentation-} $dep] {
+ depends_lib-delete $dep
+ }
+ }
+}
+
+#
+# For installing texmf ports
+#
+
+# Files to skip installation of, specified in terms of their path in
+# the texmf tree, e.g. texmf-dist/foo/bar/
+options texlive.exclude
+default texlive.exclude {}
+
+# Skip installing all manpages. A number of texmf ports include
+# manpages, but many of them are already installed by texmf-bin.
+options texlive.excludemanpages
+default texlive.excludemanpages no
+
+options texlive.formats texlive.languages texlive.maps
+default texlive.formats {}
+default texlive.languages {}
+default texlive.maps {}
+
+options texlive.forceupdatecnf
+default texlive.forceupdatecnf no
+
+proc texlive.texmfport {} {
+ homepage http://www.tug.org/texlive/
+ platforms darwin
+
+ supported_archs noarch
+
+ master_sites http://flute.csail.mit.edu/texlive/
+ use_bzip2 yes
+
+ global name master_sites
+ livecheck.type regex
+ livecheck.url ${master_sites}
+ livecheck.regex ${name}-(\\d+)\\.tar\\.bz2
+
+ depends_lib-append port:texlive-common port:texlive-bin
+
+ variant doc description "Install documentation" { }
+ variant src description "Install TeX source" { }
+ default_variants +doc
+
+ if {![variant_isset "doc"]} {
+ # Skip any dependencies on texlive-documentation-* ports
+ texlive.removedocdepends
+ }
+
+ use_configure no
+
+ build { }
+
+ destroot {
+ set indexlist {"runfiles"}
+ if {[variant_isset "doc"]} { lappend indexlist "docfiles" }
+ if {[variant_isset "src"]} { lappend indexlist "srcfiles" }
+
+ # copy files listed in tlpkginfo/$indexname into destroot
+ foreach indexname $indexlist {
+ set filelist [open ${worksrcpath}/tlpkginfo/${indexname}]
+ while {[gets $filelist line] >= 0} {
+ # Check if file is excluded
+ set excluded false
+ foreach excludeline ${texlive.exclude} {
+ if {[string equal -nocase $line $excludeline]} {
+ # file is specifically excluded
+ set excluded true
+ break
+ }
+ if {[string equal -nocase -length [expr [string length $excludeline] + 1] $line "$excludeline/"]} {
+ # this is a file in an excluded directory
+ set excluded true
+ break;
+ }
+ }
+ if {$excluded} {
+ continue
+ }
+
+ set srcfile ${worksrcpath}/${indexname}/$line
+
+ # check for manpages and treat specially
+ if [regexp {^texmf/doc/man/man(\d)/([^/]+)} $line -> section filename] {
+ if {![tbool texlive.excludemanpages]} {
+ if [string match "*.$section" $filename] {
+ # actually a manpage; install it
+ copy $srcfile ${destroot}${prefix}/share/man/man$section/
+ } else {
+ # not actually a manpage; do nothing
+ # (e.g. don't install PDF manpages)
+ }
+ }
+ } else {
+ # not a manpage; install into requested target dir
+ # translate path in line to destination
+ set splitline [split $line "/"]
+ switch [lindex $splitline 0] {
+ "texmf" {lset splitline 0 ${texlive_texmfmain}}
+ "texmf-dist" {lset splitline 0 ${texlive_texmfdist}}
+ default { ui_msg "warning: unknown file destination" }
+ }
+ set dstfile [join $splitline "/"]
+
+ # create directory if necessary, and install file
+ xinstall -d ${destroot}[file dirname $dstfile]
+ copy ${srcfile} ${destroot}${dstfile}
+ }
+ }
+ }
+
+ # install a documentation file containing the list of TeX
+ # packages installed. This also ensures that each port
+ # provides at least one file, even if there's nothing to
+ # install (e.g. documentation ports with -doc)
+ xinstall -d ${destroot}${prefix}/share/doc/texlive
+ set docfile [open ${destroot}${prefix}/share/doc/texlive/${name} "w"]
+ puts $docfile "${name} version ${version} (MacPorts revision ${version}_${revision})"
+ puts $docfile "\nTeX Live packages contained in this port:"
+ set pkgfile [open ${worksrcpath}/tlpkginfo/pkgs]
+ while {[gets $pkgfile line] >= 0} {
+ set splitline [split $line]
+ set pkg [lindex $splitline 0]
+ set pkgdesc [join [lrange $splitline 1 end]]
+ puts $docfile " $pkg: $pkgdesc"
+ }
+ close $pkgfile
+ close $docfile
+
+ # install fmtutil.cnf file
+ if {${texlive.formats} != ""} {
+ xinstall -d ${destroot}${texlive_texmfsysconfig}/fmtutil.d
+ set fmtfilename \
+ ${destroot}${texlive_texmfsysconfig}/fmtutil.d/10${name}.cnf
+ set fmtfile [open $fmtfilename "w"]
+ foreach x ${texlive.formats} {
+ set fmtenabled [lindex $x 0]
+ set fmtname [lindex $x 1]
+ set fmtengine [lindex $x 2]
+ set fmtpatterns [lindex $x 3]
+ set fmtoptions [lindex $x 4]
+ if {!$fmtenabled} {
+ set fmtprefix "#! "
+ } else {
+ set fmtprefix ""
+ }
+
+ puts $fmtfile \
+ "$fmtprefix$fmtname\t$fmtengine\t$fmtpatterns\t$fmtoptions"
+
+ # Simulate texlinks
+ if {($fmtengine != $fmtname) &&
+ ![file exists ${destroot}${prefix}/bin/$fmtname]} {
+ ln -s ${prefix}/bin/$fmtengine \
+ ${destroot}${prefix}/bin/$fmtname
+ }
+ }
+
+ close $fmtfile
+ }
+
+ # install updmap.cfg file
+ if {${texlive.maps} != ""} {
+ xinstall -d ${destroot}${texlive_texmfsysconfig}/updmap.d
+ set mapfilename \
+ ${destroot}${texlive_texmfsysconfig}/updmap.d/10${name}.cfg
+ set mapfile [open $mapfilename "w"]
+ foreach x ${texlive.maps} {
+ puts $mapfile $x
+ }
+ close $mapfile
+ }
+
+ # install languages.dat and languages.def files
+ if {${texlive.languages} != ""} {
+ xinstall -d ${destroot}${texlive_texmfsysconfig}/language.d
+ set langdatfilename \
+ ${destroot}${texlive_texmfsysconfig}/language.d/10${name}.dat
+ set langdeffilename \
+ ${destroot}${texlive_texmfsysconfig}/language.d/10${name}.def
+ set langdatfile [open $langdatfilename "w"]
+ set langdeffile [open $langdeffilename "w"]
+ foreach x ${texlive.languages} {
+ set langname [lindex $x 0]
+ set langfile [lindex $x 1]
+ set langlhmin [lindex $x 2]
+ set langrhmin [lindex $x 3]
+ set langsyns [lindex $x 4]
+
+ puts $langdatfile "$langname $langfile"
+ foreach syn $langsyns {
+ puts $langdatfile "=$syn"
+ }
+
+ foreach syn [concat $langname $langsyns] {
+ puts $langdeffile "\\addlanguage{$syn}{$langfile}{}{$langlhmin}{$langrhmin}"
+ }
+ }
+ close $langdatfile
+ close $langdeffile
+ }
+ }
+
+ post-activate {
+ system "${prefix}/bin/mktexlsr"
+ if {${texlive.forceupdatecnf}} {
+ # If force was specified, update all the config files, and
+ # regenerate all maps and formats.
+ system "${prefix}/libexec/texlive-update-cnf language.dat"
+ system "${prefix}/libexec/texlive-update-cnf language.def"
+ system "${prefix}/libexec/texlive-update-cnf updmap.cfg"
+ system "${prefix}/libexec/texlive-update-cnf fmtutil.cnf"
+ system "${prefix}/bin/updmap-sys"
+ system "${prefix}/bin/fmtutil-sys --all"
+ } else {
+ # Otherwise, only update the config files that are
+ # actually affected, and only generate the formats that
+ # are being installed.
+ if {${texlive.languages} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf language.dat"
+ system "${prefix}/libexec/texlive-update-cnf language.def"
+ }
+ if {${texlive.maps} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf updmap.cfg"
+ system "${prefix}/bin/updmap-sys"
+ }
+ if {${texlive.formats} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf fmtutil.cnf"
+ foreach x ${texlive.formats} {
+ set fmtname [lindex $x 1]
+ system "${prefix}/bin/fmtutil-sys --byfmt $fmtname"
+ }
+ }
+ }
+ }
+
+ post-deactivate {
+ # Update ls-R and any config files to reflect that the package
+ # is now gone
+ system "${prefix}/bin/mktexlsr"
+ if {${texlive.forceupdatecnf} || ${texlive.languages} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf language.dat"
+ system "${prefix}/libexec/texlive-update-cnf language.def"
+ }
+ if {${texlive.forceupdatecnf} || ${texlive.maps} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf updmap.cfg"
+ }
+ if {${texlive.forceupdatecnf} || ${texlive.formats} != ""} {
+ system "${prefix}/libexec/texlive-update-cnf fmtutil.cnf"
+ }
+
+ # Remove any generated format files
+ foreach x ${texlive.formats} {
+ set fmtname [lindex $x 1]
+ set fmtengine [lindex $x 2]
+ switch $fmtengine {
+ "mf" -
+ "mf-nowin" {set fmtengine "metafont"}
+ "mpost" {set fmtengine "metapost"}
+ }
+
+ foreach filename [glob -nocomplain ${texlive_texmfsysvar}/web2c/$fmtengine/$fmtname.*] {
+ delete $filename
+ }
+ }
+ }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101023/e7678619/attachment.html>
More information about the macports-changes
mailing list