pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/portaudio portaudio: Add a Sun/NetBSD audio back...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/17d12c520e67
branches:  trunk
changeset: 427519:17d12c520e67
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Apr 17 15:50:03 2020 +0000

description:
portaudio: Add a Sun/NetBSD audio backend. This works with Audacity.

While here, generally clean up the package...

Bump PKGREVISION

diffstat:

 audio/portaudio/Makefile                                         |    41 +-
 audio/portaudio/buildlink3.mk                                    |     6 +-
 audio/portaudio/distinfo                                         |    14 +-
 audio/portaudio/patches/patch-Makefile.in                        |    26 +
 audio/portaudio/patches/patch-bindings_cpp_Makefile.am           |    13 +
 audio/portaudio/patches/patch-configure                          |    14 -
 audio/portaudio/patches/patch-configure.in                       |    69 +
 audio/portaudio/patches/patch-include_pa__unix__oss.h            |    58 +-
 audio/portaudio/patches/patch-include_portaudio.h                |     5 +-
 audio/portaudio/patches/patch-src_hostapi_alsa_pa__linux__alsa.c |     7 +-
 audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c    |  1144 ++++++++++
 audio/portaudio/patches/patch-src_os_unix_pa__unix__hostapis.c   |    25 +
 12 files changed, 1312 insertions(+), 110 deletions(-)

diffs (truncated from 1542 to 300 lines):

diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/Makefile
--- a/audio/portaudio/Makefile  Fri Apr 17 15:31:43 2020 +0000
+++ b/audio/portaudio/Makefile  Fri Apr 17 15:50:03 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.29 2020/04/15 17:12:14 nia Exp $
+# $NetBSD: Makefile,v 1.30 2020/04/17 15:50:03 nia Exp $
 
 DISTNAME=      pa_stable_v190600_20161030
 PKGNAME=       ${DISTNAME:S/^pa_stable_v/portaudio-/1:S/_/./g}
-PKGREVISION=   3
+PKGREVISION=   5
 CATEGORIES=    audio
 MASTER_SITES=  http://www.portaudio.com/archives/
 EXTRACT_SUFX=  .tgz
@@ -15,7 +15,9 @@
 CONFLICTS+=    portaudio-devel-[0-9]*
 SUPERSEDES+=   portaudio-devel-[0-9]*
 
+WRKSRC=                ${WRKDIR}/portaudio
 USE_LANGUAGES= c c++
+USE_TOOLS+=    autoconf autoreconf automake
 USE_TOOLS+=    gmake pkg-config
 USE_LIBTOOL=   yes
 GNU_CONFIGURE= yes
@@ -23,41 +25,26 @@
 # No rule to make target '../../../lib/libportaudio.la', needed by 'libportaudiocpp.la'.  Stop.
 MAKE_JOBS_SAFE=        no
 
-GNU_CONFIGURE_LIBSUBDIR=       portaudio2
+.include "../../mk/oss.buildlink3.mk"
 
-NOT_FOR_PLATFORM=      Interix-*-*
+PLIST_VARS+=   oss
+.if ${OSS_TYPE} != "none"
+PLIST.oss=     yes
+.endif
+
+GNU_CONFIGURE_LIBSUBDIR=       portaudio2
 
 CONFIGURE_ARGS+=       --enable-cxx
 CONFIGURE_ARGS+=       --includedir=${PREFIX}/include/portaudio2
 CONFIGURE_ARGS+=       --disable-mac-universal
 
-.include "../../mk/oss.buildlink3.mk"
-PLIST_VARS+=           oss
-.if ${OSS_TYPE} != "none"
-PLIST.oss=             yes
-LDFLAGS+=              ${LIBOSSAUDIO}
-.endif
-
 PKGCONFIG_OVERRIDE=    portaudio-2.0.pc.in
-WRKSRC=                        ${WRKDIR}/portaudio
-
-INSTALLATION_DIRS=     include/portaudio2 lib/portaudio2 lib/pkgconfig
-
-SUBST_CLASSES+=                pthread
-SUBST_STAGE.pthread=   pre-configure
-SUBST_MESSAGE.pthread= Fixing -lpthread references.
-SUBST_FILES.pthread=   configure
-SUBST_SED.pthread=     -e 's/-D_REENTRANT/${PTHREAD_CFLAGS}/g'
-SUBST_SED.pthread+=    -e 's/-lpthread/${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}/g'
-
-SUBST_CLASSES+=                pc
-SUBST_STAGE.pc=                pre-configure
-SUBST_MESSAGE.pc=      Fixing pkgconfig directory
-SUBST_FILES.pc=                Makefile.in bindings/cpp/Makefile.in
-SUBST_SED.pc=          -e 's/$$(libdir)\/pkgconfig/$$(prefix)\/lib\/pkgconfig/g'
 
 CFLAGS.Darwin+=                -Wno-deprecated-declarations
 
+pre-configure:
+       cd ${WRKSRC} && autoreconf -i
+
 .include "options.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/buildlink3.mk
--- a/audio/portaudio/buildlink3.mk     Fri Apr 17 15:31:43 2020 +0000
+++ b/audio/portaudio/buildlink3.mk     Fri Apr 17 15:50:03 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.14 2019/12/22 04:14:33 nia Exp $
+# $NetBSD: buildlink3.mk,v 1.15 2020/04/17 15:50:03 nia Exp $
 
 BUILDLINK_TREE+=       portaudio
 
@@ -15,11 +15,11 @@
 
 .include "../../mk/pkg-build-options.mk"
 
-.if !empty(PKG_BUILD_OPTIONS.portaudio:Malsa)
+.if ${PKG_BUILD_OPTIONS.portaudio:Malsa}
 .  include "../../audio/alsa-lib/buildlink3.mk"
 .endif
 
-.if !empty(PKG_BUILD_OPTIONS.portaudio:Mjack)
+.if ${PKG_BUILD_OPTIONS.portaudio:Mjack}
 .  include "../../audio/jack/buildlink3.mk"
 .endif
 .endif # PORTAUDIO_BUILDLINK3_MK
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/distinfo
--- a/audio/portaudio/distinfo  Fri Apr 17 15:31:43 2020 +0000
+++ b/audio/portaudio/distinfo  Fri Apr 17 15:50:03 2020 +0000
@@ -1,14 +1,18 @@
-$NetBSD: distinfo,v 1.21 2020/04/15 17:12:14 nia Exp $
+$NetBSD: distinfo,v 1.22 2020/04/17 15:50:03 nia Exp $
 
 SHA1 (pa_stable_v190600_20161030.tgz) = 56c596bba820d90df7d057d8f6a0ec6bf9ab82e8
 RMD160 (pa_stable_v190600_20161030.tgz) = e6e5cd3f3cb7469aa17549c189e445d573567e13
 SHA512 (pa_stable_v190600_20161030.tgz) = 7ec692cbd8c23878b029fad9d9fd63a021f57e60c4921f602995a2fca070c29f17a280c7f2da5966c4aad29d28434538452f4c822eacf3a60af59a6dc8e9704c
 Size (pa_stable_v190600_20161030.tgz) = 1450572 bytes
-SHA1 (patch-configure) = 6db6442804f44ddadddd91252d1c7c66dc812d6a
-SHA1 (patch-include_pa__unix__oss.h) = 55213cf8dfa4f81b8be23c912deddd8cc8b8117f
-SHA1 (patch-include_portaudio.h) = fc5ea598b2e6fc80a0e106a400ffab521ea3cf4e
+SHA1 (patch-Makefile.in) = 28f587f171b4a504e3982e6f8fcf3f148e5aa5c9
+SHA1 (patch-bindings_cpp_Makefile.am) = bcd45cba537c867ed9b2e20e1468e9f16ed0b3f7
+SHA1 (patch-configure.in) = 4241ddc620e50364aa86fe583a6d8709fdf833ee
+SHA1 (patch-include_pa__unix__oss.h) = 8e4ede09d5bf730bf8c2e8ca4aca6f700f58f2f7
+SHA1 (patch-include_portaudio.h) = 9a2e4aeb126056aded5cc49c40cde40e16738757
 SHA1 (patch-src_common_pa__front.c) = cdddb6f537f803b55873ad6bfa936a6bff47556d
 SHA1 (patch-src_common_pa__stream.c) = 58e6ab2a61957208973a59be2f1140abc922f360
 SHA1 (patch-src_common_pa__stream.h) = 94781a9ae79ea1340eea8caadc106416c019cf74
-SHA1 (patch-src_hostapi_alsa_pa__linux__alsa.c) = 6ddbeca36be30153f9c6c316c2fb78c06bbbf05d
+SHA1 (patch-src_hostapi_alsa_pa__linux__alsa.c) = 71daf913422f72aa379ae8cc302186800cff7717
 SHA1 (patch-src_hostapi_oss_pa__unix__oss.c) = 572c48f64104e22e7ae49acc54a26e549e381b5b
+SHA1 (patch-src_hostapi_sun_pa__unix__sun.c) = ce11c0720285ca850865555fdb21dc0ad803b86b
+SHA1 (patch-src_os_unix_pa__unix__hostapis.c) = 8cfc7d7aac8f9803e204711ded3d64842913f4fd
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/patches/patch-Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-Makefile.in Fri Apr 17 15:50:03 2020 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-Makefile.in,v 1.1 2020/04/17 15:50:03 nia Exp $
+
+- Sun/NetBSD audio support.
+- Correct path for pkgconfig files.
+
+--- Makefile.in.orig   2016-10-30 01:23:04.000000000 +0000
++++ Makefile.in
+@@ -146,6 +146,7 @@ SRC_DIRS = \
+       src/hostapi/dsound \
+       src/hostapi/jack \
+       src/hostapi/oss \
++      src/hostapi/sun \
+       src/hostapi/wasapi \
+       src/hostapi/wdmks \
+       src/hostapi/wmme \
+@@ -193,8 +194,8 @@ install: lib/$(PALIB) portaudio-2.0.pc
+       for include in $(INCLUDES); do \
+               $(INSTALL_DATA) -m 644 $(top_srcdir)/include/$$include $(DESTDIR)$(includedir)/$$include; \
+       done
+-      $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
+-      $(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(libdir)/pkgconfig/portaudio-2.0.pc
++      $(INSTALL) -d $(DESTDIR)$(prefix)/lib/pkgconfig
++      $(INSTALL) -m 644 portaudio-2.0.pc $(DESTDIR)$(prefix)/lib/pkgconfig/portaudio-2.0.pc
+       @echo ""
+       @echo "------------------------------------------------------------"
+       @echo "PortAudio was successfully installed."
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/patches/patch-bindings_cpp_Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-bindings_cpp_Makefile.am    Fri Apr 17 15:50:03 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-bindings_cpp_Makefile.am,v 1.1 2020/04/17 15:50:03 nia Exp $
+
+Correct path for pkgconfig files.
+
+--- bindings/cpp/Makefile.am.orig      2016-10-30 01:23:04.000000000 +0000
++++ bindings/cpp/Makefile.am
+@@ -3,5 +3,5 @@ SUBDIRS = lib include bin 
+ 
+ EXTRA_DIST = portaudiocpp.pc
+ 
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(prefix)/lib/pkgconfig
+ pkgconfig_DATA = portaudiocpp.pc
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/patches/patch-configure
--- a/audio/portaudio/patches/patch-configure   Fri Apr 17 15:31:43 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2019/10/28 15:32:24 nia Exp $
-
-Add features needed to make portmixer work in audacity.
-
---- configure.orig     2019-10-26 15:04:10.445128377 +0000
-+++ configure
-@@ -16200,6 +16200,7 @@ fi
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            $as_echo "#define PA_USE_OSS 1" >>confdefs.h
- 
-         fi
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/patches/patch-configure.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/portaudio/patches/patch-configure.in        Fri Apr 17 15:50:03 2020 +0000
@@ -0,0 +1,69 @@
+$NetBSD: patch-configure.in,v 1.1 2020/04/17 15:50:03 nia Exp $
+
+- Sun/NetBSD audio support
+- Install extra headers needed by portmixer in Audacity for OSS.
+- Don't use -pthread
+
+--- configure.in.orig  2016-10-30 01:23:04.000000000 +0000
++++ configure.in
+@@ -32,6 +32,10 @@ AC_ARG_WITH(oss,
+             AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]),
+             [with_oss=$withval])
+ 
++AC_ARG_WITH(sun,
++            AS_HELP_STRING([--with-sun], [Enable support for Sun/NetBSD Audio @<:@autodetect@:>@]),
++            [with_sun=$withval])
++
+ AC_ARG_WITH(asihpi,
+             AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),
+             [with_asihpi=$withval])
+@@ -132,6 +136,10 @@ if test "x$with_oss" != "xno"; then
+         AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
+     fi
+ fi
++have_sun=no
++if test "x$with_sun" != "xno"; then
++    AC_CHECK_HEADERS([sys/audioio.h], [have_sun=yes])
++fi
+ have_jack=no
+ if test "x$with_jack" != "xno"; then
+     PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
+@@ -416,6 +424,7 @@ case "${host_os}" in
+ 
+         if [[ "$with_oss" != "no" ]] ; then
+            OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
++           INCLUDES="$INCLUDES pa_unix_oss.h"
+            if [[ "$have_libossaudio" = "yes" ]] ; then
+                    DLL_LIBS="$DLL_LIBS -lossaudio"
+                    LIBS="$LIBS -lossaudio"
+@@ -423,6 +432,11 @@ case "${host_os}" in
+            AC_DEFINE(PA_USE_OSS,1)
+         fi
+ 
++        if [[ "$with_sun" != "no" ]] ; then
++           OTHER_OBJS="$OTHER_OBJS src/hostapi/sun/pa_unix_sun.o"
++           AC_DEFINE(PA_USE_SUN,1)
++        fi
++
+         if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
+            LIBS="$LIBS -lhpi"
+            DLL_LIBS="$DLL_LIBS -lhpi"
+@@ -430,8 +444,8 @@ case "${host_os}" in
+            AC_DEFINE(PA_USE_ASIHPI,1)
+         fi
+ 
+-        DLL_LIBS="$DLL_LIBS -lm -lpthread"
+-        LIBS="$LIBS -lm -lpthread"
++        DLL_LIBS="$DLL_LIBS -lm ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
++        LIBS="$LIBS -lm ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
+         PADLL="libportaudio.so"
+ 
+         ## support sun cc compiler flags
+@@ -510,6 +524,7 @@ case "$target_os" in
+      *)
+       AC_MSG_RESULT([
+   OSS ......................... $have_oss
++  Sun ......................... $have_sun
+   JACK ........................ $have_jack
+ ])
+         ;;
diff -r 5125f4dfaad9 -r 17d12c520e67 audio/portaudio/patches/patch-include_pa__unix__oss.h
--- a/audio/portaudio/patches/patch-include_pa__unix__oss.h     Fri Apr 17 15:31:43 2020 +0000
+++ b/audio/portaudio/patches/patch-include_pa__unix__oss.h     Fri Apr 17 15:50:03 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-include_pa__unix__oss.h,v 1.1 2019/10/26 17:22:39 nia Exp $
+$NetBSD: patch-include_pa__unix__oss.h,v 1.2 2020/04/17 15:50:03 nia Exp $
 
 Add features needed to make portmixer work in audacity.
 
---- /dev/null
+--- include/pa_unix_oss.h.orig 2020-04-15 17:02:57.772786926 +0000
 +++ include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
+@@ -0,0 +1,52 @@
 +#ifndef PA_UNIX_OSS_H
 +#define PA_UNIX_OSS_H
 +
@@ -57,55 +57,3 @@
 +#endif
 +
 +#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ *
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,



Home | Main Index | Thread Index | Old Index