# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= sndio VERSION= 1.10.0 REVISION= 1 KEYWORDS= audio VARIANTS= std SDESC[std]= Small audio and MIDI framework from OpenBSD HOMEPAGE= http://www.sndio.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= http://www.sndio.org/ DISTFILE[1]= sndio-1.10.0.tar.gz:main DF_INDEX= 1 SPKGS[std]= set primary dev tools man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BROKEN[sunos]= Needs err.h which is not available on Sol10 B_DEPS[linux]= alsa-lib:dev:std libbsd:dev:std BR_DEPS[linux]= libbsd:primary:std alsa-lib:primary:std USERS= _sndio GROUPS= _sndio USERGROUP_SPKG= tools LICENSE= ISCL:primary LICENSE_FILE= ISCL:{{WRKDIR}}/ISC_LICENSE LICENSE_AWK= ISCL:"^\#ifndef" LICENSE_SOURCE= ISCL:{{WRKSRC}}/libsndio/sndio.h LICENSE_SCHEME= solo FPC_EQUIVALENT= audio/sndio MUST_CONFIGURE= yes CONFIGURE_ARGS= --prefix={{PREFIX}} --mandir={{MANPREFIX}}/man SINGLE_JOB= yes SOVERSION= 7.3 RC_SUBR= sndiod:tools VAR_OPSYS[linux]= CONFIGURE_ARGS= --with-libbsd post-install: ${STRIP_CMD} \ ${STAGEDIR}${PREFIX}/lib/libsndio.${LIBEXT} \ ${STAGEDIR}${PREFIX}/bin/sndioctl \ ${STAGEDIR}${PREFIX}/bin/sndiod \ ${STAGEDIR}${PREFIX}/bin/aucat \ ${STAGEDIR}${PREFIX}/bin/midicat pre-configure: # Make sure sndiod can be started inside jails as root ${REINPLACE_CMD} 's|err(1, "setpriority")|warn("setpriority")|' \ ${WRKSRC}/sndiod/sndiod.c [FILE:449:descriptions/desc.primary] Sndio is a small audio and MIDI framework part of the OpenBSD project. It provides an lightweight audio & MIDI server and a fully documented user-space API to access either the server or directly the hardware in a uniform way. Sndio is designed to work for desktop applications, but pays special attention to synchronization mechanisms and reliability required by music applications. Reliability through simplicity are part of the project goals. [FILE:35:descriptions/desc.tools] This package contains sndio tools. [FILE:98:distinfo] bebd3bfd01c50c9376cf3e7814b9379bed9e17d0393b5113b7eb7a3d0d038c54 162725 sndio-1.10.0.tar.gz [FILE:57:manifests/plist.primary] lib/ libsndio.so.%%SOMAJOR%% libsndio.so.%%SOVERSION%% [FILE:55:manifests/plist.dev] include/sndio.h lib/libsndio.so lib/pkgconfig/sndio.pc [FILE:39:manifests/plist.tools] bin/ aucat midicat sndioctl sndiod [FILE:583:manifests/plist.man] share/man/man1/ aucat.1 midicat.1 sndioctl.1 share/man/man3/ mio_close.3 mio_eof.3 mio_nfds.3 mio_open.3 mio_pollfd.3 mio_read.3 mio_revents.3 mio_write.3 sio_close.3 sio_eof.3 sio_getcap.3 sio_getpar.3 sio_initpar.3 sio_nfds.3 sio_onmove.3 sio_onvol.3 sio_open.3 sio_pollfd.3 sio_read.3 sio_revents.3 sio_setpar.3 sio_setvol.3 sio_start.3 sio_stop.3 sio_write.3 sioctl_close.3 sioctl_eof.3 sioctl_nfds.3 sioctl_ondesc.3 sioctl_onval.3 sioctl_open.3 sioctl_pollfd.3 sioctl_revents.3 sioctl_setval.3 share/man/man7/sndio.7 share/man/man8/sndiod.8 [FILE:249:patches/patch-aucat_defs.h] --- aucat/defs.h.orig 2022-07-16 09:38:24 UTC +++ aucat/defs.h @@ -17,6 +17,12 @@ #ifndef DEFS_H #define DEFS_H +#ifdef __sun__ +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#define BYTE_ORDER LITTLE_ENDIAN +#endif + /* * limits */ [FILE:1784:patches/patch-configure] --- configure.orig 2024-08-01 15:36:54 UTC +++ configure @@ -70,9 +70,9 @@ case `uname` in Linux) alsa=yes ldadd="-lrt -lm" - user=sndiod - so_link="libsndio.so libsndio.so.\${MAJ} libsndio.so.\${MAJ}.0" - so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}" + user=_sndio + so_link="libsndio.so libsndio.so.\${MAJ}" + so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}.\${MIN}" defs='-D_GNU_SOURCE -DHAVE_SOCK_CLOEXEC -DHAVE_CLOCK_GETTIME' ;; GNU/kFreeBSD) # OSS output support on kFreeBSD, but otherwise like linux @@ -97,7 +97,8 @@ case `uname` in sun=no rmidi=yes user=_sndio - so_link="libsndio.so" + so_link="libsndio.so libsndio.so.\${MAJ}" + so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}.\${MIN}" defs='-DHAVE_ARC4RANDOM -DHAVE_GETPEEREID -DHAVE_ISSETUGID \\\ -DHAVE_STRLCAT -DHAVE_STRLCPY \\\ -DHAVE_SOCK_CLOEXEC -DHAVE_CLOCK_GETTIME' @@ -110,16 +111,27 @@ case `uname` in -DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRTONUM \\\ -DHAVE_SOCK_CLOEXEC -DHAVE_CLOCK_GETTIME' ;; - DragonFly|FreeBSD) + DragonFly|FreeBSD|MidnightBSD) oss=yes umidi=yes user=_sndio so_ldflags="-Wl,-soname=libsndio.so.\${MAJ}.\${MIN}" - so_link="libsndio.so" + so_link="libsndio.so libsndio.so.\${MAJ}" defs='-DHAVE_ARC4RANDOM -DHAVE_GETPEEREID -DHAVE_ISSETUGID \\\ -DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRTONUM \\\ -DHAVE_SOCK_CLOEXEC -DHAVE_CLOCK_GETTIME' ;; + SunOS) + ldadd="-lrt -lsocket" + sun=no # doesn't compile + umidi=yes + user=_sndio + so_ldflags="-Wl,-soname,libsndio.so.\${MAJ}.\${MIN}" + so_link="libsndio.so libsndio.so.\${MAJ}" + defs='-DHAVE_ISSETUGID -DO_CLOEXEC=0 \\\ + -DHAVE_STRLCAT -DHAVE_STRLCPY \\\ + -DSOCK_CLOEXEC=0 -DHAVE_CLOCK_GETTIME' + ;; Darwin) rmidi=no so="libsndio.\${MAJ}.\${MIN}.dylib" [FILE:1039:patches/patch-libsndio_aucat.c] --- libsndio/aucat.c.orig 2022-07-16 09:38:24 UTC +++ libsndio/aucat.c @@ -43,6 +43,26 @@ #define DEV_RANDOM "/dev/urandom" #endif +#ifdef __sun__ +#include +static const char *getprogname (void) { + static const char *progname; + + if (progname == NULL) { + const char *e = getexecname(); + if (e != NULL) { + /* Have to make a copy since getexecname can return a readonly + string, but basename expects to be able to modify its arg. */ + char *n = strdup(e); + if (n != NULL) { + progname = basename(n); + } + } + } + return progname; +} +#endif + static int random_bytes(unsigned char *buf, int len) { @@ -472,7 +492,11 @@ parsestr(const char *str, char *rstr, un int _aucat_open(struct aucat *hdl, const char *str, unsigned int mode) { +#ifdef __sun__ + const char * __progname = getprogname(); +#else extern char *__progname; +#endif int eof; char host[NI_MAXHOST], opt[AMSG_OPTMAX]; const char *p; [FILE:261:patches/patch-sndiod_defs.h] --- sndiod/defs.h.orig 2022-07-16 09:38:24 UTC +++ sndiod/defs.h @@ -17,6 +17,12 @@ #ifndef DEFS_H #define DEFS_H +#ifdef __sun__ +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#define BYTE_ORDER LITTLE_ENDIAN +#endif + /* * MIDI buffer size */ [FILE:465:files/sndiod.in] #!/bin/sh # # $FreeBSD: head/audio/sndio/files/sndiod.in 427071 2016-11-25 01:11:41Z cpm $ # # PROVIDE: sndiod # REQUIRE: NETWORKING sysctl # BEFORE: DAEMON # KEYWORD: shutdown . /etc/rc.subr name=sndiod rcvar=sndiod_enable load_rc_config $name : ${sndiod_dev="rsnd/$($SYSCTL -n hw.snd.default_unit)"} : ${sndiod_enable="NO"} : ${sndiod_flags="-f ${sndiod_dev} -c 0:7 -j off -s default -m mon -s monitor"} command="%%PREFIX%%/bin/sndiod" run_rc_command "$1"