public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/netkit-timed/files/, net-misc/netkit-timed/
@ 2016-05-04  1:02 Austin English
  0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-05-04  1:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5022f21d9d23fd2126ac38516a8eaf7024e92689
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 00:26:36 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Wed May  4 00:26:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5022f21d

net-misc/netkit-timed: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 net-misc/netkit-timed/files/timed.rc6              |  4 +-
 net-misc/netkit-timed/netkit-timed-0.17-r10.ebuild | 43 ++++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/net-misc/netkit-timed/files/timed.rc6 b/net-misc/netkit-timed/files/timed.rc6
index f634526..0aaa477 100644
--- a/net-misc/netkit-timed/files/timed.rc6
+++ b/net-misc/netkit-timed/files/timed.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-misc/netkit-timed/netkit-timed-0.17-r10.ebuild b/net-misc/netkit-timed/netkit-timed-0.17-r10.ebuild
new file mode 100644
index 0000000..80ed917
--- /dev/null
+++ b/net-misc/netkit-timed/netkit-timed-0.17-r10.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit flag-o-matic toolchain-funcs
+
+IUSE=""
+DESCRIPTION="Netkit - timed"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+KEYWORDS="amd64 ~mips ppc ppc64 sparc x86"
+LICENSE="BSD GPL-2"
+SLOT="0"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+	eapply "${FILESDIR}"/0.17-CFLAG-DEF-fix.patch
+	eapply "${FILESDIR}"/0.17-timed-opt-parsing.patch
+	sed -i configure \
+		-e '/^LDFLAGS=/d' \
+		|| die "sed configure"
+	default
+}
+
+src_configure() {
+	# 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
+	dodoc  README ChangeLog BUGS
+
+	newinitd "${FILESDIR}"/timed.rc6 timed
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/netkit-timed/files/, net-misc/netkit-timed/
@ 2025-01-17 13:36 Joonas Niilola
  0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2025-01-17 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     adabb301fc3fb6780031a6497f7c88d2985ae340
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Thu Jan  9 18:08:09 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jan 17 13:35:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adabb301

net-misc/netkit-timed: port to C99/C23

Changing code to semantically identical, but syntactically correct.
Added _DEFAULT_CODE definitions and include reordering where needed,
for successful compilation with GCC-14 and -std=c23
Also converted sed to patch

Bug: https://bugs.gentoo.org/715776
Closes: https://bugs.gentoo.org/919876
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/36019
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../netkit-timed-0.17-accept-build-flags.patch     | 23 ++++++++
 .../files/netkit-timed-0.17-c23-port.patch         | 65 ++++++++++++++++++++++
 .../files/netkit-timed-0.17-c99-port.patch         | 44 +++++++++++++++
 net-misc/netkit-timed/netkit-timed-0.17-r12.ebuild | 39 +++++++++++++
 4 files changed, 171 insertions(+)

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..286bd0d6e057
--- /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 ~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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-17 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 13:36 [gentoo-commits] repo/gentoo:master commit in: net-misc/netkit-timed/files/, net-misc/netkit-timed/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2016-05-04  1:02 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox