Revision
77477
Author
dports@macports.org
Date
2011-03-31 17:36:31 -0700 (Thu, 31 Mar 2011)

Log Message

texlive portgroup: when installing links after format generation, if
texlive-bin provides a binary with the same name as the format, use
that instead of the engine that generated the format

Revbump texlive-basic, the only port that should be affected by this
change

Fixes #28890: no X support for metafont because mf is incorrectly
symlinked to mf-nowin

Modified Paths

Diff

Modified: trunk/dports/_resources/port1.0/group/texlive-1.0.tcl (77476 => 77477)


--- trunk/dports/_resources/port1.0/group/texlive-1.0.tcl	2011-03-31 22:45:47 UTC (rev 77476)
+++ trunk/dports/_resources/port1.0/group/texlive-1.0.tcl	2011-04-01 00:36:31 UTC (rev 77477)
@@ -256,11 +256,20 @@
                     "$fmtprefix$fmtname\t$fmtengine\t$fmtpatterns\t$fmtoptions"
 
                 # Simulate texlinks
-                if {($fmtengine != $fmtname) &&
-                    ![file exists ${destroot}${prefix}/bin/$fmtname]} {
-                    ln -s ${prefix}/bin/$fmtengine \
+                if {![file exists ${destroot}${prefix}/bin/$fmtname]} {
+                    # Decide what to link. Use the specified engine
+                    # unless a binary with the same name as the
+                    # program exists (this can happen for metafont;
+                    # see #28890)
+                    if {[file exists ${texlive_bindir}/$fmtname]} {
+                        set linksource ${texlive_bindir}/$fmtname
+                    } else {
+                        set linksource ${prefix}/bin/$fmtengine
+                    }
+                    
+                    ln -s $linksource \
                         ${destroot}${prefix}/bin/$fmtname
-                    ln -s ${prefix}/bin/$fmtengine \
+                    ln -s $linksource \
                         ${destroot}${texlive_mactex_texbindir}/$fmtname
                 }
             }

Modified: trunk/dports/tex/texlive-basic/Portfile (77476 => 77477)


--- trunk/dports/tex/texlive-basic/Portfile	2011-03-31 22:45:47 UTC (rev 77476)
+++ trunk/dports/tex/texlive-basic/Portfile	2011-04-01 00:36:31 UTC (rev 77477)
@@ -6,7 +6,7 @@
 
 name                texlive-basic
 version             19496
-revision            1
+revision            2
 
 categories          tex
 maintainers         dports