diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2024-03-06 07:50:39 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2024-03-06 07:58:25 +0200 |
commit | e5ea9207faf58a5468d0e663d1a41b67618ab259 (patch) | |
tree | d48bd1c06bd468f297d7a117817ddaa90644b72f /media-libs | |
parent | app-i18n/scim-m17n: add missing runtime dependency on libltdl (diff) | |
download | gentoo-e5ea9207faf58a5468d0e663d1a41b67618ab259.tar.gz gentoo-e5ea9207faf58a5468d0e663d1a41b67618ab259.tar.bz2 gentoo-e5ea9207faf58a5468d0e663d1a41b67618ab259.zip |
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 <ceamac@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libpgf/files/libpgf-7.21.7-remove-off64_t.patch | 45 | ||||
-rw-r--r-- | media-libs/libpgf/libpgf-7.21.7-r2.ebuild | 58 |
2 files changed, 103 insertions, 0 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 new file mode 100644 index 000000000000..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 000000000000..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 +} |