commit:     d19264ddf64e2a582739965121381cafc4b8ec1f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 19 10:17:40 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 19 11:03:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d19264dd

app-pda/libplist: fix modern C issue in configure

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libplist-2.3.0-configure-c99.patch       | 22 ++++++++++
 app-pda/libplist/libplist-2.3.0-r2.ebuild          | 50 ++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/app-pda/libplist/files/libplist-2.3.0-configure-c99.patch 
b/app-pda/libplist/files/libplist-2.3.0-configure-c99.patch
new file mode 100644
index 000000000000..dfe3714c46e2
--- /dev/null
+++ b/app-pda/libplist/files/libplist-2.3.0-configure-c99.patch
@@ -0,0 +1,22 @@
+https://github.com/libimobiledevice/libplist/commit/b3cf5bec39de69bf06c7813689f03cbe58f45ca9
+
+From b3cf5bec39de69bf06c7813689f03cbe58f45ca9 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <[email protected]>
+Date: Mon, 18 Dec 2023 11:14:40 +0100
+Subject: [PATCH] configure: Use string for tm_zone assignment
+
+This matches what the actual sources do.  Clang 16 and GCC 14
+no longer support converting ints to pointers implicitly, so the
+configure probe always fails with these compilers.
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,7 +129,7 @@ AC_CACHE_CHECK(for tm_zone in struct tm, 
ac_cv_struct_tm_zone,
+       #include <time.h>
+     ], [
+       struct tm tm;
+-      tm.tm_zone = 1;
++      tm.tm_zone = (char*)"UTC";
+     ])],
+     [ac_cv_struct_tm_zone=yes],
+     [ac_cv_struct_tm_zone=no]
+

diff --git a/app-pda/libplist/libplist-2.3.0-r2.ebuild 
b/app-pda/libplist/libplist-2.3.0-r2.ebuild
new file mode 100644
index 000000000000..bd04f215b8c2
--- /dev/null
+++ b/app-pda/libplist/libplist-2.3.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Support library to deal with Apple Property Lists (Binary & XML)"
+HOMEPAGE="https://www.libimobiledevice.org/";
+SRC_URI="https://cgit.libimobiledevice.org/${PN}.git/snapshot/${P}.tar.bz2";
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/4"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( AUTHORS NEWS README.md )
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.2.0-pkgconfig-lib.patch
+       "${FILESDIR}"/${PN}-2.3.0-test-rename.patch
+       "${FILESDIR}"/${PN}-2.3.0-configure-c99.patch
+)
+
+src_prepare() {
+       default
+       RELEASE_VERSION=${PV} eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               --disable-static
+               --without-cython
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       einstalldocs
+       find "${ED}" -name '*.la' -delete || die
+
+       # bugs #733082, #915375
+       dosym ./libplist-2.0.pc /usr/$(get_libdir)/pkgconfig/libplist.pc
+       dosym ./libplist++-2.0.pc /usr/$(get_libdir)/pkgconfig/libplist++.pc
+       dosym ./libplist++-2.0.so.4.3.0 /usr/$(get_libdir)/libplist++.so
+       dosym ./libplist-2.0.so.4.3.0 /usr/$(get_libdir)/libplist.so
+}

Reply via email to