summaryrefslogtreecommitdiff
path: root/net-misc/getdate
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/getdate')
-rw-r--r--net-misc/getdate/Manifest2
-rw-r--r--net-misc/getdate/files/getdate-glibc-2.31.patch13
-rw-r--r--net-misc/getdate/getdate-1.2-r2.ebuild42
3 files changed, 57 insertions, 0 deletions
diff --git a/net-misc/getdate/Manifest b/net-misc/getdate/Manifest
index 06a61e29d1ed..5dfe3074c562 100644
--- a/net-misc/getdate/Manifest
+++ b/net-misc/getdate/Manifest
@@ -1,3 +1,5 @@
+AUX getdate-glibc-2.31.patch 403 BLAKE2B 7fb09ee4c4f6e610c7fadabc5739ede341d037e4c54288603ff351df9dae6105292b47768e6674fc921a67e753d833ce97d29aaafd2f49dba46c6e1d6d98d0a3 SHA512 6602d57061cc9116b7d7a4c649b8829a1b968378167a384e06adfa57661836617d63bfa27af060a84cddcf28be5ea7fa9e9ac085ed233dc123277fa74e671df7
DIST getdate_rfc868-1.2.tar.gz 8323 BLAKE2B 03b9a9c0dd656fbb45785792484cfbce6e1f403f238a841bfc144401ad0deee257d88dcd214d617be2fd1ed0289e5ec63f0509effd51bd94b61be924b5f31836 SHA512 f4ce167e42f2ef54cb961923f15d8101c5d047659991b0f3859a0282d024b0e0273517b94b663a90f8d6af1d3e4acf46b96b17d39cd6b2f3ee25bc89995b1404
EBUILD getdate-1.2-r1.ebuild 747 BLAKE2B 2485cf11fd9fb09a7955bce9d9b8c1e6d47673bf12e9bdabfcf27065e670373b4083b14b932f3f53ecbc9b7c9988c0c7c77ac1149da7f93e0f47e32ef3cc2d15 SHA512 b565d91d623326b4e5f2223d837b79176adbeda6ff174952766203501a766355eeaa6787e792c38700b0f37b54d1ba66e37ebdf57f7dca6296b93a977242b5f4
+EBUILD getdate-1.2-r2.ebuild 808 BLAKE2B 9817a685505940d2432f905da4438fb6de9bf06ab2a6dfa73f348385fb8414f783215fab93b1f41e35a3dd00a14299d5360a9590bfae4ec11e065b9c7c5334ea SHA512 9ba63991a44a9bc495900ebd0ae12a025c7981b20beb546b131f5d80749eec54feaa50790bca78362968fc49030cf690309bf9c770ab43da25360dfffc97e53e
MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
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 000000000000..2926f7c7a2bc
--- /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 000000000000..93e4e9d1d8e6
--- /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
+}