diff mbox series

gstreamer1.0-vaapi: Enable hotdoc to produce doc

Message ID 20260225094537.1213-1-liuyd.fnst@fujitsu.com
State New
Headers show
Series gstreamer1.0-vaapi: Enable hotdoc to produce doc | expand

Commit Message

Liu Yiding Feb. 25, 2026, 9:45 a.m. UTC
1. Add 0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch.

2. Add INSANE_SKIP to fix do_package QA Issue

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 ...uild-check-to-make-doc-work-in-yocto.patch | 32 +++++++++++++++++++
 .../gstreamer/gstreamer1.0-vaapi_1.26.9.bb    | 19 +++++++++--
 2 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch
new file mode 100644
index 0000000000..e628e3f61e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch
@@ -0,0 +1,32 @@ 
+Subject: [PATCH] Disable cross_build check to make doc work in yocto.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
+---
+ docs/meson.build | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/docs/meson.build b/docs/meson.build
+index ad5f785..1e7a808 100644
+--- a/docs/meson.build
++++ b/docs/meson.build
+@@ -4,15 +4,6 @@ if get_option('doc').disabled()
+   subdir_done()
+ endif
+ 
+-if meson.is_cross_build()
+-    if get_option('doc').enabled()
+-        error('Documentation enabled but building the doc while cross building is not supported yet.')
+-    endif
+-
+-    message('Documentation not built as building it while cross building is not supported yet.')
+-    subdir_done()
+-endif
+-
+ if static_build
+     if get_option('doc').enabled()
+         error('Documentation enabled but not supported when building statically.')
+-- 
+2.43.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.9.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.9.bb
index dc5055bb0c..0681ce4884 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.9.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.26.9.bb
@@ -9,7 +9,9 @@  REALPN = "gstreamer-vaapi"
 LICENSE = "LGPL-2.1-or-later"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
+SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz \
+           file://0001-Disable-cross_build-check-to-make-doc-work-in-yocto.patch \
+          "
 
 SRC_URI[sha256sum] = "bf989040404515dc9b042f4fdc49ff33a6dccf49d544736150e967b42665598e"
 
@@ -21,7 +23,6 @@  inherit meson pkgconfig features_check upstream-version-is-even
 REQUIRED_DISTRO_FEATURES ?= "opengl"
 
 EXTRA_OEMESON += " \
-    -Ddoc=disabled \
     -Dexamples=disabled \
     -Dtests=enabled \
 "
@@ -44,10 +45,24 @@  PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
 PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
 PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
 PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
+PACKAGECONFIG[hotdoc] = "-Ddoc=enabled,-Ddoc=disabled,hotdoc-native"
 PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
 PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
 
+do_install:append:class-target () {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'hotdoc', 'true', 'false', d)}; then
+        export LLVM_CONFIG=${STAGING_BINDIR_NATIVE}/llvm-config
+        meson compile docs/vaapi-doc
+        install -d ${D}${docdir}/${PN}
+        cp -r ${B}/docs/vaapi-doc/html ${D}${docdir}/${PN}
+    fi
+}
+
 FILES:${PN} += "${libdir}/gstreamer-*/*.so"
 FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
 FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a"
 FILES:${PN}-tests = "${bindir}/*"
+FILES:${PN}-doc += "${docdir}"
+
+# Fix do_package_qa: QA Issue: non -staticdev package contains static .a library: gstreamer1.0-vaapi-doc path '/usr/share/doc/gstreamer1.0-vaapi/html/assets/js/search/annex.a' [staticdev], annex.a is a text file
+INSANE_SKIP:${PN}-doc += "staticdev"