[gentoo-commits] repo/gentoo:master commit in: media-libs/libpgf/files/
commit: 05afd8887bc2a50d110e01aa705debb73d7430ad Author: Viorel Munteanu gentoo org> AuthorDate: Mon Apr 8 05:14:20 2024 + Commit: Viorel Munteanu gentoo org> CommitDate: Mon Apr 8 05:32:50 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05afd888 media-libs/libpgf: fix build on musl The patch was incomplete, redo it. Closes: https://bugs.gentoo.org/927796 Signed-off-by: Viorel Munteanu gentoo.org> .../files/libpgf-7.21.7-remove-off64_t.patch | 24 -- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch b/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch index 9844bd589b94..c0ebd6fe431c 100644 --- a/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch +++ b/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch @@ -1,35 +1,27 @@ https://bugs.gentoo.org/907091 +https://bugs.gentoo.org/927796 -Remove off64_t, add AC_SYS_LARGEFILE to configure.ac instead +Remove off64_t, lseek64, add AC_SYS_LARGEFILE to configure.ac instead --- a/include/PGFplatform.h +++ b/include/PGFplatform.h -@@ -341,10 +341,6 @@ - #define __POSIX__ - #endif - --#ifndef off64_t --#define off64_t off_t --#endif -- - #ifndef lseek64 - #define lseek64 lseek - #endif -@@ -536,7 +532,7 @@ +@@ -536,8 +536,8 @@ return NoError; } #else - off64_t ret; +- if ((ret = lseek64(hFile, 0, SEEK_CUR)) == -1) { + off_t ret; - if ((ret = lseek64(hFile, 0, SEEK_CUR)) == -1) { ++ if ((ret = lseek(hFile, 0, SEEK_CUR)) == -1) { return errno; } else { -@@ -554,7 +550,7 @@ + *pos = (UINT64)ret; +@@ -554,7 +554,7 @@ return NoError; } #else - if ((lseek64(hFile, (off64_t)posOff, posMode)) == -1) { -+ if ((lseek64(hFile, (off_t)posOff, posMode)) == -1) { ++ if ((lseek(hFile, (off_t)posOff, posMode)) == -1) { return errno; } else { return NoError;
[gentoo-commits] repo/gentoo:master commit in: media-libs/libpgf/files/, media-libs/libpgf/
commit: e5ea9207faf58a5468d0e663d1a41b67618ab259 Author: Viorel Munteanu gentoo org> AuthorDate: Wed Mar 6 05:50:39 2024 + Commit: Viorel Munteanu gentoo org> CommitDate: Wed Mar 6 05:58:25 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ea9207 media-libs/libpgf: fix build on musl Drop off64_t, add AC_SYS_LARGEFILE. Closes: https://bugs.gentoo.org/907091 Signed-off-by: Viorel Munteanu gentoo.org> .../files/libpgf-7.21.7-remove-off64_t.patch | 45 + media-libs/libpgf/libpgf-7.21.7-r2.ebuild | 58 ++ 2 files changed, 103 insertions(+) diff --git a/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch b/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch new file mode 100644 index ..9844bd589b94 --- /dev/null +++ b/media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch @@ -0,0 +1,45 @@ +https://bugs.gentoo.org/907091 + +Remove off64_t, add AC_SYS_LARGEFILE to configure.ac instead + +--- a/include/PGFplatform.h b/include/PGFplatform.h +@@ -341,10 +341,6 @@ + #define __POSIX__ + #endif + +-#ifndef off64_t +-#define off64_t off_t +-#endif +- + #ifndef lseek64 + #define lseek64 lseek + #endif +@@ -536,7 +532,7 @@ + return NoError; + } + #else +- off64_t ret; ++ off_t ret; + if ((ret = lseek64(hFile, 0, SEEK_CUR)) == -1) { + return errno; + } else { +@@ -554,7 +550,7 @@ + return NoError; + } + #else +- if ((lseek64(hFile, (off64_t)posOff, posMode)) == -1) { ++ if ((lseek64(hFile, (off_t)posOff, posMode)) == -1) { + return errno; + } else { + return NoError; +--- a/configure.ac b/configure.ac +@@ -31,6 +31,7 @@ + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_HEADERS( [config.h] ) + AC_PROG_CXX ++AC_SYS_LARGEFILE + + dnl Check for doxygen support + AC_PATH_PROG([DOXYGEN], [doxygen]) diff --git a/media-libs/libpgf/libpgf-7.21.7-r2.ebuild b/media-libs/libpgf/libpgf-7.21.7-r2.ebuild new file mode 100644 index ..1cb3334335d0 --- /dev/null +++ b/media-libs/libpgf/libpgf-7.21.7-r2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edos2unix + +DESCRIPTION="Library to load, handle and manipulate images in the PGF format" +HOMEPAGE="https://libpgf.org/; +SRC_URI="https://downloads.sourceforge.net/project/libpgf/libpgf/${PV}/libpgf.zip -> ${P}.zip" +S="${WORKDIR}/libpgf" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc" + +BDEPEND=" + app-arch/unzip + doc? ( + app-text/doxygen + dev-texlive/texlive-fontutils + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-remove-off64_t.patch +) + +src_prepare() { + default + + # configure.ac has wrong version number + sed -i "s/7.15.32/${PV}/g" configure.ac || die + + # many files, including configure.ac and Makefile.am, are saved in dos format, causing errors in autotools + edos2unix *.{am,ac,in,sh} */*.{am,in} + + # the package does not respect --docdir and installs docs in /usr/share/doc/${PN} + sed -i -e 's/\$(DOC_DIR)/$(DESTDIR)@docdir@/' doc/Makefile.am || die + + if ! use doc; then + sed -i -e "/HAS_DOXYGEN/{N;N;d}" Makefile.am || die + fi + + eautoreconf +} + +src_install() { + default + + if use doc; then + docinto pdf + dodoc doc/*.pdf doc/latex/*.pdf + fi + + find "${ED}" -name '*.la' -delete || die +}