Wed Oct 23 00:13:40 2019 UTC ()
libvisual: comment out HAVE_SCHED on macos. it is missing the optional
sched_setscheduler needed by this package.

XXX would be nicer to have done this via an upstream-friendly
config test.

Omitting PKGREVISION bump since it's a compile fix.

From Clement Bouvier in PR pkg/54416.


(maya)
diff -r1.14 -r1.15 pkgsrc/audio/libvisual/distinfo
diff -r0 -r1.1 pkgsrc/audio/libvisual/patches/patch-libvisual_lv__os.c

cvs diff -r1.14 -r1.15 pkgsrc/audio/libvisual/distinfo (expand / switch to unified diff)

--- pkgsrc/audio/libvisual/distinfo 2015/11/03 01:12:39 1.14
+++ pkgsrc/audio/libvisual/distinfo 2019/10/23 00:13:40 1.15
@@ -1,12 +1,13 @@ @@ -1,12 +1,13 @@
1$NetBSD: distinfo,v 1.14 2015/11/03 01:12:39 agc Exp $ 1$NetBSD: distinfo,v 1.15 2019/10/23 00:13:40 maya Exp $
2 2
3SHA1 (libvisual-0.4.0.tar.gz) = bd21d621f1d54134c26138e19eaae46c5aeaec00 3SHA1 (libvisual-0.4.0.tar.gz) = bd21d621f1d54134c26138e19eaae46c5aeaec00
4RMD160 (libvisual-0.4.0.tar.gz) = df4fda944e84417def2817f248f587dea5b2d8f1 4RMD160 (libvisual-0.4.0.tar.gz) = df4fda944e84417def2817f248f587dea5b2d8f1
5SHA512 (libvisual-0.4.0.tar.gz) = ab2286de30d33582a92f16e46436fcbc44b74649952df6e94d96aedc2cabb18d3361496c0b8ab6f52f7178214bf735673c8f1820c3d149304787ba8407201b95 5SHA512 (libvisual-0.4.0.tar.gz) = ab2286de30d33582a92f16e46436fcbc44b74649952df6e94d96aedc2cabb18d3361496c0b8ab6f52f7178214bf735673c8f1820c3d149304787ba8407201b95
6Size (libvisual-0.4.0.tar.gz) = 583386 bytes 6Size (libvisual-0.4.0.tar.gz) = 583386 bytes
7SHA1 (patch-ab) = 2493f145d37c6de8dc37beb22e788c628d43342e 7SHA1 (patch-ab) = 2493f145d37c6de8dc37beb22e788c628d43342e
8SHA1 (patch-ac) = ad124820a2a20550bf85181be284c1e000114ddd 8SHA1 (patch-ac) = ad124820a2a20550bf85181be284c1e000114ddd
9SHA1 (patch-ad) = e7b2493cf5880cea7497a1d8d6fb1ce4f856ba6d 9SHA1 (patch-ad) = e7b2493cf5880cea7497a1d8d6fb1ce4f856ba6d
10SHA1 (patch-ae) = 72affdd9a1302a16efe5f4ecaafbc37061e4db0c 10SHA1 (patch-ae) = 72affdd9a1302a16efe5f4ecaafbc37061e4db0c
11SHA1 (patch-libvisual_lv__defines.h) = 9b14140411ae426226318a0ccdbe64d905b7710c 11SHA1 (patch-libvisual_lv__defines.h) = 9b14140411ae426226318a0ccdbe64d905b7710c
 12SHA1 (patch-libvisual_lv__os.c) = 9bc88cf74bab4a4fb2b47ba122e0a5512149b9f2
12SHA1 (patch-libvisual_lv__types.h) = 3f2baa4861b50d3359cd9cdfa75898dfc6b5895d 13SHA1 (patch-libvisual_lv__types.h) = 3f2baa4861b50d3359cd9cdfa75898dfc6b5895d

File Added: pkgsrc/audio/libvisual/patches/patch-libvisual_lv__os.c
A
$NetBSD: patch-libvisual_lv__os.c,v 1.1 2019/10/23 00:13:40 maya Exp $
macos ox has header sched.h but does not provide the realtime function:

int sched_setscheduler(pid_t, int, const struct sched_param *);
(optional according to open group).

so it is necessary to force real time defined functions in the package are not supported on apple system.

(PR pkg/54416)

--- libvisual/lv_os.c.orig     2006-01-26 15:13:37.000000000 +0000
+++ libvisual/lv_os.c
@@ -31,7 +31,9 @@
 #ifdef HAVE_SCHED_H
 # include <sched.h>
 # include <sys/types.h>
+#ifndef __APPLE__
 # define HAVE_SCHED 1
+#endif
 #elif defined HAVE_SYS_SCHED_H
 # include <sys/sched.h>
 # include <sys/types.h>