commit:     e74ebf33b91fe033f132c5ef269ae336179a8596
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 14 10:36:21 2023 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Tue Mar 14 10:36:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e74ebf33

media-radio/gpredict: Fix implicit-function-declaration for gethostbyname()

Closes: https://bugs.gentoo.org/896424
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 .../files/gpredict-2.3-gethostbyname.patch         | 32 +++++++++++++++++++
 media-radio/gpredict/gpredict-2.3-r2.ebuild        | 37 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)

diff --git a/media-radio/gpredict/files/gpredict-2.3-gethostbyname.patch 
b/media-radio/gpredict/files/gpredict-2.3-gethostbyname.patch
new file mode 100644
index 000000000000..5fb7c3f3ef3e
--- /dev/null
+++ b/media-radio/gpredict/files/gpredict-2.3-gethostbyname.patch
@@ -0,0 +1,32 @@
+# MUSL needs _GNU_SOURCE defined to work with gethostbyname()
+# see bug# 896424
+diff --git a/src/gtk-rig-ctrl.c b/src/gtk-rig-ctrl.c
+index 288fa42..25de30c 100644
+--- a/src/gtk-rig-ctrl.c
++++ b/src/gtk-rig-ctrl.c
+@@ -34,6 +34,10 @@
+ #include <build-config.h>
+ #endif
+ 
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <gdk/gdkkeysyms.h>
+ #include <glib.h>
+ #include <glib/gi18n.h>
+diff --git a/src/gtk-rot-ctrl.c b/src/gtk-rot-ctrl.c
+index 5ff5d09..f9e3b4c 100644
+--- a/src/gtk-rot-ctrl.c
++++ b/src/gtk-rot-ctrl.c
+@@ -32,6 +32,10 @@
+ #include <build-config.h>
+ #endif
+ 
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ /* NETWORK */
+ #ifndef WIN32
+ #include <arpa/inet.h>          /* htons() */

diff --git a/media-radio/gpredict/gpredict-2.3-r2.ebuild 
b/media-radio/gpredict/gpredict-2.3-r2.ebuild
new file mode 100644
index 000000000000..cf8fa7dccbcf
--- /dev/null
+++ b/media-radio/gpredict/gpredict-2.3-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Real-time satellite tracking and orbit prediction application"
+HOMEPAGE="http://gpredict.oz9aec.net";
+SRC_URI="https://github.com/csete/gpredict/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/glib:2
+       x11-libs/gdk-pixbuf[jpeg]
+       x11-libs/gtk+:3
+       x11-libs/goocanvas:2.0
+       net-misc/curl"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/intltool
+       sys-devel/gettext
+       virtual/pkgconfig"
+
+DOCS=( AUTHORS NEWS README )
+
+src_prepare() {
+       eapply_user
+       # remove wrong doc location
+       eapply "${FILESDIR}/${P}-doc.patch"
+       eapply "${FILESDIR}/${PN}-2.2.1-fno-common.patch"
+       eapply "${FILESDIR}/${PN}-2.3-gethostbyname.patch"
+
+       eautoreconf
+}

Reply via email to