commit:     85b9381262655b68fe5f48e0e586d383f9e52c97
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  2 18:20:21 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 18:27:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85b93812

app-emulation/virtualbox: fix building with dev-libs/libxml2-2.11

Replace some xhtml codes with their numeric equivalents and add empty
fallbacks for missing files.  Nothing changes in the resulting files.

Closes: https://bugs.gentoo.org/906309
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/virtualbox-6.1.44-fix-libxml2.patch      | 25 ++++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.44.ebuild  | 11 ++++++++++
 2 files changed, 36 insertions(+)

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch 
b/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
new file mode 100644
index 000000000000..c3e76e58c3f2
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
@@ -0,0 +1,25 @@
+With dev-libs/libxml2-2.11, xi:include errors out if it can't find a file, so 
add an empty fallback.
+Used to work with dev-libs/libxml2-2.10.
+
+See also: https://bugs.gentoo.org/906309
+
+--- a/doc/manual/en_US/user_Frontends.xml
++++ b/doc/manual/en_US/user_Frontends.xml
+@@ -1205,6 +1205,6 @@
+ 
+   </sect1>
+ 
+-  <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
++  <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; ><xi:fallback/></xi:include>
+ 
+ </chapter>
+--- b/doc/manual/en_US/user_VBoxManage.xml
++++ a/doc/manual/en_US/user_VBoxManage.xml
+@@ -8975,6 +8975,6 @@
+ <!-- TODO: Figure out how we can handle other manpages. The xml is bolted to
+              sect1, so it's not possible to have them "in place" -->
+ 
+-  <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
++  <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; ><xi:fallback/></xi:include>
+ 
+ </chapter>

diff --git a/app-emulation/virtualbox/virtualbox-6.1.44.ebuild 
b/app-emulation/virtualbox/virtualbox-6.1.44.ebuild
index 84d1d998b3b0..b148184cbd9b 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.44.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.44.ebuild
@@ -179,6 +179,9 @@ PATCHES=(
        # 865361
        "${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch
 
+       # 906309
+       "${FILESDIR}"/${PN}-6.1.44-fix-libxml2.patch
+
        # Downloaded patchset
        "${WORKDIR}"/virtualbox-patches-6.1.36/patches
 )
@@ -278,6 +281,14 @@ src_configure() {
                append-cxxflags $(test-flags-CXX -mno-$i)
        done
 
+       # replace xhtml names with numeric equivalents
+       find doc/manual -name \*.xml -exec sed -i \
+               -e 's/&nbsp;/\&#160;/g' \
+               -e 's/&ndash;/\&#8211;/g' \
+               -e 's/&larr;/\&#8592;/g' \
+               -e 's/&rarr;/\&#8594;/g' \
+               -e 's/&harr;/\&#8596;/g' {} \+ || die
+
        tc-export AR CC CXX LD RANLIB
        export HOST_CC="$(tc-getBUILD_CC)"
 

Reply via email to