pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/skalibs
Module Name: pkgsrc
Committed By: schmonz
Date: Mon May 19 14:35:38 UTC 2025
Modified Files:
pkgsrc/devel/skalibs: Makefile distinfo
Added Files:
pkgsrc/devel/skalibs/patches: patch-src_libstddjb_alarm__deadline.c
patch-src_libstddjb_alarm__milliseconds.c
patch-src_libstddjb_alarm__timeout.c
Log Message:
skalibs: fix "unable to set an alarm" on macOS. Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/devel/skalibs/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/devel/skalibs/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__deadline.c \
pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__milliseconds.c \
pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__timeout.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/skalibs/Makefile
diff -u pkgsrc/devel/skalibs/Makefile:1.28 pkgsrc/devel/skalibs/Makefile:1.29
--- pkgsrc/devel/skalibs/Makefile:1.28 Tue May 13 03:42:25 2025
+++ pkgsrc/devel/skalibs/Makefile Mon May 19 14:35:37 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2025/05/13 03:42:25 schmonz Exp $
+# $NetBSD: Makefile,v 1.29 2025/05/19 14:35:37 schmonz Exp $
DISTNAME= skalibs-2.14.4.0
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${HOMEPAGE}
Index: pkgsrc/devel/skalibs/distinfo
diff -u pkgsrc/devel/skalibs/distinfo:1.26 pkgsrc/devel/skalibs/distinfo:1.27
--- pkgsrc/devel/skalibs/distinfo:1.26 Tue May 13 03:42:25 2025
+++ pkgsrc/devel/skalibs/distinfo Mon May 19 14:35:38 2025
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.26 2025/05/13 03:42:25 schmonz Exp $
+$NetBSD: distinfo,v 1.27 2025/05/19 14:35:38 schmonz Exp $
BLAKE2s (skalibs-2.14.4.0.tar.gz) = 4a25e66862fb9d16aec817c3436a6fbfbdf58483892054e79c81544ab1ebe5fe
SHA512 (skalibs-2.14.4.0.tar.gz) = a97c9ecd62e4d751a6613c01831bff5856c5d23f8fd295d539c3280c6ffa2379e67789c728552cb4d85aa03b30af7e2499b80cb8025b52ca6d1c1746b48102b1
Size (skalibs-2.14.4.0.tar.gz) = 248403 bytes
SHA1 (patch-Makefile) = f76802c2f9721a67083128ff005772edf3461b02
SHA1 (patch-configure) = 1a89adcec51a89a4fc587b24d23c371e04b6978f
+SHA1 (patch-src_libstddjb_alarm__deadline.c) = 310532ec82d0f08b1eeaf79b1dc400282a7f252a
+SHA1 (patch-src_libstddjb_alarm__milliseconds.c) = 5e710d1bc11fde816bda65e253d1cda91bb9012d
+SHA1 (patch-src_libstddjb_alarm__timeout.c) = 4d99353f1524a2474dcf49fb8c47364eee935b4c
Added files:
Index: pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__deadline.c
diff -u /dev/null pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__deadline.c:1.1
--- /dev/null Mon May 19 14:35:38 2025
+++ pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__deadline.c Mon May 19 14:35:38 2025
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_libstddjb_alarm__deadline.c,v 1.1 2025/05/19 14:35:38 schmonz Exp $
+
+Apply upstream patches to fix "unable to set an alarm" on macOS.
+
+--- src/libstddjb/alarm_deadline.c.orig 2021-08-10 18:42:57.000000000 +0000
++++ src/libstddjb/alarm_deadline.c
+@@ -7,6 +7,7 @@
+ #ifdef SKALIBS_HASTIMER
+
+ #include <errno.h>
++#include <limits.h>
+ #include <signal.h>
+ #include <time.h>
+ #include "alarm-internal.h"
+@@ -22,7 +23,11 @@ int alarm_deadline (tain const *deadline
+ {
+ struct itimerspec it = { .it_interval = { .tv_sec = 0, .tv_nsec = 0 } } ;
+ struct sigevent se = { .sigev_notify = SIGEV_SIGNAL, .sigev_signo = SIGALRM, .sigev_value = { .sival_int = 0 }, .sigev_notify_function = 0, .sigev_notify_attributes = 0 } ;
+- if (!timespec_from_tain(&it.it_value, deadline)) return 0 ;
++ if (!timespec_from_tain(&it.it_value, deadline))
++ {
++ it.it_value.tv_sec = INT_MAX ;
++ it.it_value.tv_nsec = 0 ;
++ }
+ if (timer_create(MYCLOCK, &se, &timer_here) < 0) return 0 ;
+ if (timer_settime(timer_here, TIMER_ABSTIME, &it, 0) < 0)
+ {
Index: pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__milliseconds.c
diff -u /dev/null pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__milliseconds.c:1.1
--- /dev/null Mon May 19 14:35:38 2025
+++ pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__milliseconds.c Mon May 19 14:35:38 2025
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_libstddjb_alarm__milliseconds.c,v 1.1 2025/05/19 14:35:38 schmonz Exp $
+
+Apply upstream patches to fix "unable to set an alarm" on macOS.
+
+--- src/libstddjb/alarm_milliseconds.c.orig 2021-07-28 15:04:32.000000000 +0000
++++ src/libstddjb/alarm_milliseconds.c
+@@ -36,11 +36,17 @@ int alarm_milliseconds (unsigned int t)
+ #ifdef SKALIBS_HASITIMER
+
+ #include <sys/time.h>
++#include <errno.h>
+
+ int alarm_milliseconds (unsigned int t)
+ {
+ struct itimerval it = { .it_interval = { .tv_sec = 0, .tv_usec = 0 }, .it_value = { .tv_sec = t / 1000, .tv_usec = 1000 * (t % 1000) } } ;
+- if (setitimer(ITIMER_REAL, &it, 0) < 0) return 0 ;
++ if (setitimer(ITIMER_REAL, &it, 0) < 0)
++ {
++ if (errno != EINVAL) return 0 ;
++ it.it_value.tv_sec = 9999999 ;
++ if (setitimer(ITIMER_REAL, &it, 0) < 0) return 0 ;
++ }
+ return 1 ;
+ }
+
Index: pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__timeout.c
diff -u /dev/null pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__timeout.c:1.1
--- /dev/null Mon May 19 14:35:38 2025
+++ pkgsrc/devel/skalibs/patches/patch-src_libstddjb_alarm__timeout.c Mon May 19 14:35:38 2025
@@ -0,0 +1,62 @@
+$NetBSD: patch-src_libstddjb_alarm__timeout.c,v 1.1 2025/05/19 14:35:38 schmonz Exp $
+
+Apply upstream patches to fix "unable to set an alarm" on macOS.
+
+--- src/libstddjb/alarm_timeout.c.orig 2021-08-10 18:42:57.000000000 +0000
++++ src/libstddjb/alarm_timeout.c
+@@ -7,6 +7,7 @@
+ #ifdef SKALIBS_HASTIMER
+
+ #include <errno.h>
++#include <limits.h>
+ #include <signal.h>
+ #include <time.h>
+ #include "alarm-internal.h"
+@@ -22,7 +23,11 @@ int alarm_timeout (tain const *tto)
+ {
+ struct itimerspec it = { .it_interval = { .tv_sec = 0, .tv_nsec = 0 } } ;
+ struct sigevent se = { .sigev_notify = SIGEV_SIGNAL, .sigev_signo = SIGALRM, .sigev_value = { .sival_int = 0 }, .sigev_notify_function = 0, .sigev_notify_attributes = 0 } ;
+- if (!timespec_from_tain_relative(&it.it_value, tto)) return 0 ;
++ if (!timespec_from_tain_relative(&it.it_value, tto))
++ {
++ it.it_value.tv_sec = INT_MAX ;
++ it.it_value.tv_nsec = 0 ;
++ }
+ if (timer_create(MYCLOCK, &se, &timer_here) < 0) return 0 ;
+ if (timer_settime(timer_here, 0, &it, 0) < 0)
+ {
+@@ -38,12 +43,23 @@ int alarm_timeout (tain const *tto)
+ #ifdef SKALIBS_HASITIMER
+
+ #include <sys/time.h>
++#include <errno.h>
++#include <limits.h>
+
+ int alarm_timeout (tain const *tto)
+ {
+ struct itimerval it = { .it_interval = { .tv_sec = 0, .tv_usec = 0 } } ;
+- if (!timeval_from_tain_relative(&it.it_value, tto)) return 0 ;
+- if (setitimer(ITIMER_REAL, &it, 0) < 0) return 0 ;
++ if (!timeval_from_tain_relative(&it.it_value, tto))
++ {
++ it.it_value.tv_sec = INT_MAX ;
++ it.it_value.tv_usec = 0 ;
++ }
++ if (setitimer(ITIMER_REAL, &it, 0) < 0)
++ {
++ if (errno != EINVAL) return 0 ;
++ it.it_value.tv_sec = 9999999 ;
++ if (setitimer(ITIMER_REAL, &it, 0) < 0) return 0 ;
++ }
+ return 1 ;
+ }
+
+@@ -55,7 +71,7 @@ int alarm_timeout (tain const *tto)
+ int alarm_timeout (tain const *tto)
+ {
+ int t = tain_to_millisecs(tto) ;
+- if (t < 0 || t > INT_MAX - 999) return 0 ;
++ if (t < 0 || t > INT_MAX - 999) t = INT_MAX - 999 ;
+ t = (t + 999) / 1000 ;
+ alarm(t) ;
+ return 1 ;
Home |
Main Index |
Thread Index |
Old Index