[jhbuild] moduleset.{dtd, rnc}: Update definitions to keep modulesets validated



commit 28d866fdbedef9633c32da799abd642f34f43b3a
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Fri May 12 23:08:22 2017 +0800

    moduleset.{dtd,rnc}: Update definitions to keep modulesets validated
    
    There are 3 changes in this commit:
    
     1. meson element is added. The definition of meson element is largely
        based on cmake element.
     2. python3 attribute is added to distutils element. It is an optional
        attribute having only only one possible value, 1. The restriction
        on value is added to keep consistency since the code only checks
        the existence of the attribute.
     3. after element can contain if element. The code supports it, but no
        module use it until glib module was updated to support macOS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782564

 modulesets/moduleset.dtd |   16 +++++++++++++---
 modulesets/moduleset.rnc |   12 +++++++++++-
 2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/modulesets/moduleset.dtd b/modulesets/moduleset.dtd
index 08158ce..06eeb2a 100644
--- a/modulesets/moduleset.dtd
+++ b/modulesets/moduleset.dtd
@@ -1,4 +1,4 @@
-<!ELEMENT moduleset 
(redirect|repository|include|autotools|metamodule|tarball|distutils|perl|linux|testmodule|cvsroot|cvsmodule|waf|cmake|systemmodule)+>
+<!ELEMENT moduleset 
(redirect|repository|include|autotools|metamodule|tarball|distutils|perl|linux|testmodule|cvsroot|cvsmodule|waf|cmake|meson|systemmodule)+>
 <!ATTLIST moduleset
        name     CDATA  #IMPLIED>
 
@@ -10,7 +10,7 @@
      DTD also appears to be incapable of describing the fact that
      exactly one of condition-set='' and condition-unset='' is required.
 -->
-<!ELEMENT if (if|dep|autogenargs|cmakeargs|makeargs|makeinstallargs)+>
+<!ELEMENT if (if|dep|autogenargs|cmakeargs|mesonargs|makeargs|makeinstallargs)+>
 <!ATTLIST if
        condition-set   CDATA   #IMPLIED
        condition-unset CDATA   #IMPLIED>
@@ -101,6 +101,7 @@
 <!ELEMENT distutils (pkg-config?,branch?,dependencies?,after?)>
 <!ATTLIST distutils
        id      ID      #REQUIRED
+       python3 CDATA   #FIXED "1"
        supports-non-srcdir-builds (yes|no) "yes">
 
 <!ELEMENT cmake (if*,cmakeargs*,makeargs*,pkg-config?,branch?,dependencies?,suggests?,after?)>
@@ -113,6 +114,15 @@
 <!ELEMENT cmakeargs EMPTY>
 <!ATTLIST cmakeargs value CDATA #REQUIRED>
 
+<!ELEMENT meson (if*,mesonargs*,makeargs*,pkg-config?,branch?,dependencies?,suggests?,after?)>
+<!ATTLIST meson
+       id              CDATA   #REQUIRED
+       mesonargs       CDATA   #IMPLIED
+       makeargs        CDATA   #IMPLIED>
+
+<!ELEMENT mesonargs EMPTY>
+<!ATTLIST mesonargs value CDATA #REQUIRED>
+
 <!ELEMENT perl (pkg-config?,branch?,dependencies?,after?)>
 <!ATTLIST perl
        id              CDATA   #REQUIRED
@@ -179,7 +189,7 @@
 <!ELEMENT pkg-config (#PCDATA)>
 <!ELEMENT dependencies (dep|if)*>
 <!ELEMENT suggests (dep|if)*>
-<!ELEMENT after (dep*)>
+<!ELEMENT after (dep|if)*>
 <!ELEMENT systemdependencies (dep*)>
 <!ELEMENT dep (altdep*)>
 <!-- This is actually 2 different types of element: <dep package=""/> as used in <dependencies>
diff --git a/modulesets/moduleset.rnc b/modulesets/moduleset.rnc
index c54b68b..3b8b7f3 100644
--- a/modulesets/moduleset.rnc
+++ b/modulesets/moduleset.rnc
@@ -16,6 +16,7 @@ moduleset =
      | cvsmodule
      | waf
      | cmake
+     | meson
      | systemmodule)+
   }
 attlist.moduleset &= attribute name { text }?
@@ -145,6 +146,7 @@ distutils =
 attlist.distutils &=
   attribute id { xsd:ID },
   [ a:defaultValue = "yes" ]
+  attribute python3 { "1" }?,
   attribute supports-non-srcdir-builds { "yes" | "no" }?
 cmakeargsif = element if { attlist.if, cmakeargsif*, cmakeargs*, makeargs* }
 cmake = element cmake { attlist.cmake, cmakeargsif*, cmakeargs*, makeargs*, pkg-config?, branch?, 
dependencieselements }
@@ -154,6 +156,14 @@ attlist.cmake &=
   attribute makeargs { text }?
 cmakeargs = element cmakeargs { attlist.cmakeargs }
 attlist.cmakeargs &= attribute value { text }
+mesonargsif = element if { attlist.if, mesonargsif*, mesonargs*, makeargs* }
+meson = element meson { attlist.meson, mesonargsif*, mesonargs*, makeargs*, pkg-config?, branch?, 
dependencieselements }
+attlist.meson &=
+  attribute id { text },
+  attribute mesonargs { text }?,
+  attribute makeargs { text }?
+mesonargs = element mesonargs { attlist.mesonargs }
+attlist.mesonargs &= attribute value { text }
 perl = element perl { attlist.perl, branch?, dependencies?, after? }
 attlist.perl &=
   attribute id { text },
@@ -222,7 +232,7 @@ dependencies = element dependencies { attlist.dependencies & depif* & dep* }
 attlist.dependencies &= empty
 suggests = element suggests { attlist.suggests & depif* & dep* }
 attlist.suggests &= empty
-after = element after { attlist.after, dep* }
+after = element after { attlist.after & depif* & dep* }
 attlist.after &= empty
 systemdependencies = element systemdependencies { attlist.systemdependencies, sysdep* }
 attlist.systemdependencies &= empty


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]