pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/sox_ng



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu Jul  3 15:46:59 UTC 2025

Added Files:
        pkgsrc/audio/sox_ng: DESCR Makefile PLIST buildlink3.mk distinfo
            options.mk
        pkgsrc/audio/sox_ng/patches: patch-src_oss.c patch-src_sox__ng.c
            patch-src_sunaudio.c

Log Message:
audio/sox_ng: import sox_ng-14.6.0.2

Note: This could be a replacement for the unmaintained audio/sox
package.

sox translates sound samples between different file formats,
and performs various sound effects.

This release understands "raw" files in various binary formats,
raw textual data,
Sound Blaster .VOC files, IRCAM SoundFile files, SUN Sparcstation
.au files, mutant DEC .au files, Apple/SGI AIFF files,
CD-R (music CD format), Macintosh HCOM files, Sounder files,
NeXT .snd files, SUN ADPCM (compressed) .au files,
and Soundtool (DOS) files.

The sound effects include changing the sample rate, adding echo
delay lines, applying low-, high, and band-pass filtering,
reversing a sample in order to search for backmasked messages,
and the infamous Fender Vibro effect.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/sox_ng/DESCR pkgsrc/audio/sox_ng/Makefile \
    pkgsrc/audio/sox_ng/PLIST pkgsrc/audio/sox_ng/buildlink3.mk \
    pkgsrc/audio/sox_ng/distinfo pkgsrc/audio/sox_ng/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/sox_ng/patches/patch-src_oss.c \
    pkgsrc/audio/sox_ng/patches/patch-src_sox__ng.c \
    pkgsrc/audio/sox_ng/patches/patch-src_sunaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/audio/sox_ng/DESCR
diff -u /dev/null pkgsrc/audio/sox_ng/DESCR:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/DESCR   Thu Jul  3 15:46:59 2025
@@ -0,0 +1,15 @@
+sox translates sound samples between different file formats,
+and performs various sound effects.
+
+This release understands "raw" files in various binary formats,
+raw textual data,
+Sound Blaster .VOC files, IRCAM SoundFile files, SUN Sparcstation
+.au files, mutant DEC .au files, Apple/SGI AIFF files,
+CD-R (music CD format), Macintosh HCOM files, Sounder files,
+NeXT .snd files, SUN ADPCM (compressed) .au files,
+and Soundtool (DOS) files.
+
+The sound effects include changing the sample rate, adding echo
+delay lines, applying low-, high, and band-pass filtering,
+reversing a sample in order to search for backmasked messages,
+and the infamous Fender Vibro effect.
Index: pkgsrc/audio/sox_ng/Makefile
diff -u /dev/null pkgsrc/audio/sox_ng/Makefile:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/Makefile        Thu Jul  3 15:46:59 2025
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+DISTNAME=      sox_ng-14.6.0.2
+CATEGORIES=    audio
+MASTER_SITES=  https://codeberg.org/sox_ng/sox_ng/releases/download/${DISTNAME}/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://codeberg.org/sox_ng/sox_ng
+COMMENT=       SOund eXchange - universal sound sample translator
+LICENSE=       gnu-lgpl-v2.1 AND gnu-gpl-v2
+
+USE_LANGUAGES=         c c++
+USE_TOOLS+=            pkg-config
+GNU_CONFIGURE=         yes
+USE_LIBTOOL=           yes
+
+PKGCONFIG_OVERRIDE+=   sox_ng.pc.in
+
+SUBST_CLASSES+=                gsm
+SUBST_FILES.gsm=       configure src/gsm.c src/wav.c CMakeLists.txt
+SUBST_SED.gsm=         -e "s!gsm/gsm.h!gsm.h!"
+SUBST_STAGE.gsm=       pre-configure
+
+.include "options.mk"
+
+.include "../../audio/flac/buildlink3.mk"
+.include "../../audio/gsm/buildlink3.mk"
+.include "../../audio/lame/buildlink3.mk"
+.include "../../audio/libmad/buildlink3.mk"
+.include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../audio/libsndfile/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../sysutils/file/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/audio/sox_ng/PLIST
diff -u /dev/null pkgsrc/audio/sox_ng/PLIST:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/PLIST   Thu Jul  3 15:46:59 2025
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1 2025/07/03 15:46:59 wiz Exp $
+bin/play_ng
+bin/rec_ng
+bin/sox_ng
+bin/soxi_ng
+include/sox_ng.h
+lib/libsox_ng.la
+lib/pkgconfig/sox_ng.pc
+man/man1/play_ng.1
+man/man1/rec_ng.1
+man/man1/sox_ng.1
+man/man1/soxi_ng.1
+man/man3/libsox_ng.3
+man/man7/soxeffect_ng.7
+man/man7/soxformat_ng.7
Index: pkgsrc/audio/sox_ng/buildlink3.mk
diff -u /dev/null pkgsrc/audio/sox_ng/buildlink3.mk:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/buildlink3.mk   Thu Jul  3 15:46:59 2025
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+BUILDLINK_TREE+=       sox_ng
+
+.if !defined(SOX_NG_BUILDLINK3_MK)
+SOX_NG_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.sox_ng+= sox_ng>=14.6.0.1
+BUILDLINK_PKGSRCDIR.sox_ng?=   ../../audio/sox_ng
+
+.endif # SOX_NG_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -sox_ng
Index: pkgsrc/audio/sox_ng/distinfo
diff -u /dev/null pkgsrc/audio/sox_ng/distinfo:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/distinfo        Thu Jul  3 15:46:59 2025
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+BLAKE2s (sox_ng-14.6.0.2.tar.gz) = da368431a0b584483d2a8393b40db83796757e177b54209cb690a18f5731f1e1
+SHA512 (sox_ng-14.6.0.2.tar.gz) = 9468cd15b83b2500210d54355ed5d7ae2a97171148b8a54c47007d1a7d9c57e378211c0429ee4d8065f0ba5ab97b31c9abb8795b659585c523942c044fe49b1d
+Size (sox_ng-14.6.0.2.tar.gz) = 1746640 bytes
+SHA1 (patch-src_oss.c) = f4665b500a5e6a996768e415145e751d9ff9886c
+SHA1 (patch-src_sox__ng.c) = 1dc7ddacbb1a7de683b3af981cc0d08e31888bae
+SHA1 (patch-src_sunaudio.c) = dd624099df32f67948becd647eded4d69c7c1c34
Index: pkgsrc/audio/sox_ng/options.mk
diff -u /dev/null pkgsrc/audio/sox_ng/options.mk:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/options.mk      Thu Jul  3 15:46:59 2025
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.sox_ng
+PKG_SUPPORTED_OPTIONS= oss
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Moss)
+LDFLAGS+=              -lossaudio
+.include "../../mk/oss.buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --without-oss
+.endif

Index: pkgsrc/audio/sox_ng/patches/patch-src_oss.c
diff -u /dev/null pkgsrc/audio/sox_ng/patches/patch-src_oss.c:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/patches/patch-src_oss.c Thu Jul  3 15:46:59 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_oss.c,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+Fix segfault when playing (PR pkg/49929).
+
+--- src/oss.c.orig     2025-05-26 15:24:07.000000000 +0000
++++ src/oss.c
+@@ -367,7 +367,7 @@ static size_t osswrite(
+         size_t cbStride;
+         int cbWritten;
+ 
+-        cStride = cInput;
++        cStride = cInputRemaining;
+         if (cStride > pPriv->cOutput) {
+             cStride = pPriv->cOutput;
+         }
Index: pkgsrc/audio/sox_ng/patches/patch-src_sox__ng.c
diff -u /dev/null pkgsrc/audio/sox_ng/patches/patch-src_sox__ng.c:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/patches/patch-src_sox__ng.c     Thu Jul  3 15:46:59 2025
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_sox__ng.c,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+PR pkg/56800 hitting v or V during sox's play command causes a
+segfault
+
+https://sourceforge.net/p/sox/code/ci/4b17639fb7591153dbd3e234eea21b1a2a29fcfa/
+from more than 10 years ago changed the sun audio driver for the 14.4 release
+to not use stdio (among others) while adjust_volume() in sox.c still used
+fileno under the assumption that stdio was being used in the audio driver.
+
+output_muted is not defined on NetBSD.
+
+--- src/sox_ng.c.orig  2025-06-10 06:22:30.000000000 +0000
++++ src/sox_ng.c
+@@ -1325,7 +1325,8 @@ static void adjust_volume(int delta)
+ #elif defined(HAVE_AUDIOIO_H)
+ static void adjust_volume(int delta)
+ {
+-  int vol1 = 0, vol2 = 0, fd = fileno((FILE*)ofile->ft->fp);
++  int vol1 = 0, vol2 = 0, fd;
++  fd = ofile->ft->fp != NULL ? *((int *)ofile->ft->fp) : -1;
+   fprintf(stderr, "Audioio volume\n");
+   if (lsx_adjust_softvol(delta) == SOX_SUCCESS) return;
+   if (fd >= 0) {
+@@ -1335,7 +1336,9 @@ static void adjust_volume(int delta)
+       vol2 = range_limit(vol1 + delta, 0, 100);
+       AUDIO_INITINFO(&audio_info);
+       audio_info.play.gain = (vol2 * AUDIO_MAX_GAIN + 50) / 100;
++#if defined(__sun)
+       audio_info.output_muted = 0;
++#endif
+       lsx_debug("%04x %04x", vol1, vol2);
+       if (vol1 != vol2 && ioctl(fd, AUDIO_SETINFO, &audio_info) < 0)
+         vol2 = vol1;
Index: pkgsrc/audio/sox_ng/patches/patch-src_sunaudio.c
diff -u /dev/null pkgsrc/audio/sox_ng/patches/patch-src_sunaudio.c:1.1
--- /dev/null   Thu Jul  3 15:46:59 2025
+++ pkgsrc/audio/sox_ng/patches/patch-src_sunaudio.c    Thu Jul  3 15:46:59 2025
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_sunaudio.c,v 1.1 2025/07/03 15:46:59 wiz Exp $
+
+- Make the now unused (in the audio driver's case) void *fp member of the
+  sox_format_t structure a pointer to the filedescriptor of the audio
+  device in the driver and reference it in adjust_volume() with an
+  additional check for NULL. (PR pkg/56800)
+
+- Fix segfault when playing (PR pkg/49929).
+
+--- src/sunaudio.c.orig        2025-05-26 15:24:07.000000000 +0000
++++ src/sunaudio.c
+@@ -334,6 +334,8 @@ static int sunstartwrite(sox_format_t * 
+     pPriv->cOutput = sox_globals.bufsiz >> pPriv->sample_shift;
+     pPriv->pOutput = lsx_malloc((size_t)pPriv->cOutput << pPriv->sample_shift);
+ 
++    ft->fp = &pPriv->device;
++
+     return (SOX_SUCCESS);
+ }
+ 
+@@ -346,6 +348,7 @@ static int sunstop(sox_format_t* ft)
+     if (pPriv->pOutput) {
+         free(pPriv->pOutput);
+     }
++    ft->fp = NULL;
+     return SOX_SUCCESS;
+ }
+ 
+@@ -441,7 +444,7 @@ static size_t sunwrite(
+         size_t cbStride;
+         int cbWritten;
+ 
+-        cStride = cInput;
++        cStride = cInputRemaining;
+         if (cStride > pPriv->cOutput) {
+             cStride = pPriv->cOutput;
+         }



Home | Main Index | Thread Index | Old Index