Authentication-Results: name.execsw.org; dkim=pass (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=MAqCrHUc; dkim=pass (1024-bit key) header.d=netbsd.org header.i=@netbsd.org header.b=KSeMXjHY Received: by mail.netbsd.org (Postfix, from userid 605) id CD49484ED3; Sat, 16 Mar 2024 22:36:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1710628564; bh=3oQfQsyTiF48za79nEXDwrDzLBgL0JtYuCkq1P85JQs=; h=Date:From:Subject:To:Reply-To:List-Id:List-Unsubscribe; b=MAqCrHUcuhqpHYUVWqzqWAiTW+mNA0C2RE550lxyKKkRJ4O9wuCcepwYIsI7dWdWs MoTALC2jGCbYkk0uwiAJH9X5dfsM0a/w2DnbkasLJlKwzkgVLD4sPcrTawf/Jaue4P lSfnYNQt+gxPDx+gs4ANDubeUnvXdQziQqSaXXtQ= Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id BE2B884ED0 for ; Sat, 16 Mar 2024 22:36:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id NDj1BXt_VMmv for ; Sat, 16 Mar 2024 22:36:02 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 1FB4584D53 for ; Sat, 16 Mar 2024 22:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1710628562; bh=3oQfQsyTiF48za79nEXDwrDzLBgL0JtYuCkq1P85JQs=; h=Date:From:Subject:To:Reply-To; b=KSeMXjHYVNb2YMe8zkConkH9kOQXwb5CmU9qWOFE2qOSpVPwTSzP0jpJJ6Mg9z+xU 2EWhRfJDYdt/dfeLoXWaCOz5Py1/azO0ZkCJw8QjcF5w8SIOW7fhqBwHoxZYVnfMpT FdXWylXAihG6Eb3GI5sdP/elwdggZ2Ju6qWcXgwY= Received: by cvs.NetBSD.org (Postfix, from userid 500) id 154A3FA2C; Sat, 16 Mar 2024 22:36:02 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1710628562202880" MIME-Version: 1.0 Date: Sat, 16 Mar 2024 22:36:02 +0000 From: "Nia Alarie" Subject: CVS commit: pkgsrc/net/darkstat To: pkgsrc-changes@NetBSD.org Reply-To: nia@netbsd.org X-Mailer: log_accum Message-Id: <20240316223602.154A3FA2C@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1710628562202880 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: nia Date: Sat Mar 16 22:36:01 UTC 2024 Modified Files: pkgsrc/net/darkstat: Makefile distinfo Added Files: pkgsrc/net/darkstat/patches: patch-now.c Log Message: darkstat: Fix building on Tiger To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 pkgsrc/net/darkstat/Makefile cvs rdiff -u -r1.16 -r1.17 pkgsrc/net/darkstat/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/net/darkstat/patches/patch-now.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1710628562202880 Content-Disposition: inline Content-Length: 3418 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/net/darkstat/Makefile diff -u pkgsrc/net/darkstat/Makefile:1.18 pkgsrc/net/darkstat/Makefile:1.19 --- pkgsrc/net/darkstat/Makefile:1.18 Tue Aug 1 14:59:03 2017 +++ pkgsrc/net/darkstat/Makefile Sat Mar 16 22:36:01 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2017/08/01 14:59:03 wiz Exp $ +# $NetBSD: Makefile,v 1.19 2024/03/16 22:36:01 nia Exp $ DISTNAME= darkstat-3.0.719 CATEGORIES= net @@ -16,6 +16,14 @@ GNU_CONFIGURE= yes RCD_SCRIPTS= darkstat +.include "../../mk/bsd.prefs.mk" + +# Macs lacked clock_gettime way past its implement-by date. +.if ${OPSYS} == "Darwin" && ${OPSYS_VERSION} < 101200 +LDFLAGS+= -lMacportsLegacySupport +. include "../../devel/macports-legacy-support/buildlink3.mk" +.endif + .include "../../devel/zlib/buildlink3.mk" BUILDLINK_API_DEPENDS.libpcap+= libpcap>=0.6.0 .include "../../net/libpcap/buildlink3.mk" Index: pkgsrc/net/darkstat/distinfo diff -u pkgsrc/net/darkstat/distinfo:1.16 pkgsrc/net/darkstat/distinfo:1.17 --- pkgsrc/net/darkstat/distinfo:1.16 Tue Oct 26 11:05:29 2021 +++ pkgsrc/net/darkstat/distinfo Sat Mar 16 22:36:01 2024 @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.16 2021/10/26 11:05:29 nia Exp $ +$NetBSD: distinfo,v 1.17 2024/03/16 22:36:01 nia Exp $ BLAKE2s (darkstat-3.0.719.tar.bz2) = 46d084ad95c8f2a4ce30d069494c9a2f044ea7c62f4b383b11b31b9084ad2885 SHA512 (darkstat-3.0.719.tar.bz2) = 264f6c5f862745fbfb5d125aae5a319369f028fd7be96cfb12775147f528a36b7f5a42bcd6434f2d376933292364641f2ec9cd9bdb1fe105f5a905e331181f98 Size (darkstat-3.0.719.tar.bz2) = 117695 bytes +SHA1 (patch-now.c) = 3cd0ceeb9d51c48791855c5d4b2a6f9b77a7cb3f Added files: Index: pkgsrc/net/darkstat/patches/patch-now.c diff -u /dev/null pkgsrc/net/darkstat/patches/patch-now.c:1.1 --- /dev/null Sat Mar 16 22:36:02 2024 +++ pkgsrc/net/darkstat/patches/patch-now.c Sat Mar 16 22:36:01 2024 @@ -0,0 +1,51 @@ +$NetBSD: patch-now.c,v 1.1 2024/03/16 22:36:01 nia Exp $ + +Remove the internal copy of clock_gettime for OS X and use the version +from macports-legacy-support since libpcap requires it anyway. + +--- now.c.orig 2024-03-16 22:31:55.000000000 +0000 ++++ now.c +@@ -23,43 +23,6 @@ + #include + #include + +-#if defined(__MACH__) && !defined(__gnu_hurd__) +-/* Fake up clock_gettime() on OS X. */ +-# include +-# include +-# include +-# include +- +- typedef int clockid_t; +-# define CLOCK_REALTIME 0 +-# define CLOCK_MONOTONIC 1 +- +- static uint64_t mono_first = 0; +- +- int clock_gettime(clockid_t clk_id, struct timespec *tp) { +- if (clk_id == CLOCK_REALTIME) { +- struct timeval tv; +- gettimeofday(&tv, NULL); +- tp->tv_sec = tv.tv_sec; +- tp->tv_nsec = tv.tv_usec * 1000; +- return 0; +- } +- if (clk_id == CLOCK_MONOTONIC) { +- uint64_t t = mach_absolute_time(); +- mach_timebase_info_data_t timebase; +- mach_timebase_info(&timebase); +- if (!mono_first) { +- mono_first = t; +- } +- uint64_t tdiff = (t - mono_first) * timebase.numer / timebase.denom; +- tp->tv_sec = tdiff / 1000000000; +- tp->tv_nsec = tdiff % 1000000000; +- return 0; +- } +- return -1; +- } +-#endif /* __MACH__ */ +- + static struct timespec clock_real, clock_mono; + static int now_initialized = 0; + --_----------=_1710628562202880--