summaryrefslogtreecommitdiff
path: root/gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch')
-rw-r--r--gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch b/gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch
new file mode 100644
index 000000000000..ee5c3bce0a5c
--- /dev/null
+++ b/gnome-base/librsvg/files/librsvg-2.54.1-build-Add-enable-gtk-doc-flag.patch
@@ -0,0 +1,62 @@
+https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/692
+
+From 1c53068cbcfccb9c663dea2d1a61c8d7b24d317a Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 26 Apr 2022 15:01:55 -0700
+Subject: [PATCH] build: Add --enable-gtk-doc flag
+
+gtk-doc documentation relies on introspection, and introspection doesn't
+cross compile well, so it's nice to be able to disable documentation.
+---
+ Makefile.am | 2 +-
+ configure.ac | 19 ++++++++++++++-----
+ 2 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 83e73c38..1e1ce856 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-if HAVE_GI_DOCGEN
++if ENABLE_GTK_DOC
+ RSVG_DOC = doc
+ endif
+
+diff --git a/configure.ac b/configure.ac
+index 9abc587e..6cced25c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,11 +123,19 @@ AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
+
+ dnl Gi-docgen
+
+-AC_CHECK_TOOL(GI_DOCGEN, [gi-docgen], [no])
+-AS_IF(test x$GI_DOCGEN = xno,
+- AC_MSG_WARN([gi-docgen not found - not building docs])
+-)
+-AM_CONDITIONAL(HAVE_GI_DOCGEN, [test "x$GI_DOCGEN" != "xno"])
++AC_ARG_ENABLE([gtk-doc],
++ [AS_HELP_STRING([--disable-gtk-doc],[Disable building documentation (requires introspection)])],
++ [enable_gtk_doc=$enableval],[enable_gtk_doc=auto])
++
++AS_IF([test "x$enable_gtk_doc" != xno],
++ [AC_CHECK_TOOL(GI_DOCGEN, [gi-docgen], [no])
++ AS_IF([test "x$GI_DOCGEN" = no],
++ [AS_CASE(["$enable_gtk_doc"],
++ [yes], [AC_MSG_ERROR([gi-docgen not found - cannot build docs])],
++ [auto], [AC_MSG_WARN([gi-docgen not found - not building docs])])
++ enable_gtk_doc=no]
++ [enable_gtk_doc=yes])])
++AM_CONDITIONAL(ENABLE_GTK_DOC, [test "x$enable_gtk_doc" = xyes])
+
+ dnl ===========================================================================
+
+@@ -359,4 +367,5 @@ librsvg-$VERSION
+ Build introspectable bindings: ${found_introspection}
+ Build Vala bindings: ${enable_vala}
+ Build GdkPixbuf loader: ${enable_pixbuf_loader}
++ Build developer documentation: ${enable_gtk_doc}
+ "
+--
+2.35.1
+