commit:     a6f13bb5d31d96502292d30d7809b07254e968f9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 12 20:31:03 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 13 11:23:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f13bb5

media-libs/libzmf: Fix build w/ IUSE doc

Adding 0.0.2-r2 for additional loop var size upstream fix.

Closes: https://bugs.gentoo.org/961617
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/libzmf-0.0.2-fix-configure-warning.patch | 28 +++++++++++++++
 .../files/libzmf-0.0.2-fix-doc-install.patch       | 30 ++++++++++++++++
 .../libzmf-0.0.2-fix-too-small-loop-vars.patch     | 42 ++++++++++++++++++++++
 media-libs/libzmf/libzmf-0.0.2-r1.ebuild           | 11 ++++--
 .../{libzmf-9999.ebuild => libzmf-0.0.2-r2.ebuild} | 17 ++++++---
 media-libs/libzmf/libzmf-9999.ebuild               |  6 ++--
 6 files changed, 123 insertions(+), 11 deletions(-)

diff --git a/media-libs/libzmf/files/libzmf-0.0.2-fix-configure-warning.patch 
b/media-libs/libzmf/files/libzmf-0.0.2-fix-configure-warning.patch
new file mode 100644
index 000000000000..6367d50cc7b0
--- /dev/null
+++ b/media-libs/libzmf/files/libzmf-0.0.2-fix-configure-warning.patch
@@ -0,0 +1,28 @@
+From dfc1e8a70a5ee1b35c9e98edb9687fff97eb6012 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <[email protected]>
+Date: Wed, 28 May 2025 20:22:29 +0200
+Subject: [PATCH] Remove comment which triggers a warning
+
+configure.ac:52: warning: whitespace-separated list contains macros;
+configure.ac:52: in a future version of Autoconf they will not be expanded
+configure.ac:52: note: 'dnl' is a macro
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1afae42..f043163 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,7 +50,7 @@ AC_SUBST([REVENGE_LIBS])
+ # Find boost
+ # ==========
+ AC_CHECK_HEADERS(
+-  [dnl
++  [
+     boost/cstdint.hpp \
+     boost/math/constants/constants.hpp \
+     boost/optional.hpp \
+-- 
+2.51.0
+

diff --git a/media-libs/libzmf/files/libzmf-0.0.2-fix-doc-install.patch 
b/media-libs/libzmf/files/libzmf-0.0.2-fix-doc-install.patch
new file mode 100644
index 000000000000..4b9b6a8800e1
--- /dev/null
+++ b/media-libs/libzmf/files/libzmf-0.0.2-fix-doc-install.patch
@@ -0,0 +1,30 @@
+From 48f94abff2fcc4943626a62c6180c60862288b08 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <[email protected]>
+Date: Tue, 3 Jun 2025 11:57:29 +0200
+Subject: [PATCH] Install all files generated by doxygen
+
+Install the whole directory and do not pick only some file-types
+
+Change-Id: I743253696f3e57dfe70c6509b7d620dc2bf39e76
+---
+ docs/doxygen/Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/docs/doxygen/Makefile.am b/docs/doxygen/Makefile.am
+index 4351042..40a02e8 100644
+--- a/docs/doxygen/Makefile.am
++++ b/docs/doxygen/Makefile.am
+@@ -6,9 +6,7 @@ if WITH_LIBZMF_DOCS
+ 
+ install-data-am:
+       mkdir -p $(DESTDIR)$(docdir)/html
+-      $(INSTALL_DATA) html/*.html $(DESTDIR)$(docdir)/html/
+-      $(INSTALL_DATA) html/*.png $(DESTDIR)$(docdir)/html/
+-      $(INSTALL_DATA) html/*.css $(DESTDIR)$(docdir)/html/
++      $(INSTALL_DATA) html/* $(DESTDIR)$(docdir)/html/
+ 
+ uninstall-am:
+       -rm -rf $(DESTDIR)$(docdir)/html
+-- 
+2.51.0
+

diff --git a/media-libs/libzmf/files/libzmf-0.0.2-fix-too-small-loop-vars.patch 
b/media-libs/libzmf/files/libzmf-0.0.2-fix-too-small-loop-vars.patch
new file mode 100644
index 000000000000..7b0850e1ffdb
--- /dev/null
+++ b/media-libs/libzmf/files/libzmf-0.0.2-fix-too-small-loop-vars.patch
@@ -0,0 +1,42 @@
+From cb0bcd5c33b7f758ebe2081f1b39d2337e70e320 Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <[email protected]>
+Date: Mon, 11 Feb 2019 09:06:58 +0100
+Subject: [PATCH] Fix too small loop variables
+
+These loop variables had narrower type than the iteration's upper bound.
+
+Change-Id: I70bbbb5fcc68aafc8bdd2181be13740310003b35
+---
+ src/lib/BMIHeader.cpp    | 2 +-
+ src/lib/ZMFCollector.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/BMIHeader.cpp b/src/lib/BMIHeader.cpp
+index 31a502e..c28e625 100644
+--- a/src/lib/BMIHeader.cpp
++++ b/src/lib/BMIHeader.cpp
+@@ -141,7 +141,7 @@ void BMIHeader::readOffsets(const RVNGInputStreamPtr 
&input, uint16_t offsetCoun
+ 
+   m_offsets.erase(std::unique(m_offsets.begin(), m_offsets.end()), 
m_offsets.end());
+ 
+-  for (unsigned i = 0; i < m_offsets.size() - 1; i++)
++  for (size_t i = 0; i < m_offsets.size() - 1; i++)
+   {
+     m_offsets[i].end = m_offsets[i + 1].start;
+   }
+diff --git a/src/lib/ZMFCollector.cpp b/src/lib/ZMFCollector.cpp
+index 0b2608f..07ce41f 100644
+--- a/src/lib/ZMFCollector.cpp
++++ b/src/lib/ZMFCollector.cpp
+@@ -118,7 +118,7 @@ librevenge::RVNGString getPathStr(const 
librevenge::RVNGPropertyListVector &path
+ {
+   librevenge::RVNGString s("");
+ 
+-  for (unsigned i = 0; i < path.count(); ++i)
++  for (unsigned long i = 0; i < path.count(); ++i)
+   {
+     if (!path[i]["librevenge:path-action"])
+       continue;
+-- 
+2.51.0
+

diff --git a/media-libs/libzmf/libzmf-0.0.2-r1.ebuild 
b/media-libs/libzmf/libzmf-0.0.2-r1.ebuild
index 47e2de316017..91fe2f2d85ae 100644
--- a/media-libs/libzmf/libzmf-0.0.2-r1.ebuild
+++ b/media-libs/libzmf/libzmf-0.0.2-r1.ebuild
@@ -3,13 +3,14 @@
 
 EAPI=8
 
-if [[ ${PV} == *9999 ]]; then
+if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="https://git.libreoffice.org/libzmf";
-       inherit git-r3 autotools
+       inherit git-r3
 else
        SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz";
        KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv x86"
 fi
+inherit autotools
 
 DESCRIPTION="Library for parsing Zoner Callisto/Draw documents"
 HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libzmf";
@@ -31,9 +32,13 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="doc? ( app-text/doxygen )"
 
+PATCHES=(
+       "${FILESDIR}/${P}-fix-doc-install.patch" # bug 961617
+)
+
 src_prepare() {
        default
-       [[ ${PV} == *9999 ]] && eautoreconf
+       eautoreconf
 }
 
 src_configure() {

diff --git a/media-libs/libzmf/libzmf-9999.ebuild 
b/media-libs/libzmf/libzmf-0.0.2-r2.ebuild
similarity index 73%
copy from media-libs/libzmf/libzmf-9999.ebuild
copy to media-libs/libzmf/libzmf-0.0.2-r2.ebuild
index 3cee3db91b5d..11fb6181aa32 100644
--- a/media-libs/libzmf/libzmf-9999.ebuild
+++ b/media-libs/libzmf/libzmf-0.0.2-r2.ebuild
@@ -3,13 +3,14 @@
 
 EAPI=8
 
-if [[ ${PV} == *9999 ]]; then
+if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="https://git.libreoffice.org/libzmf";
-       inherit git-r3 autotools
+       inherit git-r3
 else
-       SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz";
+       SRC_URI="https://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz";
        KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
 fi
+inherit autotools
 
 DESCRIPTION="Library for parsing Zoner Callisto/Draw documents"
 HOMEPAGE="https://wiki.documentfoundation.org/DLP/Libraries/libzmf";
@@ -23,7 +24,7 @@ RDEPEND="
        dev-libs/icu:=
        dev-libs/librevenge
        media-libs/libpng:0=
-       virtual/zlib:=
+       sys-libs/zlib
 "
 DEPEND="${RDEPEND}
        dev-libs/boost
@@ -31,9 +32,15 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="doc? ( app-text/doxygen )"
 
+PATCHES=(
+       "${FILESDIR}/${P}-fix-doc-install.patch" # bug 961617
+       "${FILESDIR}/${P}-fix-configure-warning.patch"
+       "${FILESDIR}/${P}-fix-too-small-loop-vars.patch"
+)
+
 src_prepare() {
        default
-       [[ ${PV} == *9999 ]] && eautoreconf
+       eautoreconf
 }
 
 src_configure() {

diff --git a/media-libs/libzmf/libzmf-9999.ebuild 
b/media-libs/libzmf/libzmf-9999.ebuild
index 3cee3db91b5d..ea40c97a371c 100644
--- a/media-libs/libzmf/libzmf-9999.ebuild
+++ b/media-libs/libzmf/libzmf-9999.ebuild
@@ -3,11 +3,11 @@
 
 EAPI=8
 
-if [[ ${PV} == *9999 ]]; then
+if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="https://git.libreoffice.org/libzmf";
        inherit git-r3 autotools
 else
-       SRC_URI="http://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz";
+       SRC_URI="https://dev-www.libreoffice.org/src/${PN}/${P}.tar.xz";
        KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
 fi
 
@@ -33,7 +33,7 @@ BDEPEND="doc? ( app-text/doxygen )"
 
 src_prepare() {
        default
-       [[ ${PV} == *9999 ]] && eautoreconf
+       [[ ${PV} == *9999* ]] && eautoreconf
 }
 
 src_configure() {

Reply via email to