Skip to content

Commit

Permalink
app-pda/jpilot: add 2.0.1, fix configure for clang16
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/870535
Closes: https://bugs.gentoo.org/865945
Signed-off-by: Pascal Jäger <[email protected]>
Closes: gentoo#28630
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
Schievel1 authored and thesamesam committed Dec 16, 2022
1 parent 6e80ea6 commit 6410405
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-pda/jpilot/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST jpilot-1.8.2.tar.gz 1740735 BLAKE2B efc9fb8e88843d6e0f4f2245753d67856c9d0cd455c9a22c829bb103631fd8a8111ead3cb4bc434a6be00ad0cb35fe554a9ebbe1f2d38bfaf560e1b414c62260 SHA512 733dd51a2acc60760bb1ffaa0d7b4433584a571793d5e4f857492349bae8d032625baf9f0060e619d760628ddda3559bf4be057f45f4dc17ddf1af1ca795c024
DIST jpilot-2.0.1.tar.gz 1499084 BLAKE2B da10d1001e00901160be404cb50122b1b0fe0e1e8d2f03cc28fc44d19f037395ecea79b022f639dc00abdf7def65ed276afd1dbcc84e462c62370ef7c5bd6001 SHA512 a877d1c0480aa831d5667f8fbb946bfc4ba0e0cd88d55125a5b0225de138812df880a0372482c337500182c6a8544af674d89a804e0ac515427e141aa353fd54
25 changes: 25 additions & 0 deletions app-pda/jpilot/files/jpilot-2.0.1-fix-configure-clang16.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Clang16 will not allow implicit library functions by default
and therefore this test would fail because the function
exit() from stdlib.h is used. We need to include stdlib.h
in this test.
This patch needs to run _before_ eautoreconf.

Bug: https://bugs.gentoo.org/870535
PR to merge this upstream: https://github.com/juddmon/jpilot/pull/50

Pascal Jäger <[email protected]> (2022-12-10)

--- a/configure.in
+++ b/configure.in
@@ -331,7 +331,10 @@ CFLAGS="$CFLAGS $PILOT_FLAGS"
save_LIBS="$LIBS"
LIBS="$LIBS $PILOT_LIBS"

-AC_TRY_COMPILE([#include <pi-version.h>], [
+AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <pi-version.h>
+], [
exit(0);
], ,
AC_MSG_ERROR([pilot-link header pi-version.h not found])
25 changes: 25 additions & 0 deletions app-pda/jpilot/files/jpilot-2.0.1-fix-lto-type-mismatch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Date: Sat, 10 Dec 2022 21:27:26 +0100
Subject: [PATCH] fix -lto-type-mismatch

glob_date_label is declared everywhere as 'extern GtkWidget*'.
Except where it is actually declared.

Bug: https://bugs.gentoo.org/865945
PR to merge this upstream: https://github.com/juddmon/jpilot/pull/51

Pascal Jäger <[email protected]> (2022-12-10)

--- a/jpilot-sync.c
+++ b/jpilot-sync.c
@@ -47,7 +47,7 @@ unsigned char skip_plugins;
* this code but must be instantiated for the code to compile.
* The same is true of the functions which are only used in GUI mode. */
pid_t jpilot_master_pid = -1;
-int *glob_date_label;
+GtkWidget *glob_date_label;
GtkWidget *glob_dialog;
gint glob_date_timer_tag;

--
2.38.1

55 changes: 55 additions & 0 deletions app-pda/jpilot/jpilot-2.0.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

MY_PV="${PV//./_}"

DESCRIPTION="Desktop Organizer Software for the Palm Pilot"
HOMEPAGE="http://www.jpilot.org/ https://github.com/juddmon/jpilot/"
SRC_URI="https://github.com/juddmon/jpilot/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
IUSE="nls"

RDEPEND="
app-pda/pilot-link
dev-libs/libgcrypt:0=
x11-libs/gtk+:2"
DEPEND="${RDEPEND}"
BDEPEND="
nls? (
dev-util/intltool
sys-devel/gettext
)
virtual/pkgconfig"

PATCHES=(
"${FILESDIR}"/${PN}-1.8.2-qa-desktop-file.patch
"${FILESDIR}"/${PN}-1.8.2-fix-paths.patch
"${FILESDIR}"/${P}-fix-configure-clang16.patch
"${FILESDIR}"/${P}-fix-lto-type-mismatch.patch
)

src_prepare() {
default
sed -i -e 's|_UNQUOTED(ABILIB, "lib"|_UNQUOTED(ABILIB, "'$(get_libdir)'"|' configure.in || die
eautoreconf
}

src_configure() {
econf $(use_enable nls) --with-pilot_prefix=/usr/include/libpisock/
}

src_install() {
default
docompress -x /usr/share/doc/${PF}/icons

# no static archives
find "${ED}" -name '*.la' -delete || die
}
7 changes: 7 additions & 0 deletions app-pda/jpilot/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<upstream>
<maintainer status="active">
<email>[email protected]</email>
<name>Judd Montgomery</name>
</maintainer>
<remote-id type="github">juddmon/jpilot</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 6410405

Please sign in to comment.