summaryrefslogtreecommitdiff
path: root/x11-libs/gtksourceview/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-libs/gtksourceview/files
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-libs/gtksourceview/files')
-rw-r--r--x11-libs/gtksourceview/files/2.0/gentoo.lang111
-rw-r--r--x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch139
2 files changed, 250 insertions, 0 deletions
diff --git a/x11-libs/gtksourceview/files/2.0/gentoo.lang b/x11-libs/gtksourceview/files/2.0/gentoo.lang
new file mode 100644
index 000000000000..f1e0660c74fc
--- /dev/null
+++ b/x11-libs/gtksourceview/files/2.0/gentoo.lang
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ GtkSourceView syntax highlight for Gentoo-specific files
+
+ Originally written for gtksourceview-1.x by:
+ Leonardo Ferreira Fontenelle <leo.fontenelle@gmail.com>, 2006.
+ Rewritten for gtksourceview-2 by:
+ Rene 'Necoro' Neumann <necoro@necoro.net>, 2007
+
+ Distributed under the same license(s) as gtksourceview.
+
+ TODO:
+ - do not highlight "enable" in the configure options
+ - perhaps highlight portage variables and portage functions different
+
+-->
+
+<language name="gentoo" id="gentoo" version="2.0" _section="Scripts">
+ <metadata>
+ <property name="globs">*.ebuild;*.eclass</property>
+ <property name="line-comment-start">#</property>
+ </metadata>
+
+ <styles>
+ <style id="variable" _name="Portage variables" map-to="def:builtin" />
+ <style id="command" _name="Portage command" map-to="def:type" />
+ <style id="function" _name="Portage function" map-to="def:function" />
+ <style id="string" _name="String" map-to="def:string" />
+ </styles>
+
+ <definitions>
+
+ <!-- rewrite shell string to show highlighted variables -->
+ <context id="string" style-ref="def:string">
+ <start>"</start>
+ <end>"</end>
+ <include>
+ <context ref="def:escape"/>
+ <context ref="def:line-continue"/>
+ <context ref="sh:variable"/>
+ </include>
+ </context>
+
+ <context id="string-2" style-ref="def:string">
+ <start>'</start>
+ <end>'</end>
+ <include>
+ <context ref="def:escape"/>
+ <context ref="def:line-continue"/>
+ <context ref="sh:variable"/>
+ </include>
+ </context>
+
+ <!-- subprograms:
+ - $(..) is not supported currently in the normal sh.lang
+ - `...` is interpreted as string - I think the subshell behavior is more acurate -->
+ <context id="subprogram">
+ <start>\$\(</start>
+ <end>\)</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="sh:keyword"/>
+ <context sub-pattern="0" where="end" style-ref="sh:keyword"/>
+ <context ref="gentoo"/>
+ </include>
+ </context>
+
+ <context id="subprogram-2">
+ <start>`</start>
+ <end>`</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="sh:keyword"/>
+ <context sub-pattern="0" where="end" style-ref="sh:keyword"/>
+ <context ref="gentoo"/>
+ </include>
+ </context>
+
+ <!-- portage variables - currently unused -->
+ <context id="portvars" style-ref="variable">
+ <match>\b((ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)|(S|D|T|PV|PF|P|PN|A)|C(XX)?FLAGS|LDFLAGS|C(HOST|TARGET|BUILD))\b</match>
+ </context>
+
+ <!-- portage functions - currently unused -->
+ <context id="portfuncs" style-ref="function">
+ <match>^(src_(unpack|compile|install|test)|pkg_(config|nofetch|setup|(pre|post)(inst|rm)))</match>
+ </context>
+
+ <!-- extra portage commands -->
+ <context id="portcmds" style-ref="command">
+ <match>\b(e(begin|end|conf|install|make|warn|infon?|error|patch)|die|use(_(with|enable))?|inherit|has|(has|best)_version|unpack|(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)|do(python|sed|dir|hard|sym|html|jar|mo)|keepdir|prepall(|docs|info|man|strip)|prep(info|lib|lib\.(so|a)|man|strip)|(|doc|ins|exe)into|f(owners|perms)|(exe|ins|dir)opts)\b</match>
+ </context>
+
+ <context id="built-in-command">
+ <include> <!-- do not include "sh:built-in-command" as it is replaced down there - which would lead to an endless loop -->
+ <context ref="sh:built-in-command-1" />
+ <context ref="sh:built-in-command-2" />
+ <context ref="portcmds" />
+ </include>
+ </context>
+
+ <!-- gentoo is just a shell with the replacements -->
+ <replace id="sh:built-in-command" ref="built-in-command" />
+ <replace id="sh:backtick-subshell" ref="subprogram-2" />
+ <context id="gentoo">
+ <include>
+ <context ref="subprogram"/>
+ <context ref="sh:sh"/>
+ </include>
+ </context>
+ </definitions>
+</language>
diff --git a/x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch b/x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch
new file mode 100644
index 000000000000..d42feacd3e3f
--- /dev/null
+++ b/x11-libs/gtksourceview/files/gtksourceview-2.10.5-G_CONST_RETURN.patch
@@ -0,0 +1,139 @@
+From d27fec22c3f50bcd3c384256b8ad75d662033c7f Mon Sep 17 00:00:00 2001
+From: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Sun, 13 Mar 2011 11:01:37 +0100
+Subject: [PATCH] Do not use G_CONST_RETURN anymore. This macro is going to be
+ deprecated.
+
+---
+ gtksourceview/gtksourcelanguagemanager.c | 4 ++--
+ gtksourceview/gtksourcelanguagemanager.h | 6 ++----
+ gtksourceview/gtksourcestylescheme.c | 4 ++--
+ gtksourceview/gtksourcestylescheme.h | 3 +--
+ gtksourceview/gtksourcestyleschememanager.c | 4 ++--
+ gtksourceview/gtksourcestyleschememanager.h | 6 ++----
+ 6 files changed, 11 insertions(+), 16 deletions(-)
+
+diff --git a/gtksourceview/gtksourcelanguagemanager.c b/gtksourceview/gtksourcelanguagemanager.c
+index b431e1f..31deba7 100644
+--- a/gtksourceview/gtksourcelanguagemanager.c
++++ b/gtksourceview/gtksourcelanguagemanager.c
+@@ -275,7 +275,7 @@ gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
+ * containg a list of language files directories.
+ * The array is owned by @lm and must not be modified.
+ */
+-G_CONST_RETURN gchar* G_CONST_RETURN *
++const gchar * const *
+ gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm)
+ {
+ g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
+@@ -394,7 +394,7 @@ ensure_languages (GtkSourceLanguageManager *lm)
+ * no language is available.
+ * The array is owned by @lm and must not be modified.
+ */
+-G_CONST_RETURN gchar* G_CONST_RETURN *
++const gchar * const *
+ gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm)
+ {
+ g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
+diff --git a/gtksourceview/gtksourcelanguagemanager.h b/gtksourceview/gtksourcelanguagemanager.h
+index ce234f5..de7a3aa 100644
+--- a/gtksourceview/gtksourcelanguagemanager.h
++++ b/gtksourceview/gtksourcelanguagemanager.h
+@@ -63,14 +63,12 @@ GtkSourceLanguageManager *gtk_source_language_manager_new (void);
+
+ GtkSourceLanguageManager *gtk_source_language_manager_get_default (void);
+
+-G_CONST_RETURN gchar* G_CONST_RETURN *
+- gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
++const gchar * const * gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
+
+ void gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
+ gchar **dirs);
+
+-G_CONST_RETURN gchar* G_CONST_RETURN *
+- gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
++const gchar * const * gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
+
+ GtkSourceLanguage *gtk_source_language_manager_get_language (GtkSourceLanguageManager *lm,
+ const gchar *id);
+diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
+index 6b470e8..d9d41a3 100644
+--- a/gtksourceview/gtksourcestylescheme.c
++++ b/gtksourceview/gtksourcestylescheme.c
+@@ -318,7 +318,7 @@ gtk_source_style_scheme_get_description (GtkSourceStyleScheme *scheme)
+ *
+ * Since: 2.0
+ */
+-G_CONST_RETURN gchar* G_CONST_RETURN *
++const gchar * const *
+ gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
+ {
+ g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
+@@ -326,7 +326,7 @@ gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
+ if (scheme->priv->authors == NULL)
+ return NULL;
+
+- return (G_CONST_RETURN gchar* G_CONST_RETURN *)scheme->priv->authors->pdata;
++ return (const gchar * const *)scheme->priv->authors->pdata;
+ }
+
+ /**
+diff --git a/gtksourceview/gtksourcestylescheme.h b/gtksourceview/gtksourcestylescheme.h
+index 501163c..fe74bd2 100644
+--- a/gtksourceview/gtksourcestylescheme.h
++++ b/gtksourceview/gtksourcestylescheme.h
+@@ -62,8 +62,7 @@ const gchar *gtk_source_style_scheme_get_id (GtkSourceStyleS
+ const gchar *gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme);
+ const gchar *gtk_source_style_scheme_get_description(GtkSourceStyleScheme *scheme);
+
+-G_CONST_RETURN gchar* G_CONST_RETURN *
+- gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
++const gchar * const * gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
+
+ const gchar *gtk_source_style_scheme_get_filename (GtkSourceStyleScheme *scheme);
+
+diff --git a/gtksourceview/gtksourcestyleschememanager.c b/gtksourceview/gtksourcestyleschememanager.c
+index cba042f..eec5d45 100644
+--- a/gtksourceview/gtksourcestyleschememanager.c
++++ b/gtksourceview/gtksourcestyleschememanager.c
+@@ -516,7 +516,7 @@ gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager
+ * of string containing the search path.
+ * The array is owned by the @manager and must not be modified.
+ */
+-G_CONST_RETURN gchar* G_CONST_RETURN *
++const gchar * const *
+ gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager)
+ {
+ g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
+@@ -555,7 +555,7 @@ gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manag
+ * of string containing the ids of the available style schemes or %NULL if no
+ * style scheme is available. The array is owned by the @manager and must not be modified.
+ */
+-G_CONST_RETURN gchar* G_CONST_RETURN *
++const gchar * const *
+ gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager)
+ {
+ g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
+diff --git a/gtksourceview/gtksourcestyleschememanager.h b/gtksourceview/gtksourcestyleschememanager.h
+index 6effc1c..456e8bf 100644
+--- a/gtksourceview/gtksourcestyleschememanager.h
++++ b/gtksourceview/gtksourcestyleschememanager.h
+@@ -74,13 +74,11 @@ void gtk_source_style_scheme_manager_append_search_path (GtkSourceStyleSc
+ void gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager *manager,
+ const gchar *path);
+
+-G_CONST_RETURN gchar* G_CONST_RETURN *
+- gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
++const gchar * const * gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
+
+ void gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manager);
+
+-G_CONST_RETURN gchar* G_CONST_RETURN *
+- gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
++const gchar * const * gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
+
+ GtkSourceStyleScheme *gtk_source_style_scheme_manager_get_scheme (GtkSourceStyleSchemeManager *manager,
+ const gchar *scheme_id);
+--
+1.7.8
+