From d60d0beb9b2ca0afb938792dfd12599ca2c424d2 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 22 Apr 2023 17:53:17 +0100 Subject: dev-libs/chmlib: fix w/ clang 16 Closes: https://bugs.gentoo.org/871177 Signed-off-by: Sam James --- dev-libs/chmlib/chmlib-0.40-r1.ebuild | 39 ------------------------ dev-libs/chmlib/chmlib-0.40-r2.ebuild | 40 +++++++++++++++++++++++++ dev-libs/chmlib/files/chmlib-0.40-clang16.patch | 24 +++++++++++++++ 3 files changed, 64 insertions(+), 39 deletions(-) delete mode 100644 dev-libs/chmlib/chmlib-0.40-r1.ebuild create mode 100644 dev-libs/chmlib/chmlib-0.40-r2.ebuild create mode 100644 dev-libs/chmlib/files/chmlib-0.40-clang16.patch diff --git a/dev-libs/chmlib/chmlib-0.40-r1.ebuild b/dev-libs/chmlib/chmlib-0.40-r1.ebuild deleted file mode 100644 index abdf79cf4f16..000000000000 --- a/dev-libs/chmlib/chmlib-0.40-r1.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools out-of-source - -DESCRIPTION="Library for MS CHM (compressed html) file format" -HOMEPAGE="http://www.jedrea.com/chmlib/" -SRC_URI="http://www.jedrea.com/${PN}/${P}.tar.bz2" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv x86" -IUSE="+examples static-libs" - -PATCHES=( - "${FILESDIR}"/${PN}-0.39-stdtypes.patch - "${FILESDIR}"/${P}-headers.patch -) - -src_prepare() { - default - # Required for CONFIG_SHELL != bash (bug #668408) - eautoreconf -} - -my_src_configure() { - local myeconfargs=( - $(use_enable examples) - $(use_enable static-libs static) - ) - econf "${myeconfargs[@]}" -} - -my_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/dev-libs/chmlib/chmlib-0.40-r2.ebuild b/dev-libs/chmlib/chmlib-0.40-r2.ebuild new file mode 100644 index 000000000000..cdbdd764997e --- /dev/null +++ b/dev-libs/chmlib/chmlib-0.40-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools out-of-source + +DESCRIPTION="Library for MS CHM (compressed html) file format" +HOMEPAGE="http://www.jedrea.com/chmlib/" +SRC_URI="http://www.jedrea.com/${PN}/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv x86" +IUSE="+examples static-libs" + +PATCHES=( + "${FILESDIR}"/${PN}-0.39-stdtypes.patch + "${FILESDIR}"/${P}-headers.patch + "${FILESDIR}"/${P}-clang16.patch +) + +src_prepare() { + default + # Required for CONFIG_SHELL != bash (bug #668408) + eautoreconf +} + +my_src_configure() { + local myeconfargs=( + $(use_enable examples) + $(use_enable static-libs static) + ) + econf "${myeconfargs[@]}" +} + +my_src_install_all() { + einstalldocs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/chmlib/files/chmlib-0.40-clang16.patch b/dev-libs/chmlib/files/chmlib-0.40-clang16.patch new file mode 100644 index 000000000000..eb66b91d5556 --- /dev/null +++ b/dev-libs/chmlib/files/chmlib-0.40-clang16.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/871177 +https://github.com/jedwing/CHMLib/pull/17 + +From 5877959e3eb9a54e131608c52e2d6f4c89bc0189 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Wed, 19 Apr 2023 09:47:03 +0200 +Subject: [PATCH] Avoid implicit function declarations, for C99 compatibility + +Define _LARGEFILE64_SOURCE so that defines pread64. + +This avoids build failures with future compilers which do not +support implicit function declarations by default. +--- a/src/chm_lib.c ++++ b/src/chm_lib.c +@@ -48,6 +48,8 @@ + * * + ***************************************************************************/ + ++#define _LARGEFILE64_SOURCE /* for pread64 */ ++ + #include "chm_lib.h" + + #ifdef CHM_MT + -- cgit v1.2.3-65-gdbad