Changeset 54240


Ignore:
Timestamp:
Jul 23, 2009, 5:39:54 PM (10 years ago)
Author:
mnick@…
Message:
  • consolidate PortfilePhases(CVS|SVN|GIT|HG) in PorfilePhasesFetch
  • add use_ match for PortfilePhasesExtract
  • add PortfilePhasesPatch
  • add PortfilePhasesConf
File:
1 edited

Legend:

Unmodified
Added
Removed
  • users/mnick/macports.vim/syntax/portfile.vim

    r54201 r54240  
    2020unlet b:current_syntax
    2121
     22
     23syn match PortfileGroup                 "{.\+}" contained
     24syn match PortfileYesNo                 "\(yes\|no\)" contained
     25
    2226syn keyword PortfileRequired    PortSystem name version maintainers
    2327syn keyword PortfileRequired    homepage master_sites categories platforms checksums
     
    2933syn keyword PortifleOptional    patch_sites distfiles dist_subdir
    3034
    31 syn keyword PortfileOptional    extract. use_7z use_bzip2 use_lzma
    32 syn keyword PortfileOptional    use_zip
     35syn keyword PortfileOptional    checksums nextgroup=PortfileChecksums skipwhite
     36syn region PortfileChecksums    matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained contains=PortfileChecksumsType
     37syn keyword PortfileChecksumsType md5 sha1 rmd160 contained
    3338
    34 syn match PortfilePhases                "\(\(pre\|post\)\-\)*\(fetch\|checksum\|extract\|patch\|configure\|build\|test\|destroot\|archive\|install\|activate\)\s"               
     39syn match PortfilePhases                "\(\(pre\|post\)\-\)*\(fetch\|checksum\|extract\|patch\|configure\|build\|test\|destroot\|archive\|install\|activate\)\s" contains=PortfilePrePost
    3540
    3641" Fetch phase options
    3742syn match PortfilePhasesFetch   "fetch\.\(type\|user\|password\|use_epsv\|ignore_sllcert\)"
    38 syn match PortfilePhasesCVS     "cvs\.\(root\|password\|tag\|date\|module\)"
    39 syn match PortfilePhasesSVN     "svn\.\(url\|tag\)"
    40 syn match PortfilePhasesGIT     "git\.\(url\|branch\)"
    41 syn match PortfilePhasesHG              "hg\.\(url\|tag\)"
     43syn match PortfilePhasesFetch   "cvs\.\(root\|password\|tag\|date\|module\)"
     44syn match PortfilePhasesFetch   "svn\.\(url\|tag\)"
     45syn match PortfilePhasesFetch   "git\.\(url\|branch\)"
     46syn match PortfilePhasesFetch   "hg\.\(url\|tag\)"
    4247
    4348" Extract phase options
    4449syn match PortfilePhasesExtract "extract\.\(suffix\|mkdir\|cmd\|only\(\-\(append\|delete\)\)*\)"
     50syn match PortfilePhasesExtract "use_\(7z\|bzip2\|lzma\|zip\)" nextgroup=PortfileYesNo skipwhite
     51
     52" Patch phase options
     53syn match PortfilePhasesPatch   "patch\.\(dir\|cmd\|args\(\-\(append\|delete\)\)*\)"
     54syn match PortfilePhasesPatch   "patchfiles\(\-\(append\|delete\)\)*"
     55
     56" Configure phase options
     57syn keyword PortfilePhasesConf  use_configure nextgroup=PortfileYesNo skipwhite
     58syn match PortfilePhasesConf    "configure\.\(env\|\(c\|ld\|cpp\|cxx\|objc\|f\|fc\|f90\)flags\)\(-\(append\|delete\)\)*"
     59syn match PortfilePhasesConf    "configure\.\(\(pre\|post\)\-\)*args\(-\(\append\|delete\)\)"
     60syn match PortfilePhasesConf    "configure\.\(cc\|cpp\|cxx\|objc\|fc\|f77\|f90\|javac\|compiler\)"
     61syn match PortfilePhasesConf    "configure\.\(perl\|python\|ruby\|install\|awk\|bison\)"
     62syn match PortfilePhasesConf    "configure\.\(pkg_config\(_path\)*\)"
    4563
    4664" Variants
     
    5371syn keyword PortfileOptional                    default_variants nextgroup=PortfileDefaultVariants skipwhite
    5472syn match PortfileDefaultVariants               "\([+|\-][a-zA-Z0-9_]\+\s*\)\+" contained
    55 syn match PortfileGroup                                 "{.\+}" contained
    5673
    5774" Depends
    58 syn match PortfileDepends                               "^depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
     75syn match PortfileDepends                               "depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
    5976syn region PortfileDependsEntries               matchgroup=Normal start="[^\s]" skip="\\$" end="$" contains=PortfileDependsEntry contained
    6077syn match PortfileDependsEntry                  "\(port\|bin\):" contained
     
    6986endif
    7087
     88hi def link PortfileGroup                               String
     89hi def link PortfileYesNo                               Special
    7190
    7291hi def link PortfileRequired                    Keyword
    7392hi def link PortfileOptional                    Keyword
     93hi def link PortfileDescription                 String
     94hi def link PortfileChecksumsType               Special
    7495
    7596hi def link PortfilePhases                              Keyword
    7697hi def link PortfilePhasesFetch                 Keyword
    77 hi def link PortfilePhasesCVS                   Keyword
    78 hi def link PortfilePhasesSVN                   Keyword
    79 hi def link PortfilePhasesGIT                   Keyword
    80 hi def link PortfilePhasesHG                    Keyword
     98hi def link PortfilePhasesExtract               Keyword
     99hi def link PortfilePhasesPatch                 Keyword
     100hi def link PortfilePhasesConf                  Keyword
    81101
    82 hi def link PortfileDescription                 String
    83102hi def link PortfileVariantConflicts    Statement
    84103hi def link PortfileVariantDescription  Statement
     
    86105hi def link PortfileVariantName                 Identifier
    87106hi def link PortfileDefaultVariants     String
    88 hi def link PortfileGroup                               String
    89107hi def link PortfileDepends                     Keyword
    90108hi def link PortfileDependsEntry                Special
Note: See TracChangeset for help on using the changeset viewer.