summaryrefslogtreecommitdiff
path: root/audio/celt
diff options
context:
space:
mode:
authorbjs <bjs>2008-12-03 00:44:49 +0000
committerbjs <bjs>2008-12-03 00:44:49 +0000
commit2aa6f27addc657105d1c8c5a8f754bb2ab42a75e (patch)
tree7ccabe7c743770ee284e03ff1bdde69d4ecefc9c /audio/celt
parent96fc8b46ed1f16cd2b211478cb693ba097ba8965 (diff)
downloadpkgsrc-2aa6f27addc657105d1c8c5a8f754bb2ab42a75e.tar.gz
Import celt-0.5.0.
CELT is an ultra-low-delay audio codec designed for high-quality communications. Its potential uses include video-conferencing and network music performance. The code is still in early stage, so it may be broken from time to time. NOTE: The API is not frozen yet, so it is different from one version to another.
Diffstat (limited to 'audio/celt')
-rw-r--r--audio/celt/DESCR7
-rw-r--r--audio/celt/Makefile37
-rw-r--r--audio/celt/PLIST9
-rw-r--r--audio/celt/buildlink3.mk25
-rw-r--r--audio/celt/distinfo7
-rw-r--r--audio/celt/hacks.mk14
-rw-r--r--audio/celt/options.mk15
-rw-r--r--audio/celt/patches/patch-aa55
-rw-r--r--audio/celt/patches/patch-ab13
9 files changed, 182 insertions, 0 deletions
diff --git a/audio/celt/DESCR b/audio/celt/DESCR
new file mode 100644
index 00000000000..830b70a8438
--- /dev/null
+++ b/audio/celt/DESCR
@@ -0,0 +1,7 @@
+CELT is an ultra-low-delay audio codec designed for high-quality
+communications. Its potential uses include video-conferencing and
+network music performance. The code is still in early stage, so it may
+be broken from time to time.
+
+NOTE: The API is not frozen yet, so it is different from one version to
+another.
diff --git a/audio/celt/Makefile b/audio/celt/Makefile
new file mode 100644
index 00000000000..ac07a023f48
--- /dev/null
+++ b/audio/celt/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+#
+
+DISTNAME= celt-0.5.0
+CATEGORIES= audio
+MASTER_SITES= http://downloads.us.xiph.org/releases/celt/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://downloads.us.xiph.org/releases/celt/
+COMMENT= Ultra-low-delay, high-quality audio codec (experimental)
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config
+
+PKGCONFIG_OVERRIDE+= celt.pc.in
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/oss.buildlink3.mk"
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Solaris"
+###
+### XXX Remove this definition if DEVSUNAUDIO is placed in default mk.conf.
+###
+DEVSUNAUDIO?= /dev/audio
+BUILD_DEFS+= DEVSUNAUDIO
+CFLAGS+= -DDEVSUNAUDIO=\"${DEVSUNAUDIO:U/dev/audio}\"
+.elif ${OSS_TYPE} != "none"
+MAKE_ENV+= LIBOSSAUDIO=${LIBOSSAUDIO:Q}
+CFLAGS+= -DDEVOSSAUDIO=\"${DEVOSSAUDIO:U/dev/dsp}\"
+.endif
+
+.include "options.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/celt/PLIST b/audio/celt/PLIST
new file mode 100644
index 00000000000..6fb353e8238
--- /dev/null
+++ b/audio/celt/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+bin/celtdec
+bin/celtenc
+include/celt/celt.h
+include/celt/celt_header.h
+include/celt/celt_types.h
+lib/libcelt.la
+lib/pkgconfig/celt.pc
+@dirrm include/celt
diff --git a/audio/celt/buildlink3.mk b/audio/celt/buildlink3.mk
new file mode 100644
index 00000000000..bd610c5d6ba
--- /dev/null
+++ b/audio/celt/buildlink3.mk
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+CELT_BUILDLINK3_MK:= ${CELT_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= celt
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncelt}
+BUILDLINK_PACKAGES+= celt
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}celt
+
+.if ${CELT_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.celt+= celt>=0.5.0
+BUILDLINK_PKGSRCDIR.celt?= ../../audio/celt
+pkgbase:= celt
+. include "../../mk/pkg-build-options.mk"
+.endif # CELT_BUILDLINK3_MK
+
+.if !empty(PKG_BUILD_OPTIONS.celt:Mogg)
+. include "../../multimedia/libogg/buildlink3.mk"
+.endif
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/audio/celt/distinfo b/audio/celt/distinfo
new file mode 100644
index 00000000000..528fe1c4a36
--- /dev/null
+++ b/audio/celt/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+
+SHA1 (celt-0.5.0.tar.gz) = 77558887d7c6cb587630bddd8f11f19e4a94bc2b
+RMD160 (celt-0.5.0.tar.gz) = bb207fe024a2518204dba223b735a9c3da3cd339
+Size (celt-0.5.0.tar.gz) = 447365 bytes
+SHA1 (patch-aa) = f7e1478687e92da3ec52dc92e7070e9fcac65efd
+SHA1 (patch-ab) = 28bd1b924e367c6ddf4a53282fa7324a2662ae74
diff --git a/audio/celt/hacks.mk b/audio/celt/hacks.mk
new file mode 100644
index 00000000000..61b061279a8
--- /dev/null
+++ b/audio/celt/hacks.mk
@@ -0,0 +1,14 @@
+# $NetBSD: hacks.mk,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+#
+
+.if !defined(CELT_HACKS_MK)
+CELT_HACKS_MK= # empty
+. include "../../mk/compiler.mk"
+###
+### XXX Remove this if unneeded in the future.
+###
+. if !empty(CC_VERSION:Mgcc-[34]*)
+CFLAGS+= -fno-strict-aliasing
+PKG_HACKS+= no-strict-aliasing
+. endif
+.endif
diff --git a/audio/celt/options.mk b/audio/celt/options.mk
new file mode 100644
index 00000000000..065ef47bf7f
--- /dev/null
+++ b/audio/celt/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+#
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.celt
+PKG_SUPPORTED_OPTIONS= ogg
+PKG_SUGGESTED_OPTIONS= ogg
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mogg)
+CONFIGURE_ARGS+= --with-ogg=${BUILDLINK_PREFIX.libogg:Q}
+. include "../../multimedia/libogg/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-ogg
+.endif
diff --git a/audio/celt/patches/patch-aa b/audio/celt/patches/patch-aa
new file mode 100644
index 00000000000..88bf9658d98
--- /dev/null
+++ b/audio/celt/patches/patch-aa
@@ -0,0 +1,55 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+
+--- tools/celtdec.c.orig 2008-07-26 08:58:49.000000000 -0400
++++ tools/celtdec.c
+@@ -61,14 +61,14 @@
+ #include "wave_out.c"
+ #endif
+
+-#ifdef HAVE_SYS_SOUNDCARD_H
++#ifdef USE_OSSAUDIO
+ #include <sys/soundcard.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+
+-#elif defined HAVE_SYS_AUDIOIO_H
++#elif defined USE_SUNAUDIO
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+@@ -145,12 +145,12 @@ FILE *out_file_open(char *outFile, int r
+ /*Open output file*/
+ if (strlen(outFile)==0)
+ {
+-#if defined HAVE_SYS_SOUNDCARD_H
++#if defined USE_OSSAUDIO
+ int audio_fd, format, stereo;
+- audio_fd=open("/dev/dsp", O_WRONLY);
++ audio_fd=open(DEVOSSAUDIO, O_WRONLY);
+ if (audio_fd<0)
+ {
+- perror("Cannot open /dev/dsp");
++ perror("Cannot open audio device.");
+ exit(1);
+ }
+
+@@ -185,14 +185,14 @@ FILE *out_file_open(char *outFile, int r
+ exit(1);
+ }
+ fout = fdopen(audio_fd, "w");
+-#elif defined HAVE_SYS_AUDIOIO_H
++#elif defined USE_SUNAUDIO
+ audio_info_t info;
+ int audio_fd;
+
+- audio_fd = open("/dev/audio", O_WRONLY);
++ audio_fd = open(DEVSUNAUDIO, O_WRONLY);
+ if (audio_fd<0)
+ {
+- perror("Cannot open /dev/audio");
++ perror("Cannot open audio device.");
+ exit(1);
+ }
+
diff --git a/audio/celt/patches/patch-ab b/audio/celt/patches/patch-ab
new file mode 100644
index 00000000000..decf51e0b2b
--- /dev/null
+++ b/audio/celt/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/12/03 00:44:49 bjs Exp $
+
+--- tools/Makefile.in.orig 2008-10-09 07:11:34.000000000 -0400
++++ tools/Makefile.in
+@@ -213,7 +213,7 @@ noinst_HEADERS = wav_io.h
+ celtenc_SOURCES = celtenc.c wav_io.c skeleton.c
+ celtenc_LDADD = $(top_builddir)/libcelt/libcelt.la $(OGG_LIBS)
+ celtdec_SOURCES = celtdec.c wav_io.c
+-celtdec_LDADD = $(top_builddir)/libcelt/libcelt.la $(OGG_LIBS)
++celtdec_LDADD = $(top_builddir)/libcelt/libcelt.la $(OGG_LIBS) $(LIBOSSAUDIO)
+ all: all-am
+
+ .SUFFIXES: