aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-06 21:00:36 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-06 21:00:36 +0100
commit5b500f816a3bc43db9d4f9422f5eee025d185b82 (patch)
tree16f112560e8a67b46c0b324af9ba85350f54c217
parent18a44349596464f1ae6a18da5fff2afcbccab2c9 (diff)
downloadpaludis-5b500f816a3bc43db9d4f9422f5eee025d185b82.tar.gz
paludis-5b500f816a3bc43db9d4f9422f5eee025d185b82.tar.xz
Support -@groups
-rw-r--r--paludis/environments/paludis/licenses_conf.cc17
-rw-r--r--vim/syntax/paludis-licenses-conf.vim4
2 files changed, 17 insertions, 4 deletions
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 8b5cb37..a9e9b54 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -143,8 +143,21 @@ namespace
for (auto i(list.begin()), i_end(list.end()) ;
i != i_end ; ++i)
{
- auto l(env->expand_licence(*i));
- std::copy(l->begin(), l->end(), std::back_inserter(extras));
+ std::string s(*i);
+ if (0 == s.compare(0, 1, "-", 0, 1))
+ {
+ auto l(env->expand_licence(i->substr(1)));
+ for (auto v(l->begin()), v_end(l->end()) ;
+ v != v_end ; ++v)
+ extras.push_back("-" + *v);
+ }
+ else
+ {
+ auto l(env->expand_licence(*i));
+ for (auto v(l->begin()), v_end(l->end()) ;
+ v != v_end ; ++v)
+ extras.push_back(*v);
+ }
}
list.splice(list.end(), extras, extras.begin(), extras.end());
diff --git a/vim/syntax/paludis-licenses-conf.vim b/vim/syntax/paludis-licenses-conf.vim
index 6a15da4..fc21d5f 100644
--- a/vim/syntax/paludis-licenses-conf.vim
+++ b/vim/syntax/paludis-licenses-conf.vim
@@ -25,7 +25,7 @@ syn match PaludisLicensesConfSet /^[^ \t#\/]\+\S\@!/
\ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfLicenseGroup,PaludisLicensesConfContinuation skipwhite
syn match PaludisLicensesConfLicense contained /-\?[a-zA-Z0-9\-_*]\+/
\ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfLicenseGroup,PaludisLicensesConfContinuation skipwhite
-syn match PaludisLicensesConfLicenseGroup contained /@[a-zA-Z0-9\-_*]\+/
+syn match PaludisLicensesConfLicenseGroup contained /-\?@[a-zA-Z0-9\-_*]\+/
\ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfLicenseGroup,PaludisLicensesConfContinuation skipwhite
syn match PaludisLicensesConfContinuation contained /\\$/
\ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfLicenseGroup,PaludisLicensesConfContinuation skipwhite skipnl
@@ -35,7 +35,7 @@ hi def link PaludisLicensesConfPDS Identifier
hi def link PaludisLicensesConfWildcard Special
hi def link PaludisLicensesConfSet Special
hi def link PaludisLicensesConfLicense Keyword
-hi def link PaludisLicensesConfLicense Macro
+hi def link PaludisLicensesConfLicenseGroup Macro
hi def link PaludisLicensesConfContinuation Preproc
let b:current_syntax = "paludis-licenses-conf"