aboutsummaryrefslogtreecommitdiff
path: root/audio/alsa-utils
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-08-09 15:20:35 +0000
committerJohn Marino <marino@FreeBSD.org>2014-08-09 15:20:35 +0000
commit46b7762a82cdc0c94eeafd3a686bad427433ccb4 (patch)
treee69277546fcd8c9ef3f433ee70374b1ae0d9db62 /audio/alsa-utils
parentc9c0fba3555ebe2bc14b5a4b9a85b7922a1c5083 (diff)
Notes
Diffstat (limited to 'audio/alsa-utils')
-rw-r--r--audio/alsa-utils/Makefile38
-rw-r--r--audio/alsa-utils/distinfo4
-rw-r--r--audio/alsa-utils/files/patch-alsa-utils136
-rw-r--r--audio/alsa-utils/files/patch-alsaloop__alsaloop.c14
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__mixer_display.c12
-rw-r--r--audio/alsa-utils/files/patch-alsamixer__volume_mapping.c11
-rw-r--r--audio/alsa-utils/files/patch-aplay__aplay.c23
-rw-r--r--audio/alsa-utils/files/patch-aplay__formats.h10
-rw-r--r--audio/alsa-utils/pkg-plist2
9 files changed, 87 insertions, 163 deletions
diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile
index 8c69e164c1bc..f1409f3c54ef 100644
--- a/audio/alsa-utils/Makefile
+++ b/audio/alsa-utils/Makefile
@@ -2,47 +2,37 @@
# $FreeBSD$
PORTNAME= alsa-utils
-PORTVERSION= 1.0.27.2
-PORTREVISION= 2
+PORTVERSION= 1.0.28
CATEGORIES= audio
MASTER_SITES= ALSA/utils \
GENTOO/distfiles
-MAINTAINER= aragon@phat.za.net
+MAINTAINER= jbeich@vfemail.net
COMMENT= ALSA compatibility utils
+LICENSE= GPLv2 # or any later version
+
LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
USES= gmake tar:bzip2 shebangfix
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-udev-rules-dir="\$${prefix}/lib/udev"
-CFLAGS+= -I${LOCALBASE}/include
SHEBANG_FILES= alsaconf/alsaconf.in
+INSTALL_TARGET= install-strip
+CPPFLAGS+= -I${LOCALBASE}/include -I${.CURDIR}/../alsa-lib/files
+LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_SUB= yes
-OPTIONS_DEFINE= XMLTO NLS
-OPTIONS_DEFAULT=XMLTO
-XMLTO_DESC= Generate alsactl_init(7) man page using xmlto(1)
+OPTIONS_DEFINE= MANPAGES NLS
+OPTIONS_DEFAULT=MANPAGES
-.include <bsd.port.options.mk>
+MANPAGES_BUILD_DEPENDS= xmlto:${PORTSDIR}/textproc/xmlto
+MANPAGES_CONFIGURE_ENABLE=xmlto
-.if ${PORT_OPTIONS:MXMLTO}
-BUILD_DEPENDS+= xmlto:${PORTSDIR}/textproc/xmlto
-MAN7_EN+= alsactl_init.7
-.else
-CONFIGURE_ARGS+=--disable-xmlto
-.endif
-
-.if empty(PORT_OPTIONS:MNLS)
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.else
-LDFLAGS+= -L${LOCALBASE}/lib -lintl
-USES+= gettext
-PLIST_SUB+= NLS=""
-.endif
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE=nls
+NLS_LDFLAGS= -lintl
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/s/-ldl//g; /LIBRT/s/-lrt//g;' \
diff --git a/audio/alsa-utils/distinfo b/audio/alsa-utils/distinfo
index 815a81f0b3b9..0d9c6a4063d9 100644
--- a/audio/alsa-utils/distinfo
+++ b/audio/alsa-utils/distinfo
@@ -1,2 +1,2 @@
-SHA256 (alsa-utils-1.0.27.2.tar.bz2) = 02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea
-SIZE (alsa-utils-1.0.27.2.tar.bz2) = 1143802
+SHA256 (alsa-utils-1.0.28.tar.bz2) = f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc
+SIZE (alsa-utils-1.0.28.tar.bz2) = 1146887
diff --git a/audio/alsa-utils/files/patch-alsa-utils b/audio/alsa-utils/files/patch-alsa-utils
deleted file mode 100644
index 66f4780055f0..000000000000
--- a/audio/alsa-utils/files/patch-alsa-utils
+++ /dev/null
@@ -1,136 +0,0 @@
---- alsaloop/alsaloop.c.orig
-+++ alsaloop/alsaloop.c
-@@ -30,6 +30,7 @@
- #include <sys/time.h>
- #include <math.h>
- #include <pthread.h>
-+#include <signal.h>
- #include <syslog.h>
- #include <sys/signal.h>
- #include "alsaloop.h"
-@@ -749,7 +750,11 @@ static void thread_job1(void *_data)
- snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
- }
- if (err < 0) {
-+#ifndef __FreeBSD__
- if (err == -EINTR || err == -ERESTART)
-+#else
-+ if (err == -EINTR)
-+#endif
- continue;
- logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
- my_exit(thread, EXIT_FAILURE);
---- alsaloop/pcmjob.c.orig
-+++ alsaloop/pcmjob.c
-@@ -63,7 +63,11 @@ static const char *src_types[] = {
- #endif
-
- static pthread_mutex_t pcm_open_mutex =
-+#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-+#else
-+ PTHREAD_MUTEX_INITIALIZER;
-+#endif
-
- static inline void pcm_open_lock(void)
- {
---- alsamixer/mixer_display.c.orig
-+++ alsamixer/mixer_display.c
-@@ -17,7 +17,9 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#ifndef __FreeBSD__
- #define _C99_SOURCE /* lrint() */
-+#endif
- #include "aconfig.h"
- #include <stdlib.h>
- #include <string.h>
---- alsamixer/volume_mapping.c.orig
-+++ alsamixer/volume_mapping.c
-@@ -37,7 +37,7 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
-
--#ifdef __UCLIBC__
-+#if defined(__UCLIBC__) || defined(__FreeBSD__)
- /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
- #define exp10(x) (exp((x) * log(10)))
- #endif /* __UCLIBC__ */
---- aplay/aplay.c.orig 2010-04-16 13:11:06.000000000 +0200
-+++ aplay/aplay.c 2010-04-23 04:17:13.000000000 +0200
-@@ -28,7 +28,9 @@
-
- #define _GNU_SOURCE
- #include <stdio.h>
-+#ifndef __FreeBSD__
- #include <malloc.h>
-+#endif
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -48,7 +50,11 @@
- #include <sys/signal.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#else
- #include <endian.h>
-+#endif
- #include "aconfig.h"
- #include "gettext.h"
- #include "formats.h"
-@@ -116,6 +122,11 @@
- static int use_strftime = 0;
- volatile static int recycle_capture_file = 0;
-
-+typedef off_t off64_t;
-+
-+#define lseek64 lseek
-+#define open64 open
-+
- static int fd = -1;
- static off64_t pbrec_count = LLONG_MAX, fdcount;
- static int vocmajor, vocminor;
-@@ -1086,8 +1097,8 @@
- err = snd_pcm_hw_params_get_buffer_time_max(params,
- &buffer_time, 0);
- assert(err >= 0);
-- if (buffer_time > 500000)
-- buffer_time = 500000;
-+ /* if (buffer_time > 500000) XXX WHO CARES?!?!?
-+ buffer_time = 500000; */
- }
- if (period_time == 0 && period_frames == 0) {
- if (buffer_time > 0)
---- aplay/formats.h.orig 2009-08-31 23:13:36.000000000 +0800
-+++ aplay/formats.h 2009-09-15 01:22:05.000000000 +0800
-@@ -1,8 +1,15 @@
- #ifndef FORMATS_H
- #define FORMATS_H 1
-
-+#ifdef __FreeBSD__
-+#include <sys/endian.h>
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
-+#else
- #include <endian.h>
- #include <byteswap.h>
-+#endif
-
- /* Definitions for .VOC files */
-
---- speaker-test/speaker-test.c.orig 2009-08-31 23:13:36.000000000 +0800
-+++ speaker-test/speaker-test.c 2009-09-15 01:22:48.000000000 +0800
-@@ -44,7 +44,9 @@
- #include <getopt.h>
- #include <inttypes.h>
- #include <ctype.h>
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <signal.h>
-
- #define ALSA_PCM_NEW_HW_PARAMS_API
diff --git a/audio/alsa-utils/files/patch-alsaloop__alsaloop.c b/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
new file mode 100644
index 000000000000..22b0102aecb5
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsaloop__alsaloop.c
@@ -0,0 +1,14 @@
+--- alsaloop/alsaloop.c~
++++ alsaloop/alsaloop.c
+@@ -760,7 +761,11 @@ static void thread_job1(void *_data)
+ snd_output_printf(output, "pool took %lius\n", timediff(tv2, tv1));
+ }
+ if (err < 0) {
++#ifdef ERESTART
+ if (err == -EINTR || err == -ERESTART)
++#else
++ if (err == -EINTR)
++#endif
+ continue;
+ logit(LOG_CRIT, "Poll failed: %s\n", strerror(-err));
+ my_exit(thread, EXIT_FAILURE);
diff --git a/audio/alsa-utils/files/patch-alsamixer__mixer_display.c b/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
new file mode 100644
index 000000000000..f3c645dcbf90
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer__mixer_display.c
@@ -0,0 +1,12 @@
+--- alsamixer/mixer_display.c~
++++ alsamixer/mixer_display.c
+@@ -17,7 +17,9 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#ifdef __GLIBC__
+ #define _C99_SOURCE /* lrint() */
++#endif
+ #include "aconfig.h"
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c b/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
new file mode 100644
index 000000000000..ba1dd03ad509
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsamixer__volume_mapping.c
@@ -0,0 +1,11 @@
+--- alsamixer/volume_mapping.c~
++++ alsamixer/volume_mapping.c
+@@ -37,7 +37,7 @@
+ #include <stdbool.h>
+ #include "volume_mapping.h"
+
+-#ifdef __UCLIBC__
++#ifndef __GLIBC__
+ /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
+ #define exp10(x) (exp((x) * log(10)))
+ #endif /* __UCLIBC__ */
diff --git a/audio/alsa-utils/files/patch-aplay__aplay.c b/audio/alsa-utils/files/patch-aplay__aplay.c
new file mode 100644
index 000000000000..3cccaaa39c45
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay__aplay.c
@@ -0,0 +1,23 @@
+--- aplay/aplay.c~
++++ aplay/aplay.c
+@@ -48,7 +48,6 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <endian.h>
+ #include "aconfig.h"
+ #include "gettext.h"
+ #include "formats.h"
+@@ -70,6 +69,12 @@
+ #define be32toh(x) __be32_to_cpu(x)
+ #endif
+
++#ifndef _LARGEFILE64_SOURCE
++/* assume modern system */
++typedef off_t off64_t;
++#define lseek64 lseek
++#endif
++
+ #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
+ #define DEFAULT_SPEED 8000
+
diff --git a/audio/alsa-utils/files/patch-aplay__formats.h b/audio/alsa-utils/files/patch-aplay__formats.h
new file mode 100644
index 000000000000..56309d22103f
--- /dev/null
+++ b/audio/alsa-utils/files/patch-aplay__formats.h
@@ -0,0 +1,10 @@
+--- aplay/formats.h~
++++ aplay/formats.h
+@@ -1,7 +1,6 @@
+ #ifndef FORMATS_H
+ #define FORMATS_H 1
+
+-#include <endian.h>
+ #include <byteswap.h>
+
+ /* Definitions for .VOC files */
diff --git a/audio/alsa-utils/pkg-plist b/audio/alsa-utils/pkg-plist
index e4dd33d1fad9..24946bf38acb 100644
--- a/audio/alsa-utils/pkg-plist
+++ b/audio/alsa-utils/pkg-plist
@@ -29,7 +29,7 @@ man/man1/aseqdump.1.gz
man/man1/aseqnet.1.gz
man/man1/iecset.1.gz
man/man1/speaker-test.1.gz
-%%XMLTO%%man/man7/alsactl_init.7.gz
+%%MANPAGES%%man/man7/alsactl_init.7.gz
man/man8/alsaconf.8.gz
sbin/alsaconf
sbin/alsactl