[vala/f16] - Update vala-mode.el to April 2011 release - Fix registration of Vala alternatives - Enable coverag

Michel Alexandre Salim salimma at fedoraproject.org
Thu Apr 5 18:50:27 UTC 2012


commit 1101a21b5afc9e42c294a202159cf814e1a2d117
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Fri Apr 6 00:23:13 2012 +0700

    - Update vala-mode.el to April 2011 release
    - Fix registration of Vala alternatives
    - Enable coverage analysis
    - Drop redundant --enable-vapigen, it's now the default

 vala-mode.el |   23 ++++++++++--------
 vala.spec    |   70 +++++++++++++++++++++++++++++-----------------------------
 2 files changed, 48 insertions(+), 45 deletions(-)
---
diff --git a/vala-mode.el b/vala-mode.el
index 0358790..d125540 100644
--- a/vala-mode.el
+++ b/vala-mode.el
@@ -3,8 +3,9 @@
 ;; Author:     2005 Dylan R. E. Moonfire
 ;;	       2008 Étienne BERSAC
 ;; Maintainer: Étienne BERSAC <bersace03 at laposte.net>
+;; Modifier:   Kentaro NAKAZAWA <kentaro.nakazawa at nifty.com>
 ;; Created:    2008 May the 4th
-;; Modified:   May 2008
+;; Modified:   April 2011
 ;; Version:    0.1
 ;; Keywords:   vala languages oop
 
@@ -194,9 +195,9 @@
 (c-lang-defconst c-operators
   vala `((prefix "base")))
 
-;; Vala directives ?
-;; (c-lang-defconst c-opt-cpp-prefix
-;;   csharp "^\\s *#.*")
+;; Vala directives
+(c-lang-defconst c-opt-cpp-prefix
+  vala "\\s *#\\s *")
 
 
 ;; Vala uses the following assignment operators
@@ -206,7 +207,9 @@
 
 ;; This defines the primative types for Vala
 (c-lang-defconst c-primitive-type-kwds
-  vala '("void" "char" "int" "float" "double" "string"))
+  vala '("void" "bool" "char" "uchar" "short" "ushort" "int" "uint" "long" "ulong"
+	 "size_t" "ssize_t" "int8" "uint8" "int16" "uint16" "int32" "uint32" "int64" "uint64"
+	 "unichar" "float" "double" "string"))
 
 ;; The keywords that define that the following is a type, such as a
 ;; class definition.
@@ -227,7 +230,7 @@
   vala '("public" "partial" "private" "const" "abstract"
 	 "protected" "ref" "in" "out" "static" "virtual"
 	 "override" "params" "internal" "weak" "owned"
-	 "unowned"))
+	 "unowned" "async" "yield"))
 
 ;; We don't use the protection level stuff because it breaks the
 ;; method indenting. Not sure why, though.
@@ -277,7 +280,7 @@
 ;; We need to treat namespace as an outer block to class indenting
 ;; works properly.
 (c-lang-defconst c-other-block-decl-kwds
-  vala '("namespace"))
+  vala '("namespace" "extern"))
 
 ;; We need to include the "in" for the foreach
 (c-lang-defconst c-other-kwds
@@ -289,9 +292,9 @@
   vala 'c-awk-at-vsemi-p)
 
 
-(defcustom vala-font-lock-extra-types nil
-  "*List of extra types (aside from the type keywords) to recognize in Vala mode.
-Each list item should be a regexp matching a single identifier.")
+;; (defcustom vala-font-lock-extra-types nil
+;;   "*List of extra types (aside from the type keywords) to recognize in Vala mode.
+;; Each list item should be a regexp matching a single identifier.")
 
 (defconst vala-font-lock-keywords-1 (c-lang-const c-matchers-1 vala)
   "Minimal highlighting for Vala mode.")
diff --git a/vala.spec b/vala.spec
index a980c7f..6307bf7 100644
--- a/vala.spec
+++ b/vala.spec
@@ -2,7 +2,7 @@
 
 Name:           vala
 Version:        0.14.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A modern programming language for GNOME
 
 Group:          Development/Languages
@@ -36,8 +36,8 @@ BuildRequires:  emacs emacs-el
 %global vala_manpages valac
 %global vala_tools_binaries vala-gen-introspect vapicheck vapigen
 %global vala_tools_manpages vala-gen-introspect vapigen
-Requires(post):   %{_sbindir}/update-alternatives
-Requires(postun): %{_sbindir}/update-alternatives
+Requires(posttrans):   %{_sbindir}/update-alternatives
+Requires(preun):       %{_sbindir}/update-alternatives
 
 
 %description
@@ -147,7 +147,7 @@ the emacs-%{name} package to use Vala with GNU Emacs.
 
 
 %build
-%configure --enable-vapigen
+%configure --enable-coverage
 # Don't use rpath!
 sed -i 's|/lib /usr/lib|/lib /usr/lib /lib64 /usr/lib64|' libtool
 make %{?_smp_mflags}
@@ -194,7 +194,7 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 
-%post
+%posttrans
 /sbin/ldconfig
 for f in %{vala_binaries};
 do
@@ -207,7 +207,7 @@ do
       $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
 done
 
-%post tools
+%posttrans tools
 for f in %{vala_tools_binaries};
 do
     %{_sbindir}/update-alternatives --install %{_bindir}/$f \
@@ -219,36 +219,30 @@ do
       $f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
 done
 
-%postun
+%preun
 /sbin/ldconfig
-if [ $1 -eq 0 ];
-then
-    for f in %{vala_binaries};
-    do
-        %{_sbindir}/update-alternatives --remove $f \
-          %{_bindir}/$f-%{api_ver}
-    done
-    for f in %{vala_manpages};
-    do
-        %{_sbindir}/update-alternatives --remove $f.1.gz \
-          %{_mandir}/man1/$f-%{api_ver}.1.gz
-    done
-fi
-
-%postun tools
-if [ $1 -eq 0 ];
-then
-    for f in %{vala_tools_binaries};
-    do
-        %{_sbindir}/update-alternatives --remove $f \
-          %{_bindir}/$f-%{api_ver}
-    done
-    for f in %{vala_tools_manpages};
-    do
-        %{_sbindir}/update-alternatives --remove $f.1.gz \
-          %{_mandir}/man1/$f-%{api_ver}.1.gz
-    done
-fi
+for f in %{vala_binaries};
+do
+    %{_sbindir}/update-alternatives --remove $f \
+      %{_bindir}/$f-%{api_ver}
+done
+for f in %{vala_manpages};
+do
+    %{_sbindir}/update-alternatives --remove $f.1.gz \
+      %{_mandir}/man1/$f-%{api_ver}.1.gz
+done
+
+%preun tools
+for f in %{vala_tools_binaries};
+do
+    %{_sbindir}/update-alternatives --remove $f \
+      %{_bindir}/$f-%{api_ver}
+done
+for f in %{vala_tools_manpages};
+do
+    %{_sbindir}/update-alternatives --remove $f.1.gz \
+      %{_mandir}/man1/$f-%{api_ver}.1.gz
+done
 
 
 %files
@@ -305,6 +299,12 @@ fi
 
 
 %changelog
+* Thu Apr  5 2012 Michel Salim <salimma at fedoraproject.org> - 0.14.2-2
+- Update vala-mode.el to April 2011 release
+- Fix registration of Vala alternatives
+- Enable coverage analysis
+- Drop redundant --enable-vapigen, it's now the default
+
 * Sat Feb  4 2012 Michel Salim <salimma at fedoraproject.org> - 0.14.2-1
 - Update to 0.14.2
 - Support parallel installation with other Vala versions


More information about the scm-commits mailing list