diff options
Diffstat (limited to 'net-misc/netkit-timed')
5 files changed, 175 insertions, 0 deletions
diff --git a/net-misc/netkit-timed/Manifest b/net-misc/netkit-timed/Manifest index 6a5592f5bd0a..ba36e31c3c4d 100644 --- a/net-misc/netkit-timed/Manifest +++ b/net-misc/netkit-timed/Manifest @@ -1,6 +1,10 @@ AUX 0.17-CFLAG-DEF-fix.patch 1551 BLAKE2B c28853b653da9b19c651ce84762e8d450f94d784eac8b56d7dcf5e5f94a1950d9e327784872a635fec46f75eb030806316eedf5d737150e162250d568189b5eb SHA512 397af8f497dc422d7e60f67e72edaefa64210ec834ac01a80696d9a9db808fcef3ff6a84b1ba1a8e3a29a76c7b47557df641c1a9028546513cc4409ee0484bbe AUX 0.17-timed-opt-parsing.patch 403 BLAKE2B e0164998a4845da439b640d60b3cdac1dd8a1329aaf41f6d4cd5117bf2eb92bf555ae9739883f3da913a5ff69bc2a91c1eefd5c31e79cf7c281d770de0df99de SHA512 76631e8ebcbe3a49f8454d6f72110803de58ddd5b3b5614e8abcd82f348e3bb1d9e706b3608b9c1f0672d529806dcbd571e27ae96b8fa5c7c9a4cd1b1762ad03 +AUX netkit-timed-0.17-accept-build-flags.patch 572 BLAKE2B 1c5ba7e1bbaa24daae72e0776c19b1ed4b65450b09bb49121aa4268380b84fd1875b95e24324df9034cbf5fe7ffc34f43195d20a52790bceeda4a59618446d7f SHA512 f287e007ff4c1888574886cdb7f6c4332009b388d3927d1b1abd225403eaf2320479ba91016bb3a656e7a431479c5ef4f112adf97665d3a9f610dcca93b1f456 +AUX netkit-timed-0.17-c23-port.patch 1371 BLAKE2B 6c1ad26b46f2b28b47e6bffcaf1d8008338f03ba051dbc22f125dc9ca14023cf3dd03f43db977d42199a929093338748315b03036d500b6ed197e2f64813b57e SHA512 9700fbd0030298cbcbf58f97b4250bcd72f5fae6f0dca3352bc73cc33241614eb04b0563910ded89b88589e2bfc621e123b651ba08554e57523d311bc1124c91 +AUX netkit-timed-0.17-c99-port.patch 1191 BLAKE2B a9198fbaae308468526760a77961ec37531f6f3683e2dc8b7012a13f9121b8ff9092d9ba015f9fc2ecf8f16c62dcff0b332ca33b20c06ae570ac8f03b8661dd8 SHA512 0401d3f34c4b587d4db3b1e85977da4d774c3441870cd10aa4a6e0e5e36703993f08ed4579bcd63ac2a284fd3cc6194198084a7c3d4588ee848afb1d075abe32 AUX timed.rc6 358 BLAKE2B 358a7b3fc14f30b0146e1269cf9327d9aaf64d8329b25c610b0405adfc91d4d21d6d14ec08c7234b53934460851db6f947117733b3d4070645503dbe1761eaa5 SHA512 cde2063563dd02b404560fa84bfa536f2f7c75e9271225e94b08630348d78639e386b8a0f59f04b389ad66f2d714c63edf2eed507b690d5ba989780b400547a4 DIST netkit-timed-0.17.tar.gz 48655 BLAKE2B 5e076394e2605569b8a9a34d47b59234ffa0f643a13ef7ac688b40d259079ec5d2eef99a0efa35d7975e11118c1fe87bd138edd98199dde68cc4d8d9f10c3599 SHA512 781a41555953a165949dde7e7279298d4faf348575ba1214c6ce60cdbc74f6f03ab31002d57a441cbcaf674f7e2cc00afa17632bc3fcb28e2afd95d39cd70b99 EBUILD netkit-timed-0.17-r11.ebuild 1056 BLAKE2B c64cf65448c4fe4dbdd896d1861e56b9f906ba649a8dcb27b7f501fffe2dd799b0b58cc50ba5bb980a9e48911a10411d1aba4b8d8d3906127125282934c02ae2 SHA512 b301c133f342160c44bd8661c203dbcd976b2311aa926dcca15d002beb11ca86dcbb54110aaad9334d0867647ad74a293981c3b18f1406bfe2907da3420a4627 +EBUILD netkit-timed-0.17-r12.ebuild 1023 BLAKE2B 0817598934699eb743eb5e1d6e030854d04477bf569c5149de3394dd627749c0debf29ff8731bc05602132ba433ea6ef0aab72c5af183e4fb3dce6b41e0aa874 SHA512 9eeb46fd3060ed9b590a4e72c3a6a62d57c40da3f55a3b9ba38c0c28456bda330569f6b142aa8304f2b50a992534a3eea30ebd841d16405d77cc40caadab5826 MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a diff --git a/net-misc/netkit-timed/files/netkit-timed-0.17-accept-build-flags.patch b/net-misc/netkit-timed/files/netkit-timed-0.17-accept-build-flags.patch new file mode 100644 index 000000000000..c72452ff0fdc --- /dev/null +++ b/net-misc/netkit-timed/files/netkit-timed-0.17-accept-build-flags.patch @@ -0,0 +1,23 @@ +was sed -i -e '/^LDFLAGS=/d' configure || die "sed configure" +--- a/configure 2024-05-09 06:02:18.884496589 -0000 ++++ b/configure 2024-05-09 06:02:26.304490777 -0000 +@@ -115,7 +115,6 @@ + echo 'no' + fi + +-LDFLAGS= + LIBS= + + rm -f __conftest* +was sed -i -e "s|ar -cruv|\${AR} -cruv|g" timed/lib/Makefile || die +--- a/timed/lib/Makefile 2024-05-09 06:02:18.886496588 -0000 ++++ b/timed/lib/Makefile 2024-05-09 06:02:31.568486653 -0000 +@@ -7,7 +7,7 @@ + OBJS = byteorder.o measure.o cksum.o + + libtimed.a: $(OBJS) +- ar -cruv $@ $^ ++ ${AR} -cruv $@ $^ + + install: ; + clean: diff --git a/net-misc/netkit-timed/files/netkit-timed-0.17-c23-port.patch b/net-misc/netkit-timed/files/netkit-timed-0.17-c23-port.patch new file mode 100644 index 000000000000..ad0410db4421 --- /dev/null +++ b/net-misc/netkit-timed/files/netkit-timed-0.17-c23-port.patch @@ -0,0 +1,65 @@ +#bug https://bugs.gentoo.org/715776 +#bug https://bugs.gentoo.org/919876 +and general port to C23 +--- a/configure ++++ b/configure +@@ -134,6 +100,7 @@ + + echo -n 'Checking for BSD signal semantics... ' + cat <<EOF >__conftest.c ++#define _DEFAULT_SOURCE + #include <unistd.h> + #include <signal.h> + int count=0; +--- a/timed/lib/cksum.c ++++ b/timed/lib/cksum.c +@@ -41,6 +41,7 @@ + #ident "$Revision: 1.4 $" + #endif + ++#define _DEFAULT_SOURCE + #include <sys/types.h> + #include <sys/time.h> + #include "timed-extern.h" +--- a/timed/timed/globals.h ++++ b/timed/timed/globals.h +@@ -37,6 +37,7 @@ + #ident "$Revision: 1.5 $" + #endif + ++#define _DEFAULT_SOURCE + #include <sys/param.h> + #include <sys/time.h> + #include <sys/socket.h> +--- a/timed/timedc/cmds.c ++++ b/timed/timedc/cmds.c +@@ -41,6 +41,7 @@ + #ident "$Revision: 1.11 $" + #endif + ++#define _DEFAULT_SOURCE + #include "timedc.h" + #include <string.h> + #include <sys/file.h> +--- a/timed/timedc/timedc.c ++++ b/timed/timedc/timedc.c +@@ -45,6 +45,7 @@ + #ident "$Revision: 1.8 $" + #endif + ++#define _DEFAULT_SOURCE + #include "timedc.h" + #include <string.h> + #include <signal.h> +--- a/timed/timed/networkdelta.c ++++ b/timed/timed/networkdelta.c +@@ -40,8 +40,8 @@ + #ifdef sgi + #ident "$Revision: 1.4 $" + #endif +-#include <math.h> + #include "globals.h" ++#include <math.h> + + static long median(float, float*, long*, long*, unsigned int); + diff --git a/net-misc/netkit-timed/files/netkit-timed-0.17-c99-port.patch b/net-misc/netkit-timed/files/netkit-timed-0.17-c99-port.patch new file mode 100644 index 000000000000..f46408049b14 --- /dev/null +++ b/net-misc/netkit-timed/files/netkit-timed-0.17-c99-port.patch @@ -0,0 +1,44 @@ +Simple port to C99 +#bug https://bugs.gentoo.org/919876 +--- a/timed/lib/measure.c ++++ b/timed/lib/measure.c +@@ -75,7 +75,7 @@ measure(u_long maxmsec, /* wait this many msec at most */ + struct sockaddr_in *xaddr, + int doprint) /* print complaints on stderr */ + { +- size_t length; ++ socklen_t length; + int measure_status; + int rcvcount, trials = 0; + int cc, count; +--- a/timed/timed/correct.c ++++ b/timed/timed/correct.c +@@ -165,7 +165,7 @@ adjclock(struct timeval *corr) + } + } else { + syslog(LOG_WARNING, +- "clock correction %d sec too large to adjust", ++ "clock correction %ld sec too large to adjust", + adj.tv_sec); + (void) gettimeofday(&now, 0); + timevaladd(&now, corr); +--- a/timed/timed/networkdelta.c ++++ b/timed/timed/networkdelta.c +@@ -40,7 +40,7 @@ char nd_rcsid[] = + #ifdef sgi + #ident "$Revision: 1.4 $" + #endif +- ++#include <math.h> + #include "globals.h" + + static long median(float, float*, long*, long*, unsigned int); +@@ -238,7 +238,7 @@ median(float a, /* initial guess for the median */ + (long)a, pass, npts); + return a; + } +- eps = AFAC*abs(aa - a); ++ eps = AFAC*fabsf(aa - a); + *eps_ptr = eps; + a = aa; + } diff --git a/net-misc/netkit-timed/netkit-timed-0.17-r12.ebuild b/net-misc/netkit-timed/netkit-timed-0.17-r12.ebuild new file mode 100644 index 000000000000..eb70db4a45ed --- /dev/null +++ b/net-misc/netkit-timed/netkit-timed-0.17-r12.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Netkit - timed: Time daemon" +HOMEPAGE="https://wiki.linuxfoundation.org/networking/netkit" +SRC_URI="http://ftp.linux.org.uk/pub/linux/Networking/netkit/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86" + +PATCHES=( + "${FILESDIR}/0.17-CFLAG-DEF-fix.patch" + "${FILESDIR}/0.17-timed-opt-parsing.patch" + "${FILESDIR}/${P}-c99-port.patch" + "${FILESDIR}/${P}-accept-build-flags.patch" + "${FILESDIR}/${P}-c23-port.patch" +) + +src_configure() { + tc-export AR + # Note this is not an autoconf configure script. econf fails + append-flags -DCLK_TCK=CLOCKS_PER_SEC + ./configure --prefix=/usr --with-c-compiler="$(tc-getCC)" || die "bad configure" +} + +src_install() { + dosbin timed/timed/timed + doman timed/timed/timed.8 + dosbin timed/timedc/timedc + doman timed/timedc/timedc.8 + einstalldocs + + newinitd "${FILESDIR}"/timed.rc6 timed +} |