public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/wayland] rawhide: Conditionalize book documentation
Date: Tue, 28 Jul 2026 21:07:36 GMT	[thread overview]
Message-ID: <178527285631.1.9810190272990925925.rpms-wayland-74f80e5c3a0f@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/wayland
            Branch : rawhide
            Commit : 74f80e5c3a0f82758e58cb393eb5ff3ae17baf1b
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-07-17T12:25:08-04:00
            Stats  : +67/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/wayland/c/74f80e5c3a0f82758e58cb393eb5ff3ae17baf1b?branch=rawhide

            Log:
            Conditionalize book documentation

Documentation which requires unwanted dependencies is generally disabled.

https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/548

---
diff --git a/0001-doc-add-option-to-not-build-the-book.patch b/0001-doc-add-option-to-not-build-the-book.patch
new file mode 100644
index 0000000..f0556a5
--- /dev/null
+++ b/0001-doc-add-option-to-not-build-the-book.patch
@@ -0,0 +1,53 @@
+From f1798e0601aff530f1f9025067ff46d2867a1009 Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Thu, 9 Jul 2026 17:02:36 -0400
+Subject: [PATCH] doc: add option to not build the book
+
+mdbook is not available in all distributions, and other documentation does
+not require it.
+
+Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
+---
+ doc/meson.build   | 6 ++++--
+ meson_options.txt | 4 ++++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/doc/meson.build b/doc/meson.build
+index b9f6fcb..7b3d7d8 100644
+--- a/doc/meson.build
++++ b/doc/meson.build
+@@ -6,7 +6,7 @@ dot = find_program('dot')
+ doxygen = find_program('doxygen')
+ xsltproc = find_program('xsltproc')
+ xmlto = find_program('xmlto')
+-mdbook = find_program('mdbook')
++mdbook = find_program('mdbook', required: get_option('book'))
+ 
+ cmd = run_command(doxygen, '--version', check: true)
+ message('doxygen: ' + cmd.stdout().strip())
+@@ -40,4 +40,6 @@ publican_html_dir = 'html'
+ 
+ subdir('doxygen')
+ subdir('publican')
+-subdir('book')
++if mdbook.found()
++	subdir('book')
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 02c2346..3445f3f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -22,6 +22,10 @@ option('dtd_validation',
+   description: 'Validate the protocol DTD (requires libxml2)',
+   type: 'boolean',
+   value: true)
++option('book',
++  description: 'Build the Wayland Book (requires mdbook)',
++  type: 'boolean',
++  value: true)
+ option('icon_directory',
+   description: 'Location used to look for cursors (defaults to ${datadir}/icons if unset)',
+   type: 'string',
+-- 
+2.55.0
+

diff --git a/wayland.spec b/wayland.spec
index 0c6b35e..a7e2b78 100644
--- a/wayland.spec
+++ b/wayland.spec
@@ -1,6 +1,8 @@
+%bcond book %{undefined rhel}
+
 Name:           wayland
 Version:        1.26.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Wayland Compositor Infrastructure
 
 # SPDX
@@ -10,6 +12,9 @@ Source0:        https://gitlab.freedesktop.org/%{name}/%{name}/-/releases/%{vers
 Source1:        https://gitlab.freedesktop.org/%{name}/%{name}/-/releases/%{version}/downloads/%{name}-%{version}.tar.xz.sig
 Source2:        emersion-gpg-key.asc
 
+# https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/548
+Patch0:         0001-doc-add-option-to-not-build-the-book.patch
+
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
 BuildRequires:  docbook-style-xsl
@@ -18,7 +23,9 @@ BuildRequires:  expat-devel
 BuildRequires:  graphviz
 BuildRequires:  libxml2-devel
 BuildRequires:  libxslt
+%if %{with book}
 BuildRequires:  mdbook
+%endif
 BuildRequires:  meson
 BuildRequires:  pkgconfig(libffi)
 BuildRequires:  xmlto
@@ -64,9 +71,11 @@ developing applications that use %{name}.
 %package doc
 Summary: Wayland development documentation
 BuildArch: noarch
+%if %{with book}
 # Required for mdbook generated docs
 Requires: adobe-source-code-pro-fonts
 Requires: open-sans-fonts
+%endif
 
 %description doc
 Wayland development documentation
@@ -131,7 +140,7 @@ Wayland server library
 %autosetup -p1
 
 %conf
-%meson
+%meson %{!?with_book:-Dbook=false}
 
 %build
 %meson_build
@@ -143,6 +152,9 @@ Wayland server library
 %meson_test
 
 %changelog
+* Fri Jul 17 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 1.26.0-2
+- Conditionalize book documentation
+
 * Thu Jul 16 2026 Neal Gompa <ngompa@fedoraproject.org> - 1.26.0-1
 - Update to 1.26.0
 

                 reply	other threads:[~2026-07-28 21:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178527285631.1.9810190272990925925.rpms-wayland-74f80e5c3a0f@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox