[54435] contrib/mpvim/syntax/portfile.vim

mnick at macports.org mnick at macports.org
Mon Jul 27 10:52:52 PDT 2009


Revision: 54435
          http://trac.macports.org/changeset/54435
Author:   mnick at macports.org
Date:     2009-07-27 10:52:52 -0700 (Mon, 27 Jul 2009)
Log 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

Modified Paths:
--------------
    contrib/mpvim/syntax/portfile.vim

Modified: contrib/mpvim/syntax/portfile.vim
===================================================================
--- contrib/mpvim/syntax/portfile.vim	2009-07-27 17:21:29 UTC (rev 54434)
+++ contrib/mpvim/syntax/portfile.vim	2009-07-27 17:52:52 UTC (rev 54435)
@@ -26,14 +26,14 @@
 syn keyword PortfileRequired 	PortSystem name version maintainers
 syn keyword PortfileRequired 	homepage master_sites categories platforms checksums
 syn match PortfileRequired 		"^\(long_\)\?description" nextgroup=PortfileDescription skipwhite
-syn region PortfileDescription 	matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained
+syn region PortfileDescription 	matchgroup=Normal start="" skip="\\$" end="$" contained
 
 syn keyword PortfileOptional 	PortGroup epoch revision worksrcdir distname platform
 syn keyword PortfileOptional 	use_automake use_autoconf use_configure
 syn keyword PortifleOptional 	patch_sites distfiles dist_subdir
 
 syn keyword PortfileOptional 	checksums nextgroup=PortfileChecksums skipwhite
-syn region PortfileChecksums 	matchgroup=Normal start="[^\s\t]" skip="\\$" end="$" contained contains=PortfileChecksumsType
+syn region PortfileChecksums 	matchgroup=Normal start="" 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" contains=PortfilePrePost
@@ -60,22 +60,49 @@
 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\)*\)"
+syn match PortfilePhasesConf 	"configure.universal_\(args\|\(c\|cpp\|cxx\|ld\)flags\)"
 
+" Automake and Autoconf
+syn match PortfilePhasesAA 		"use_\(automake\|autoconf\)" nextgroup=PortfileYesNo skipwhite
+syn match PortfilePhasesAA 		"auto\(make\|conf\).\(env\|args\|dir\)"
+
+" Build phase options
+syn match PortfilePhasesBuild 	"build.\(cmd\|type\)"
+syn match PortfilePhasesBuild 	"build.\(\(pre\|post\)_\)*args"
+syn match PortfilePhasesBuild 	"build.\(target\|env\)\(-\(append\|delete\)\)*"
+syn keyword PortfilePhasesBuild use_parallel_build nextgroup=PortfileYesNo skipwhite
+
+" Test phase options
+syn match PortfilePhasesTest 	"test.\(run\|cmd\|target\)"
+syn match PortfilePhasesTest 	"test.env\(-\(append\|delete\)\)*"
+
+" Test destroot options
+syn match PortfilePhasesDest 	"destroot.\(cmd\|type\|destdir\|umask\|keepdirs\|violate_mtree\)"
+syn match PortfilePhasesDest 	"destroot.\(\(pre\|post\)_\)*args"
+syn match PortfilePhasesDest 	"destroot.target\(-\(append\|delete\)\)*"
+
 " Variants
 syn region PortfileVariant 				matchgroup=Keyword start="^variant" skip="\\$" end="$" contains=PortfileVariantName,PortfileVariantRequires,PortfileVariantDescription,PortfileVariantConflicts skipwhite
 syn keyword PortfileVariantRequires 	requires nextgroup=PortfileVariantName contained
 syn keyword PortfileVariantConflicts 	conflicts nextgroup=PortfileVariantName contained
 syn keyword PortfileVariantDescription 	description nextgroup=PortfileGroup contained
 syn match PortfileVariantName 			"[a-zA-Z0-9_]\+" contained
-
+syn keyword PortfileOptional 			universal_variant nextgroup=PortfileYesNo skipwhite
 syn keyword PortfileOptional			default_variants nextgroup=PortfileDefaultVariants skipwhite
 syn match PortfileDefaultVariants 		"\([+|\-][a-zA-Z0-9_]\+\s*\)\+" contained
 
-" Depends
-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
+" Dependencies
+syn match PortfileDepends 			"depends_\(\(lib\|build\|run\)\(-\(append\|delete\)\)*\)" nextgroup=PortfileDependsEntries skipwhite
+syn region PortfileDependsEntries 	matchgroup=Normal start="" skip="\\$" end="$" contains=PortfileDependsEntry contained
+syn match PortfileDependsEntry 		"\(port\|bin\):" contained
 
+" StartupItems
+syn match PortfileOptional 			"startupitem.\(start\|stop\|restart\|init\|pidfile\)"
+
+" Livecheck / Distcheck
+syn match PortfileOptional 			"livecheck.\(check\|name\|distname\|version\|url\|regex\|md5\)"
+syn keyword PortfileOptional 		distcheck.check
+
 " check whitespace, copied from python.vim
 if exists("portfile_highlight_space_errors")
   " trailing whitespace
@@ -98,6 +125,10 @@
 hi def link PortfilePhasesExtract 		Keyword
 hi def link PortfilePhasesPatch 		Keyword
 hi def link PortfilePhasesConf  		Keyword
+hi def link PortfilePhasesAA 	  		Keyword
+hi def link PortfilePhasesBuild  		Keyword
+hi def link PortfilePhasesTest  		Keyword
+hi def link PortfilePhasesDest  		Keyword
 
 hi def link PortfileVariantConflicts 	Statement
 hi def link PortfileVariantDescription 	Statement
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090727/f95f0ce1/attachment.html>


More information about the macports-changes mailing list