Changeset 54435


Ignore:
Timestamp:
Jul 27, 2009, 5:52:52 PM (9 years ago)
Author:
mnick@…
Message:
  • remove unnecessary start matches in Description-, Checksums- and DependsEntries-region
  • add support for automake/conf, build, test and destroot phases
  • add univeral_variant
  • add support for StartupItems and Livecheck/Distcheck
File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/mpvim/syntax/portfile.vim

    r54240 r54435  
    2727syn keyword PortfileRequired    homepage master_sites categories platforms checksums
    2828syn match PortfileRequired              "^\(long_\)\?description" nextgroup=PortfileDescription skipwhite
    29 syn region PortfileDescription  matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained
     29syn region PortfileDescription  matchgroup=Normal start="" skip="\\$" end="$" contained
    3030
    3131syn keyword PortfileOptional    PortGroup epoch revision worksrcdir distname platform
     
    3434
    3535syn keyword PortfileOptional    checksums nextgroup=PortfileChecksums skipwhite
    36 syn region PortfileChecksums    matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained contains=PortfileChecksumsType
     36syn region PortfileChecksums    matchgroup=Normal start="" skip="\\$" end="$" contained contains=PortfileChecksumsType
    3737syn keyword PortfileChecksumsType md5 sha1 rmd160 contained
    3838
     
    6161syn match PortfilePhasesConf    "configure\.\(perl\|python\|ruby\|install\|awk\|bison\)"
    6262syn match PortfilePhasesConf    "configure\.\(pkg_config\(_path\)*\)"
     63syn match PortfilePhasesConf    "configure.universal_\(args\|\(c\|cpp\|cxx\|ld\)flags\)"
     64
     65" Automake and Autoconf
     66syn match PortfilePhasesAA              "use_\(automake\|autoconf\)" nextgroup=PortfileYesNo skipwhite
     67syn match PortfilePhasesAA              "auto\(make\|conf\).\(env\|args\|dir\)"
     68
     69" Build phase options
     70syn match PortfilePhasesBuild   "build.\(cmd\|type\)"
     71syn match PortfilePhasesBuild   "build.\(\(pre\|post\)_\)*args"
     72syn match PortfilePhasesBuild   "build.\(target\|env\)\(-\(append\|delete\)\)*"
     73syn keyword PortfilePhasesBuild use_parallel_build nextgroup=PortfileYesNo skipwhite
     74
     75" Test phase options
     76syn match PortfilePhasesTest    "test.\(run\|cmd\|target\)"
     77syn match PortfilePhasesTest    "test.env\(-\(append\|delete\)\)*"
     78
     79" Test destroot options
     80syn match PortfilePhasesDest    "destroot.\(cmd\|type\|destdir\|umask\|keepdirs\|violate_mtree\)"
     81syn match PortfilePhasesDest    "destroot.\(\(pre\|post\)_\)*args"
     82syn match PortfilePhasesDest    "destroot.target\(-\(append\|delete\)\)*"
    6383
    6484" Variants
     
    6888syn keyword PortfileVariantDescription  description nextgroup=PortfileGroup contained
    6989syn match PortfileVariantName                   "[a-zA-Z0-9_]\+" contained
    70 
     90syn keyword PortfileOptional                    universal_variant nextgroup=PortfileYesNo skipwhite
    7191syn keyword PortfileOptional                    default_variants nextgroup=PortfileDefaultVariants skipwhite
    7292syn match PortfileDefaultVariants               "\([+|\-][a-zA-Z0-9_]\+\s*\)\+" contained
    7393
    74 " Depends
    75 syn match PortfileDepends                               "depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
    76 syn region PortfileDependsEntries               matchgroup=Normal start="[^\s]" skip="\\$" end="$" contains=PortfileDependsEntry contained
    77 syn match PortfileDependsEntry                  "\(port\|bin\):" contained
     94" Dependencies
     95syn match PortfileDepends                       "depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
     96syn region PortfileDependsEntries       matchgroup=Normal start="" skip="\\$" end="$" contains=PortfileDependsEntry contained
     97syn match PortfileDependsEntry          "\(port\|bin\):" contained
     98
     99" StartupItems
     100syn match PortfileOptional                      "startupitem.\(start\|stop\|restart\|init\|pidfile\)"
     101
     102" Livecheck / Distcheck
     103syn match PortfileOptional                      "livecheck.\(check\|name\|distname\|version\|url\|regex\|md5\)"
     104syn keyword PortfileOptional            distcheck.check
    78105
    79106" check whitespace, copied from python.vim
     
    99126hi def link PortfilePhasesPatch                 Keyword
    100127hi def link PortfilePhasesConf                  Keyword
     128hi def link PortfilePhasesAA                    Keyword
     129hi def link PortfilePhasesBuild                 Keyword
     130hi def link PortfilePhasesTest                  Keyword
     131hi def link PortfilePhasesDest                  Keyword
    101132
    102133hi def link PortfileVariantConflicts    Statement
Note: See TracChangeset for help on using the changeset viewer.