* [gentoo-commits] repo/gentoo:master commit in: net-misc/getdate/files/, net-misc/getdate/
@ 2020-03-14 21:42 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-03-14 21:42 UTC (permalink / raw
To: gentoo-commits
commit: fb38cbd4b7f03e04e3275ce0ab540fff373499ea
Author: Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Tue Mar 10 23:38:53 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 21:42:22 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb38cbd4
net-misc/getdate: Fix build with glibc-2.31, bump EAPI
* Patches getdate to not use stime (removed in glibc-2.31).
(Tested and adjusts time fine.)
* Bump EAPI from 4 -> 7
Closes: https://bugs.gentoo.org/709642
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/14923
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
net-misc/getdate/files/getdate-glibc-2.31.patch | 13 ++++++++
net-misc/getdate/getdate-1.2-r2.ebuild | 42 +++++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/net-misc/getdate/files/getdate-glibc-2.31.patch b/net-misc/getdate/files/getdate-glibc-2.31.patch
new file mode 100644
index 00000000000..2926f7c7a2b
--- /dev/null
+++ b/net-misc/getdate/files/getdate-glibc-2.31.patch
@@ -0,0 +1,13 @@
+--- a/getdate.c
++++ b/getdate.c
+@@ -214,7 +214,9 @@
+ /* Dangerous! Could upset cron and other
+ * timer related events.
+ */
+- stime(&new_time);
++ struct timespec s = {0};
++ s.tv_sec = new_time;
++ clock_settime(CLOCK_REALTIME, &s);
+ print_samples(host, first_sample, second_sample);
+ printf("getdate: set time to %s to match host %s\n",
+ time_to_str(new_time),
diff --git a/net-misc/getdate/getdate-1.2-r2.ebuild b/net-misc/getdate/getdate-1.2-r2.ebuild
new file mode 100644
index 00000000000..93e4e9d1d8e
--- /dev/null
+++ b/net-misc/getdate/getdate-1.2-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="${PN}_rfc868"
+MY_P="${MY_PN}-${PV}"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Network Date/Time Query and Set Local Date/Time Utility"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/system/network/misc/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/system/network/misc/${MY_P}.tar.gz"
+
+LICENSE="GPL-1+"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-glibc-2.31.patch"
+)
+
+src_prepare() {
+ sed -i -e "/errno.h/ a\#include <string.h>" getdate.c || die
+ # Respect CFLAGS
+ sed -i -e "/CFLAGS/d" Makefile || die
+
+ default
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin getdate
+ doman getdate.8
+ dodoc README getdate-cron
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/getdate/files/, net-misc/getdate/
@ 2022-10-19 9:22 Ionen Wolkens
0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2022-10-19 9:22 UTC (permalink / raw
To: gentoo-commits
commit: 82879c233f6f8be1e6626a2b44718a6ba4fc14b3
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 09:17:59 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 09:21:45 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82879c23
net-misc/getdate: fix build w/ upcoming clang16
Closes: https://bugs.gentoo.org/874501
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
net-misc/getdate/files/getdate-1.2-clang16.patch | 8 ++++++++
net-misc/getdate/getdate-1.2-r2.ebuild | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/net-misc/getdate/files/getdate-1.2-clang16.patch b/net-misc/getdate/files/getdate-1.2-clang16.patch
new file mode 100644
index 000000000000..7b578e37bb26
--- /dev/null
+++ b/net-misc/getdate/files/getdate-1.2-clang16.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/874501
+--- a/getdate.c
++++ b/getdate.c
+@@ -250,3 +250,3 @@
+
+-main (int argc, char *argv[])
++int main (int argc, char *argv[])
+ {
diff --git a/net-misc/getdate/getdate-1.2-r2.ebuild b/net-misc/getdate/getdate-1.2-r2.ebuild
index 21c21d60ba86..d06f3c2be84e 100644
--- a/net-misc/getdate/getdate-1.2-r2.ebuild
+++ b/net-misc/getdate/getdate-1.2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -21,6 +21,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/${PN}-glibc-2.31.patch"
+ "${FILESDIR}/${P}-clang16.patch"
)
src_prepare() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-19 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 9:22 [gentoo-commits] repo/gentoo:master commit in: net-misc/getdate/files/, net-misc/getdate/ Ionen Wolkens
-- strict thread matches above, loose matches on Subject: below --
2020-03-14 21:42 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox