diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -1,21 +1,15 @@ PORTNAME= alsa-lib -PORTVERSION= 1.2.2 -PORTREVISION= 1 -DISTVERSIONPREFIX= v +PORTVERSION= 1.2.10 CATEGORIES= audio -MASTER_SITES= GH +MASTER_SITES= https://www.alsa-project.org/files/pub/lib/ -USE_GITHUB= yes -GH_ACCOUNT= alsa-project -GH_PROJECT= ${PORTNAME} - -MAINTAINER= ports@FreeBSD.org +MAINTAINER= rodrigo@FreeBSD.org COMMENT= ALSA compatibility library WWW= https://www.alsa-project.org/ LICENSE= LGPL21+ -USES= autoreconf cpe libtool:keepla tar:bzip2 +USES= cpe libtool:keepla tar:bzip2 CPE_VENDOR= alsa-project CPE_PRODUCT= alsa USE_LDCONFIG= yes diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo --- a/audio/alsa-lib/distinfo +++ b/audio/alsa-lib/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1634081449 -SHA256 (alsa-project-alsa-lib-v1.2.2_GH0.tar.gz) = ad4fa29e3927c5bec0f71b24b6a88523f4e386905341fc9047abef5744805023 -SIZE (alsa-project-alsa-lib-v1.2.2_GH0.tar.gz) = 780688 +TIMESTAMP = 1695515195 +SHA256 (alsa-lib-1.2.10.tar.bz2) = c86a45a846331b1b0aa6e6be100be2a7aef92efd405cf6bac7eef8174baa920e +SIZE (alsa-lib-1.2.10.tar.bz2) = 1107007 diff --git a/audio/alsa-lib/files/patch-src_async.c b/audio/alsa-lib/files/patch-src_async.c deleted file mode 100644 --- a/audio/alsa-lib/files/patch-src_async.c +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $ - ---- src/async.c.orig 2020-02-19 09:35:39 UTC -+++ src/async.c -@@ -54,6 +54,15 @@ static LIST_HEAD(snd_async_handlers); - - static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED) - { -+#if defined(__DragonFly__) || defined(__FreeBSD__) -+ /* XXX XXX XXX */ -+ struct list_head *i; -+ list_for_each(i, &snd_async_handlers) { -+ snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist); -+ if (h->callback) -+ h->callback(h); -+ } -+#else - int fd; - struct list_head *i; - //assert(siginfo->si_code == SI_SIGIO); -@@ -66,6 +75,7 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUS - if (h->fd == fd && h->callback) - h->callback(h); - } -+#endif - } - - /** diff --git a/audio/alsa-lib/files/patch-src_conf_alsa.conf b/audio/alsa-lib/files/patch-src_conf_alsa.conf --- a/audio/alsa-lib/files/patch-src_conf_alsa.conf +++ b/audio/alsa-lib/files/patch-src_conf_alsa.conf @@ -1,13 +1,15 @@ ---- src/conf/alsa.conf.orig 2020-02-19 09:35:39 UTC +--- src/conf/alsa.conf.orig 2022-01-01 09:52:43 UTC +++ src/conf/alsa.conf -@@ -8,8 +8,8 @@ +@@ -8,10 +8,8 @@ { func load files [ +- "/var/lib/alsa/conf.d" +- "/usr/etc/alsa/conf.d" - "/etc/alsa/conf.d" -- "/etc/asound.conf" +- "/etc/asound.conf|||/usr/etc/asound.conf" + "%%PREFIX%%/etc/alsa/conf.d" + "%%PREFIX%%/etc/asound.conf" "~/.asoundrc" - ] - errors false + { + @func concat diff --git a/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c b/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c deleted file mode 100644 --- a/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src/pcm/pcm_direct.c.orig 2016-03-31 13:10:39 UTC -+++ src/pcm/pcm_direct.c -@@ -44,12 +44,17 @@ - * - */ - -+#if !defined(__DragonFly__) && !defined(__OpenBSD__) \ -+ && !(defined(__FreeBSD__) && __FreeBSD__ < 12) - union semun { - int val; /* Value for SETVAL */ - struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ - unsigned short *array; /* Array for GETALL, SETALL */ -+#ifdef __linux__ - struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */ -+#endif - }; -+#endif - - /* - * FIXME: diff --git a/audio/alsa-lib/files/patch-test_midifile.c b/audio/alsa-lib/files/patch-test_midifile.c deleted file mode 100644 --- a/audio/alsa-lib/files/patch-test_midifile.c +++ /dev/null @@ -1,20 +0,0 @@ ---- test/midifile.c.orig 2016-03-31 13:10:39 UTC -+++ test/midifile.c -@@ -71,7 +71,7 @@ - #endif - - #include --#include -+#include - - #include - /*void exit(), free();*/ -@@ -328,7 +328,7 @@ readtrack () /* read a track chunk */ - - if (Mf_interactive) - { -- Mf_toberead = MAXINT; -+ Mf_toberead = INT_MAX; - } - else - { diff --git a/audio/alsa-lib/pkg-plist b/audio/alsa-lib/pkg-plist --- a/audio/alsa-lib/pkg-plist +++ b/audio/alsa-lib/pkg-plist @@ -4,6 +4,7 @@ include/alsa/conf.h include/alsa/control.h include/alsa/control_external.h +include/alsa/control_plugin.h include/alsa/error.h include/alsa/global.h include/alsa/hwdep.h @@ -42,6 +43,8 @@ include/alsa/sound/uapi/tlv.h include/alsa/timer.h include/alsa/topology.h +include/alsa/ump.h +include/alsa/ump_msg.h include/alsa/use-case.h include/alsa/version.h include/asoundlib.h @@ -119,6 +122,7 @@ share/alsa/cards/aliases.conf share/alsa/cards/pistachio-card.conf share/alsa/cards/vc4-hdmi.conf +share/alsa/ctl/default.conf share/alsa/pcm/center_lfe.conf share/alsa/pcm/default.conf share/alsa/pcm/dmix.conf diff --git a/audio/alsa-plugins/Makefile b/audio/alsa-plugins/Makefile --- a/audio/alsa-plugins/Makefile +++ b/audio/alsa-plugins/Makefile @@ -1,16 +1,10 @@ PORTNAME= alsa-plugins -PORTVERSION= 1.2.2 -DISTVERSIONPREFIX= v -PORTREVISION= 13 +PORTVERSION= 1.2.7.1 CATEGORIES= audio -MASTER_SITES= GH +MASTER_SITES= https://www.alsa-project.org/files/pub/plugins/ -PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ -PATCHFILES+= 8a3c0d795fbe.patch:-p1 # rate-lav: Convert to libswresample - -USE_GITHUB= yes -GH_ACCOUNT= alsa-project -GH_PROJECT= ${PORTNAME} +#PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +#PATCHFILES+= 8a3c0d795fbe.patch:-p1 # rate-lav: Convert to libswresample MAINTAINER= ports@FreeBSD.org COMMENT= ALSA compatibility library plugins @@ -20,7 +14,7 @@ LIB_DEPENDS= libasound.so:audio/alsa-lib -USES= alias autoreconf libtool:keepla localbase pkgconfig tar:bzip2 +USES= alias libtool:keepla localbase pkgconfig tar:bzip2 USE_LDCONFIG= ${PREFIX}/lib/alsa-lib GNU_CONFIGURE= yes MAKE_ARGS+= RM="${RM}" diff --git a/audio/alsa-plugins/distinfo b/audio/alsa-plugins/distinfo --- a/audio/alsa-plugins/distinfo +++ b/audio/alsa-plugins/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1634083456 -SHA256 (alsa-project-alsa-plugins-v1.2.2_GH0.tar.gz) = 1872622227c474db9db57bf5b6ec91bbef391f9750e9d64d00d05af29f579e1a -SIZE (alsa-project-alsa-plugins-v1.2.2_GH0.tar.gz) = 121998 -SHA256 (8a3c0d795fbe.patch) = 5772b954c166cf3c148872a405b21476039193b06fb2e834c4cc5a855325d8bf -SIZE (8a3c0d795fbe.patch) = 6946 +TIMESTAMP = 1695516677 +SHA256 (alsa-plugins-1.2.7.1.tar.bz2) = 8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511 +SIZE (alsa-plugins-1.2.7.1.tar.bz2) = 408801 diff --git a/audio/alsa-plugins/files/patch-configure b/audio/alsa-plugins/files/patch-configure new file mode 100644 --- /dev/null +++ b/audio/alsa-plugins/files/patch-configure @@ -0,0 +1,219 @@ +--- configure.orig 2022-03-17 16:36:30 UTC ++++ configure +@@ -743,6 +743,9 @@ + AM_DEFAULT_VERBOSITY + AM_DEFAULT_V + AM_V ++CSCOPE ++ETAGS ++CTAGS + am__untar + am__tar + AMTAR +@@ -785,7 +788,6 @@ + docdir + oldincludedir + includedir +-runstatedir + localstatedir + sharedstatedir + sysconfdir +@@ -909,7 +911,6 @@ + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' +-runstatedir='${localstatedir}/run' + includedir='${prefix}/include' + oldincludedir='/usr/include' + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +@@ -1162,15 +1163,6 @@ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + +- -runstatedir | --runstatedir | --runstatedi | --runstated \ +- | --runstate | --runstat | --runsta | --runst | --runs \ +- | --run | --ru | --r) +- ac_prev=runstatedir ;; +- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ +- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ +- | --run=* | --ru=* | --r=*) +- runstatedir=$ac_optarg ;; +- + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ +@@ -1308,7 +1300,7 @@ + for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ +- libdir localedir mandir runstatedir ++ libdir localedir mandir + do + eval ac_val=\$$ac_var + # Remove trailing slashes. +@@ -1461,7 +1453,6 @@ + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] +- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] +@@ -2578,12 +2569,7 @@ + am_aux_dir=`cd "$ac_aux_dir" && pwd` + + if test x"${MISSING+set}" != xset; then +- case $am_aux_dir in +- *\ * | *\ *) +- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; +- *) +- MISSING="\${SHELL} $am_aux_dir/missing" ;; +- esac ++ MISSING="\${SHELL} '$am_aux_dir/missing'" + fi + # Use eval to expand $SHELL + if eval "$MISSING --is-lightweight"; then +@@ -2938,7 +2924,21 @@ + + + ++# Variables for tags utilities; see am/tags.am ++if test -z "$CTAGS"; then ++ CTAGS=ctags ++fi + ++if test -z "$ETAGS"; then ++ ETAGS=etags ++fi ++ ++if test -z "$CSCOPE"; then ++ CSCOPE=cscope ++fi ++ ++ ++ + # POSIX will say in a future version that running "rm -f" with no argument + # is OK; and we want to be able to make that assumption in our Makefile + # recipes. So use an aggressive probe to check that the usage we want is +@@ -9015,7 +9015,7 @@ + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no +- link_all_deplibs=unknown ++ link_all_deplibs=no + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= +@@ -9314,7 +9314,7 @@ + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib' + fi + ;; + +@@ -9333,7 +9333,7 @@ + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib' + else + ld_shlibs=no + fi +@@ -9362,7 +9362,7 @@ + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib' + else + ld_shlibs=no + fi +@@ -9380,7 +9380,7 @@ + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib' + else + ld_shlibs=no + fi +@@ -10028,7 +10028,7 @@ + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' +- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' ++ archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-version-script,$lib-ver' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else +@@ -10877,7 +10877,7 @@ + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) +- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no +@@ -11094,9 +11094,6 @@ + # before this can be enabled. + hardcode_into_libs=yes + +- # Add ABI-specific directories to the system library path. +- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" +- + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command +@@ -11105,7 +11102,7 @@ + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" ++ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -12012,7 +12009,7 @@ + old_striplib= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 + $as_echo_n "checking whether stripping libraries is possible... " >&6; } +-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then ++if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +@@ -13293,21 +13290,22 @@ + HAVE_SPEEXDSP="yes" + fi + fi +- if test "$HAVE_SPEEXDSP" = "yes"; then +- HAVE_SPEEXDSP_TRUE= +- HAVE_SPEEXDSP_FALSE='#' +-else +- HAVE_SPEEXDSP_TRUE='#' +- HAVE_SPEEXDSP_FALSE= +-fi + + +- + # Check whether --with-speex was given. + if test "${with_speex+set}" = set; then : + withval=$with_speex; PPH=$withval + else + PPH="lib" ++fi ++ ++ ++ if test "$HAVE_SPEEXDSP" = "yes"; then ++ HAVE_SPEEXDSP_TRUE= ++ HAVE_SPEEXDSP_FALSE='#' ++else ++ HAVE_SPEEXDSP_TRUE='#' ++ HAVE_SPEEXDSP_FALSE= + fi + + diff --git a/audio/alsa-plugins/files/patch-configure.ac b/audio/alsa-plugins/files/patch-configure.ac --- a/audio/alsa-plugins/files/patch-configure.ac +++ b/audio/alsa-plugins/files/patch-configure.ac @@ -1,17 +0,0 @@ ---- configure.ac.orig 2020-02-19 09:35:42 UTC -+++ configure.ac -@@ -145,12 +145,13 @@ AC_ARG_ENABLE([speexdsp], - if test "x$enable_speexdsp" != "xno"; then - PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""]) - fi --AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes") - - AC_ARG_WITH([speex], - AS_HELP_STRING([--with-speex={builtin|lib|no}], - [build speex resampler (built-in code, link with external lib, or no build)]), - [PPH=$withval], [PPH="lib"]) -+ -+AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes") - - USE_LIBSPEEX="" - if test "$PPH" = "lib"; then diff --git a/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c b/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c --- a/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c +++ b/audio/alsa-plugins/files/patch-usb__stream_pcm__usb__stream.c @@ -1,8 +1,7 @@ based on https://github.com/dankamongmen/libdank/blob/master/libdank/compat-FreeBSD.c - ---- usb_stream/pcm_usb_stream.c.orig 2016-03-31 13:11:29 UTC -+++ usb_stream/pcm_usb_stream.c -@@ -79,6 +79,69 @@ typedef struct { +--- ./usb_stream/pcm_usb_stream.c.orig 2022-03-17 16:51:58 UTC ++++ ./usb_stream/pcm_usb_stream.c +@@ -78,6 +78,69 @@ static struct user_usb_stream *uus; static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -18,9 +17,9 @@ + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. -+ * * Neither the name of Nick Black nor the names of other contributors may -+ * be used to endorse or promote products derived from this software -+ * without specific prior written permission. ++ * * Neither the name of Nick Black nor the names of other contributors may ++ * be used to endorse or promote products derived from this software ++ * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND @@ -41,38 +40,38 @@ +// mremap(2)), resulting in undefined behavior, despite realloc(3) semantics. +// Similarly, oldlen and newlen must be non-zero (and page-aligned). +void *mremap_compat(int fd,void *oldaddr,size_t oldlen, -+ size_t newlen,int prot,int flags){ -+ void *ret; ++ size_t newlen,int prot,int flags){ ++ void *ret; + -+ // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any -+ // previous mapping in the allocated address range. This means: -+ // remapping over a current map will blow it away (unless FIXED isn't -+ // provided, in which case it can't overlap an old mapping. See bug -+ // 733 for extensive discussion of this issue for Linux and FreeBSD). -+ if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){ -+ // We couldn't get the memory whatsoever (or we were a fresh -+ // allocation that succeeded). Return the immediate result... -+ return ret; -+ } // ret != MAP_FAILED. Did we squash? -+ if(ret != (char *)oldaddr + oldlen){ -+ // We got the memory, but not where we wanted it. Copy over the -+ // old map, and then free it up... -+ munmap(ret,newlen - oldlen); -+ if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){ -+ return ret; -+ } -+ memcpy(ret,oldaddr,oldlen); -+ munmap(oldaddr,oldlen); // Free the old mapping -+ return ret; -+ } // We successfully squashed. Return a pointer to the first buf. -+ return oldaddr; ++ // From mmap(2) on freebsd 6.3: A successful FIXED mmap deletes any ++ // previous mapping in the allocated address range. This means: ++ // remapping over a current map will blow it away (unless FIXED isn't ++ // provided, in which case it can't overlap an old mapping. See bug ++ // 733 for extensive discussion of this issue for Linux and FreeBSD). ++ if((ret = mmap((char *)oldaddr + oldlen,newlen - oldlen,prot,flags,fd,oldlen)) == MAP_FAILED){ ++ // We couldn't get the memory whatsoever (or we were a fresh ++ // allocation that succeeded). Return the immediate result... ++ return ret; ++ } // ret != MAP_FAILED. Did we squash? ++ if(ret != (char *)oldaddr + oldlen){ ++ // We got the memory, but not where we wanted it. Copy over the ++ // old map, and then free it up... ++ munmap(ret,newlen - oldlen); ++ if((ret = mmap(NULL,newlen,prot,flags,fd,0)) == MAP_FAILED){ ++ return ret; ++ } ++ memcpy(ret,oldaddr,oldlen); ++ munmap(oldaddr,oldlen); // Free the old mapping ++ return ret; ++ } // We successfully squashed. Return a pointer to the first buf. ++ return oldaddr; +} +#endif + - static struct user_usb_stream *get_uus(const char *card) + static struct user_usb_stream *get_uus(int card) { pthread_mutex_lock(&uus_mutex); -@@ -219,7 +282,11 @@ static int snd_pcm_us_prepare(snd_pcm_io +@@ -218,7 +281,11 @@ } diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile --- a/audio/alsa-utils/Makefile +++ b/audio/alsa-utils/Makefile @@ -1,11 +1,9 @@ PORTNAME= alsa-utils -PORTVERSION= 1.2.2 -DISTVERSIONPREFIX= v -PORTREVISION= 3 +PORTVERSION= 1.2.10 CATEGORIES= audio -MASTER_SITES= GH +MASTER_SITES= https://www.alsa-project.org/files/pub/utils/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= rodrigo@FreeBSD.org COMMENT= ALSA compatibility utilities WWW= https://www.alsa-project.org/ @@ -17,11 +15,8 @@ libinotify.so:devel/libinotify RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins -USES= autoreconf gettext-tools gmake libtool localbase ncurses shebangfix \ - tar:bzip2 pkgconfig -USE_GITHUB= yes -GH_ACCOUNT= alsa-project -GH_PROJECT= ${PORTNAME} +USES= gettext-tools gmake libtool localbase ncurses pkgconfig \ + shebangfix tar:bzip2 SHEBANG_FILES= alsa-info/alsa-info.sh alsaconf/alsaconf.in bat/alsabat-test.sh GNU_CONFIGURE= yes @@ -53,12 +48,12 @@ SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate SAMPLERATE_CONFIGURE_ENV_OFF= ac_cv_header_samplerate_h=no +#${WRKSRC}/speaker-test/samples/sample_map.csv post-patch: @${REINPLACE_CMD} \ 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/alsactl/alsactl_init.xml \ ${WRKSRC}/speaker-test/speaker-test.1 \ - ${WRKSRC}/speaker-test/samples/sample_map.csv \ ${WRKSRC}/alsaconf/alsaconf.fr.8 \ ${WRKSRC}/alsaconf/alsaconf.8 \ ${WRKSRC}/utils/alsa-utils.spec.in \ diff --git a/audio/alsa-utils/distinfo b/audio/alsa-utils/distinfo --- a/audio/alsa-utils/distinfo +++ b/audio/alsa-utils/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1634081670 -SHA256 (alsa-project-alsa-utils-v1.2.2_GH0.tar.gz) = 9da1ce4f12a4dd56d55cd5a8f6ae7d56ac91397c3d37fdfcd737adeeb34fce1c -SIZE (alsa-project-alsa-utils-v1.2.2_GH0.tar.gz) = 1252639 +TIMESTAMP = 1695515854 +SHA256 (alsa-utils-1.2.10.tar.bz2) = 104b62ec7f02a7ce16ca779f4815616df1cc21933503783a9107b5944f83063a +SIZE (alsa-utils-1.2.10.tar.bz2) = 1625707 diff --git a/audio/alsa-utils/files/patch-aplay_formats.h b/audio/alsa-utils/files/patch-aplay_formats.h deleted file mode 100644 --- a/audio/alsa-utils/files/patch-aplay_formats.h +++ /dev/null @@ -1,10 +0,0 @@ ---- aplay/formats.h.orig 2016-03-31 14:37:02 UTC -+++ aplay/formats.h -@@ -1,7 +1,6 @@ - #ifndef FORMATS_H - #define FORMATS_H 1 - --#include - #include - - /* Definitions for .VOC files */ diff --git a/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv b/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv deleted file mode 100644 --- a/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv +++ /dev/null @@ -1,7 +0,0 @@ ---- speaker-test/samples/sample_map.csv.orig 2020-02-19 12:02:10 UTC -+++ speaker-test/samples/sample_map.csv -@@ -1,2 +1,2 @@ --0, "Front Left", "/usr/share/alsa/samples/Front_Left.wav" --1, "Front Right", "/usr/share/alsa/samples/Front_Right.wav" -+0, "Front Left", "%%PREFIX%%/share/alsa/samples/Front_Left.wav" -+1, "Front Right", "%%PREFIX%%/share/alsa/samples/Front_Right.wav" diff --git a/audio/alsa-utils/pkg-plist b/audio/alsa-utils/pkg-plist --- a/audio/alsa-utils/pkg-plist +++ b/audio/alsa-utils/pkg-plist @@ -14,8 +14,9 @@ bin/aseqnet bin/axfer bin/iecset +bin/nhlt-dmic-info bin/speaker-test -lib/udev/89-alsa-ucm.rules +lib/alsa-topology/libalsatplg_module_nhlt.so lib/udev/90-alsa-restore.rules %%MANPAGES%%man/fr/man8/alsaconf.8.gz %%MANPAGES%%man/man1/aconnect.1.gz @@ -38,6 +39,7 @@ %%MANPAGES%%man/man1/axfer-transfer.1.gz %%MANPAGES%%man/man1/axfer.1.gz %%MANPAGES%%man/man1/iecset.1.gz +%%MANPAGES%%man/man1/nhlt-dmic-info.1.gz %%MANPAGES%%man/man1/speaker-test.1.gz %%MANPAGES%%man/man7/alsactl_init.7.gz %%MANPAGES%%man/man8/alsaconf.8.gz @@ -52,12 +54,16 @@ share/alsa/init/help share/alsa/init/info share/alsa/init/test -share/alsa/speaker-test/sample_map.csv %%NLS%%share/locale/de/LC_MESSAGES/alsa-utils.mo +%%NLS%%share/locale/eu/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/fr/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/ja/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/ja/LC_MESSAGES/alsaconf.mo +%%NLS%%share/locale/ka/LC_MESSAGES/alsa-utils.mo +%%NLS%%share/locale/ka/LC_MESSAGES/alsaconf.mo +%%NLS%%share/locale/ko/LC_MESSAGES/alsa-utils.mo %%NLS%%share/locale/ru/LC_MESSAGES/alsaconf.mo +%%NLS%%share/locale/sk/LC_MESSAGES/alsa-utils.mo share/sounds/alsa/Front_Center.wav share/sounds/alsa/Front_Left.wav share/sounds/alsa/Front_Right.wav