Skip to content

Instantly share code, notes, and snippets.

@RedHatter
Created November 27, 2013 22:45
Show Gist options
  • Save RedHatter/7684439 to your computer and use it in GitHub Desktop.
Save RedHatter/7684439 to your computer and use it in GitHub Desktop.
Valag is a graphviz graph generator for Vala source files. This patch allows it to work with vala 0.22.
diff -rupN a/Makefile valag-1.2/Makefile
--- a/Makefile 2013-11-27 22:30:17.772031704 +0000
+++ valag-1.2/Makefile 2013-11-22 19:01:59.642559732 +0000
@@ -9,7 +9,7 @@ DESTDIR = $(PREFIX)
all: valag
valag: $(SRCS)
- $(VALAC) -g -o valag --thread --pkg libvala-0.14 --pkg libgvc --pkg glib-2.0 --vapidir . $+
+ $(VALAC) -g -o valag --thread --pkg libvala-0.22 --pkg libgvc --pkg glib-2.0 --vapidir . $+
install: valag
install -c ./valag -D $(DESTDIR)/bin/valag
@@ -43,3 +43,4 @@ dist: $(DISTFILES)
rm -rf valag-$(VERSION)
.PHONY: install clean dist
+
diff -rupN a/flowgraphgenerator.vala valag-1.2/flowgraphgenerator.vala
--- a/flowgraphgenerator.vala 2013-11-27 22:30:17.772031704 +0000
+++ valag-1.2/flowgraphgenerator.vala 2013-11-21 22:57:38.000000000 +0000
@@ -255,8 +255,7 @@ public class Valag.FlowGraphGenerator :
public override void visit_property (Property prop)
{
visit_graph_node (prop, @"Property $(prop.name)",
- {RecordEntry(){name="notify", value=prop.notify.to_string()},
- RecordEntry(){name="is_abstract", value=prop.is_abstract.to_string()},
+ {RecordEntry(){name="is_abstract", value=prop.is_abstract.to_string()},
RecordEntry(){name="is_virtual", value=prop.is_virtual.to_string()},
RecordEntry(){name="overrides", value=prop.overrides.to_string()}});
}
diff -rupN a/graphgenerator.vala valag-1.2/graphgenerator.vala
--- a/graphgenerator.vala 2013-11-27 22:30:17.772031704 +0000
+++ valag-1.2/graphgenerator.vala 2013-11-27 22:36:37.096040077 +0000
@@ -354,8 +354,7 @@ public class Valag.GraphGenerator : Code
public override void visit_property (Property prop)
{
visit_graph_node (prop, @"Property $(prop.name)",
- {RecordEntry(){name="notify", value=prop.notify.to_string()},
- RecordEntry(){name="is_abstract", value=prop.is_abstract.to_string()},
+ {RecordEntry(){name="is_abstract", value=prop.is_abstract.to_string()},
RecordEntry(){name="is_virtual", value=prop.is_virtual.to_string()},
RecordEntry(){name="overrides", value=prop.overrides.to_string()}});
visit_child (prop.field, prop, "field");
@@ -373,8 +372,7 @@ public class Valag.GraphGenerator : Code
if (sig is DynamicSignal)
label = "DynamicSignal";
visit_graph_node (sig, @"$(label) $(sig.name)",
- {RecordEntry(){name="has_emitter", value=sig.has_emitter.to_string()},
- RecordEntry(){name="is_virtual", value=sig.is_virtual.to_string()}});
+ {RecordEntry(){name="is_virtual", value=sig.is_virtual.to_string()}});
}
public override void visit_constructor (Constructor c)
diff -rupN a/main.vala valag-1.2/main.vala
--- a/main.vala 2013-11-27 22:30:17.772031704 +0000
+++ valag-1.2/main.vala 2013-11-21 22:54:32.000000000 +0000
@@ -162,10 +162,7 @@ class Valag.Application
context.vapi_directories = vapi_directories;
context.gir_directories = gir_directories;
context.debug = debug;
- if (profile == "posix") {
- context.profile = Profile.POSIX;
- context.add_define ("POSIX");
- } else if (profile == "gobject-2.0" || profile == "gobject" || profile == null) {
+ if (profile == "gobject-2.0" || profile == "gobject" || profile == null) {
// default profile
context.profile = Profile.GOBJECT;
context.add_define ("GOBJECT");
@@ -186,12 +183,7 @@ class Valag.Application
context.add_define ("VALA_0_%d".printf (i));
}
- if (context.profile == Profile.POSIX) {
- if (!nostdpkg) {
- /* default package */
- context.add_external_package ("posix");
- }
- } else if (context.profile == Profile.GOBJECT) {
+ if (context.profile == Profile.GOBJECT) {
int glib_minor = 16;
for (int i = 16; i <= glib_minor; i += 2) {
@@ -203,11 +195,6 @@ class Valag.Application
context.add_external_package ("glib-2.0");
context.add_external_package ("gobject-2.0");
}
- } else if (context.profile == Profile.DOVA) {
- if (!nostdpkg) {
- /* default package */
- context.add_external_package ("dova-core-0.1");
- }
}
if (packages != null) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment