lol

vala_0_44: fix graphviz patch

+29 -29
+1 -1
pkgs/development/compilers/vala/default.nix
··· 41 41 # We've reverted the addition of the "--disable-valadoc" option 42 42 # and then applied the following patch. 43 43 # 0.42.4: https://github.com/openembedded/openembedded-core/raw/f2b4f9ec6f44dced7f88df849cca68961419eeb8/meta/recipes-devtools/vala/vala/disable-graphviz.patch 44 - "0.44" = ./disable-graphviz-0.44.1.patch; 44 + "0.44" = ./disable-graphviz-0.44.3.patch; 45 45 46 46 }.${lib.versions.majorMinor version} or (throw "no graphviz patch for this version of vala"); 47 47
+28 -28
pkgs/development/compilers/vala/disable-graphviz-0.44.1.patch pkgs/development/compilers/vala/disable-graphviz-0.44.3.patch
··· 19 19 - --enable-valadoc \ 20 20 - --enable-unversioned \ 21 21 - $(NULL) 22 - 22 + 23 23 if ENABLE_UNVERSIONED 24 24 aclocaldir = $(datadir)/aclocal 25 25 diff --git a/configure.ac b/configure.ac 26 - index 16ebd1f81..cf23db4b8 100644 26 + index 504db13aa..622397747 100644 27 27 --- a/configure.ac 28 28 +++ b/configure.ac 29 - @@ -156,10 +156,11 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED) 30 - AC_SUBST(GMODULE_CFLAGS) 29 + @@ -157,10 +157,11 @@ AC_SUBST(GMODULE_CFLAGS) 31 30 AC_SUBST(GMODULE_LIBS) 32 - 31 + 32 + AC_ARG_WITH(cgraph, AS_HELP_STRING([--with-cgraph], [Required flag for cross-compilation to define capability of graphviz]), [], with_cgraph=check) 33 33 -AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes) 34 34 -if test x$enable_valadoc = xyes; then 35 35 +AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes) ··· 40 40 cgraph_tmp_LIBADD="$LIBADD" 41 41 cgraph_tmp_CFLAGS="$CFLAGS" 42 42 LIBADD="$LIBADD $LIBGVC_LIBS" 43 - @@ -186,8 +187,8 @@ if test x$enable_valadoc = xyes; then 43 + @@ -198,8 +199,8 @@ if test x$enable_valadoc = xyes; then 44 44 LIBADD="$cgraph_tmp_LIBADD" 45 45 CFLAGS="$cgraph_tmp_CFLAGS" 46 46 fi 47 47 +AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes) 48 48 AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes") 49 49 -AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes) 50 - 50 + 51 51 AC_PATH_PROG([XSLTPROC], [xsltproc], :) 52 52 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :) 53 53 diff --git a/doc/Makefile.am b/doc/Makefile.am ··· 55 55 --- a/doc/Makefile.am 56 56 +++ b/doc/Makefile.am 57 57 @@ -6,16 +6,11 @@ SUBDIRS = \ 58 - 58 + 59 59 dist_man_MANS = \ 60 60 valac.1 \ 61 61 + valadoc.1 \ 62 62 vala-gen-introspect.1 \ 63 63 vapigen.1 \ 64 64 $(NULL) 65 - 65 + 66 66 -if ENABLE_VALADOC 67 67 -dist_man_MANS += \ 68 68 - valadoc.1 \ ··· 74 74 valadoc.h2m \ 75 75 @@ -24,11 +19,7 @@ EXTRA_DIST = \ 76 76 $(NULL) 77 - 77 + 78 78 if HAVE_HELP2MAN 79 79 -if ENABLE_VALADOC 80 80 manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1 ··· 83 83 -endif 84 84 @rm $^ 85 85 $(MAKE) $(AM_MAKEFLAGS) $^ 86 - 86 + 87 87 @@ -37,13 +28,11 @@ valac.1: 88 88 --include $(srcdir)/valac.h2m \ 89 89 --libtool --no-info \ ··· 108 108 cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1 109 109 cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1 110 110 endif 111 - 112 - 111 + 112 + 113 113 -if ENABLE_VALADOC 114 114 COMMON_VALADOCFLAGS = \ 115 115 --force \ 116 116 --verbose \ 117 117 @@ -150,7 +136,6 @@ internal-apis/valadoc: $(valadoc_VALASOURCES) internal-apis/codegen 118 118 @touch $@ 119 - 119 + 120 120 internal-api-docs: internal-apis/gee internal-apis/vala internal-apis/ccode internal-apis/codegen internal-apis/valadoc 121 121 -endif 122 - 122 + 123 123 clean-local: 124 124 rm -rf $(builddir)/internal-apis 125 125 diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am ··· 147 147 html/htmlmarkupwriter.vala \ 148 148 html/htmlrenderer.vala \ 149 149 $(NULL) 150 - 150 + 151 151 +if ENABLE_GRAPHVIZ 152 152 +libvaladoc_la_VALASOURCES += \ 153 153 + charts/chart.vala \ ··· 177 177 $(filter %.vala %.c,$^) 178 178 touch $@ 179 179 @@ -207,6 +214,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc 180 - 180 + 181 181 valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc 182 182 cp $< $@ 183 183 +if !ENABLE_GRAPHVIZ 184 184 + sed -i "s/libgvc //g" $@ 185 185 +endif 186 - 186 + 187 187 vapidir = $(datadir)/vala/vapi 188 188 dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi 189 189 @@ -214,6 +224,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps 190 - 190 + 191 191 valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps 192 192 cp $< $@ 193 193 +if !ENABLE_GRAPHVIZ 194 194 + sed -i "s/libgvc//g" $@ 195 195 +endif 196 - 196 + 197 197 EXTRA_DIST = \ 198 198 $(libvaladoc_la_VALASOURCES) \ 199 199 diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala ··· 211 211 +#endif 212 212 protected ErrorReporter reporter; 213 213 protected string package_list_link = "../index.html"; 214 - 214 + 215 215 @@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet { 216 216 this.linker = new LinkHelper (); 217 - 217 + 218 218 _renderer = new HtmlRenderer (settings, this.linker, this.cssresolver); 219 219 +#if HAVE_GRAPHVIZ 220 220 this.image_factory = new SimpleChartFactory (settings, linker); 221 221 +#endif 222 222 } 223 - 224 - 223 + 224 + 225 225 @@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet { 226 226 } 227 - 227 + 228 228 protected void write_image_block (Api.Node element) { 229 229 +#if HAVE_GRAPHVIZ 230 230 if (element is Class || element is Interface || element is Struct) { ··· 236 236 } 237 237 +#endif 238 238 } 239 - 239 + 240 240 public void write_namespace_content (Namespace node, Api.Node? parent) { 241 241 diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala 242 242 index 5aa4afdea..e79b0b8f5 100644 ··· 245 245 @@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter { 246 246 } 247 247 } 248 - 248 + 249 249 +#if HAVE_GRAPHVIZ 250 250 public unowned MarkupWriter add_usemap (Charts.Chart chart) { 251 251 string? buf = (string?) chart.write_buffer ("cmapx"); ··· 256 256 +#else 257 257 + public unowned MarkupWriter add_usemap (void* chart) { 258 258 +#endif 259 - 259 + 260 260 return this; 261 261 }