Changeset 137300


Ignore:
Timestamp:
Jun 8, 2015, 6:06:12 PM (5 years ago)
Author:
larryv@…
Message:

ghostscript: Avoid calling xinstall inside loops

glob is more expressive than you think.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/print/ghostscript/Portfile

    r137291 r137300  
    126126    # Check: could break on case-sensitive file systems...
    127127    xinstall -m 0755 -d ${destroot}${prefix}/share/fonts/Type1/gsfonts
    128     foreach f {{[a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z].*} fonts.scale fonts.dir} {
    129         xinstall -m 0644 {*}[glob [join [concat "${workpath}/fonts/" ${f}] ""]] ${destroot}${prefix}/share/fonts/Type1/gsfonts
    130     }
     128    xinstall -m 0644 \
     129            {*}[glob -directory ${workpath}/fonts {[a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z].*} fonts.scale fonts.dir] \
     130            ${destroot}${prefix}/share/fonts/Type1/gsfonts
    131131
    132132    # Delete the already copied fonts to not copy them again when installing the "other" fonts.
    133     delete {*}[glob [join [concat "${workpath}/fonts/" {[a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z].*}] ""]]
     133    delete {*}[glob -directory ${workpath}/fonts {[a-z][0-9][0-9][0-9][0-9][0-9][0-9][a-z].*}]
    134134
    135135    # other fonts - install into private ghostscript directory.
    136136    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts
    137     foreach f {*.afm *.gsf *.pfa *.pfm} {
    138         xinstall -m 644 {*}[glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts
    139     }
     137    xinstall -m 644 {*}[glob -directory ${workpath}/fonts *.afm *.gsf *.pfa *.pfm] \
     138            ${destroot}${prefix}/share/${name}/fonts
    140139
    141140    xinstall -m 755 -d ${destroot}${prefix}/share/doc
     
    144143    # std fonts - "documentation"
    145144    xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}/fonts
    146     foreach docfile {COPYING ChangeLog README README.tweaks TODO} {
    147         xinstall -m 0644 ${workpath}/fonts/${docfile} ${destroot}${prefix}/share/doc/${name}/fonts
    148     }
     145    xinstall -m 0644 -W ${workpath}/fonts \
     146            COPYING ChangeLog README README.tweaks TODO \
     147            ${destroot}${prefix}/share/doc/${name}/fonts
    149148}
    150149
Note: See TracChangeset for help on using the changeset viewer.