[54240] users/mnick/macports.vim/syntax/portfile.vim

mnick at macports.org mnick at macports.org
Thu Jul 23 10:39:54 PDT 2009


Revision: 54240
          http://trac.macports.org/changeset/54240
Author:   mnick at macports.org
Date:     2009-07-23 10:39:54 -0700 (Thu, 23 Jul 2009)
Log Message:
-----------
* consolidate PortfilePhases(CVS|SVN|GIT|HG) in PorfilePhasesFetch
* add use_ match for PortfilePhasesExtract
* add PortfilePhasesPatch
* add PortfilePhasesConf

Modified Paths:
--------------
    users/mnick/macports.vim/syntax/portfile.vim

Modified: users/mnick/macports.vim/syntax/portfile.vim
===================================================================
--- users/mnick/macports.vim/syntax/portfile.vim	2009-07-23 17:35:24 UTC (rev 54239)
+++ users/mnick/macports.vim/syntax/portfile.vim	2009-07-23 17:39:54 UTC (rev 54240)
@@ -19,6 +19,10 @@
 
 unlet b:current_syntax
 
+
+syn match PortfileGroup 		"{.\+}" contained
+syn match PortfileYesNo 		"\(yes\|no\)" contained
+
 syn keyword PortfileRequired 	PortSystem name version maintainers
 syn keyword PortfileRequired 	homepage master_sites categories platforms checksums
 syn match PortfileRequired 		"^\(long_\)\?description" nextgroup=PortfileDescription skipwhite
@@ -28,21 +32,35 @@
 syn keyword PortfileOptional 	use_automake use_autoconf use_configure
 syn keyword PortifleOptional 	patch_sites distfiles dist_subdir
 
-syn keyword PortfileOptional 	extract. use_7z use_bzip2 use_lzma
-syn keyword PortfileOptional 	use_zip
+syn keyword PortfileOptional 	checksums nextgroup=PortfileChecksums skipwhite
+syn region PortfileChecksums 	matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained contains=PortfileChecksumsType
+syn keyword PortfileChecksumsType md5 sha1 rmd160 contained
 
-syn match PortfilePhases 		"\(\(pre\|post\)\-\)*\(fetch\|checksum\|extract\|patch\|configure\|build\|test\|destroot\|archive\|install\|activate\)\s"		
+syn match PortfilePhases 		"\(\(pre\|post\)\-\)*\(fetch\|checksum\|extract\|patch\|configure\|build\|test\|destroot\|archive\|install\|activate\)\s" contains=PortfilePrePost
 
 " Fetch phase options
 syn match PortfilePhasesFetch   "fetch\.\(type\|user\|password\|use_epsv\|ignore_sllcert\)"
-syn match PortfilePhasesCVS 	"cvs\.\(root\|password\|tag\|date\|module\)"
-syn match PortfilePhasesSVN 	"svn\.\(url\|tag\)"
-syn match PortfilePhasesGIT 	"git\.\(url\|branch\)"
-syn match PortfilePhasesHG 		"hg\.\(url\|tag\)"
+syn match PortfilePhasesFetch 	"cvs\.\(root\|password\|tag\|date\|module\)"
+syn match PortfilePhasesFetch 	"svn\.\(url\|tag\)"
+syn match PortfilePhasesFetch 	"git\.\(url\|branch\)"
+syn match PortfilePhasesFetch 	"hg\.\(url\|tag\)"
 
 " Extract phase options
 syn match PortfilePhasesExtract "extract\.\(suffix\|mkdir\|cmd\|only\(\-\(append\|delete\)\)*\)"
+syn match PortfilePhasesExtract "use_\(7z\|bzip2\|lzma\|zip\)" nextgroup=PortfileYesNo skipwhite
 
+" Patch phase options
+syn match PortfilePhasesPatch 	"patch\.\(dir\|cmd\|args\(\-\(append\|delete\)\)*\)"
+syn match PortfilePhasesPatch 	"patchfiles\(\-\(append\|delete\)\)*"
+
+" Configure phase options
+syn keyword PortfilePhasesConf 	use_configure nextgroup=PortfileYesNo skipwhite
+syn match PortfilePhasesConf 	"configure\.\(env\|\(c\|ld\|cpp\|cxx\|objc\|f\|fc\|f90\)flags\)\(-\(append\|delete\)\)*"
+syn match PortfilePhasesConf 	"configure\.\(\(pre\|post\)\-\)*args\(-\(\append\|delete\)\)"
+syn match PortfilePhasesConf 	"configure\.\(cc\|cpp\|cxx\|objc\|fc\|f77\|f90\|javac\|compiler\)"
+syn match PortfilePhasesConf 	"configure\.\(perl\|python\|ruby\|install\|awk\|bison\)"
+syn match PortfilePhasesConf 	"configure\.\(pkg_config\(_path\)*\)"
+
 " Variants
 syn region PortfileVariant 				matchgroup=Keyword start="^variant" skip="\\$" end="$" contains=PortfileVariantName,PortfileVariantRequires,PortfileVariantDescription,PortfileVariantConflicts skipwhite
 syn keyword PortfileVariantRequires 	requires nextgroup=PortfileVariantName contained
@@ -52,10 +70,9 @@
 
 syn keyword PortfileOptional			default_variants nextgroup=PortfileDefaultVariants skipwhite
 syn match PortfileDefaultVariants 		"\([+|\-][a-zA-Z0-9_]\+\s*\)\+" contained
-syn match PortfileGroup 				"{.\+}" contained
 
 " Depends
-syn match PortfileDepends 				"^depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
+syn match PortfileDepends 				"depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
 syn region PortfileDependsEntries 		matchgroup=Normal start="[^\s]" skip="\\$" end="$" contains=PortfileDependsEntry contained
 syn match PortfileDependsEntry 			"\(port\|bin\):" contained
 
@@ -68,24 +85,25 @@
   syn match   PortfileSpaceError   display "\t\+ "
 endif
 
+hi def link PortfileGroup 				String
+hi def link PortfileYesNo 				Special
 
 hi def link PortfileRequired 			Keyword
 hi def link PortfileOptional 			Keyword
+hi def link PortfileDescription 		String
+hi def link PortfileChecksumsType 		Special
 
 hi def link PortfilePhases 				Keyword
 hi def link PortfilePhasesFetch 		Keyword
-hi def link PortfilePhasesCVS 	 		Keyword
-hi def link PortfilePhasesSVN 	 		Keyword
-hi def link PortfilePhasesGIT 	 		Keyword
-hi def link PortfilePhasesHG 	 		Keyword
+hi def link PortfilePhasesExtract 		Keyword
+hi def link PortfilePhasesPatch 		Keyword
+hi def link PortfilePhasesConf  		Keyword
 
-hi def link PortfileDescription 		String
 hi def link PortfileVariantConflicts 	Statement
 hi def link PortfileVariantDescription 	Statement
 hi def link PortfileVariantRequires 	Statement
 hi def link PortfileVariantName 		Identifier
 hi def link PortfileDefaultVariants 	String
-hi def link PortfileGroup 				String
 hi def link PortfileDepends 			Keyword
 hi def link PortfileDependsEntry 		Special
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090723/22d0fcc0/attachment.html>


More information about the macports-changes mailing list