diff options
author | wxs <wxs@FreeBSD.org> | 2010-07-15 20:25:47 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2010-07-15 20:25:47 +0800 |
commit | 153f99b868aae2dceb9e35f694c8bf53f56f86a7 (patch) | |
tree | 6cbe389c35cbcab9fee987bc557c728aa4b53eb3 /multimedia/vlc | |
parent | 173940aa7503b61433b26a364edb03bef1335707 (diff) | |
download | freebsd-ports-gnome-153f99b868aae2dceb9e35f694c8bf53f56f86a7.tar.gz freebsd-ports-gnome-153f99b868aae2dceb9e35f694c8bf53f56f86a7.tar.zst freebsd-ports-gnome-153f99b868aae2dceb9e35f694c8bf53f56f86a7.zip |
Add option to support portaudio (off by default).
Remove support for 6.x. VLC does not work there and with the upcoming EOL
people should be moving off of it.
Submitted by: Joseph S. Atkinson <jsa@wickedmachine.net>
Diffstat (limited to 'multimedia/vlc')
-rw-r--r-- | multimedia/vlc/Makefile | 17 | ||||
-rw-r--r-- | multimedia/vlc/files/extra-patch-modules__access__v4l2.c | 71 |
2 files changed, 11 insertions, 77 deletions
diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile index f63cb2cb9681..0b22169bd814 100644 --- a/multimedia/vlc/Makefile +++ b/multimedia/vlc/Makefile @@ -55,6 +55,7 @@ OPTIONS= A52 "A52 DVD audio decoder" On \ OGG "Ogg audio decoder support" On \ OPENGL "OpenGL acceleration support" Off \ PNG "PNG graphics format support" On \ + PORTAUDIO "Portaudio library support" Off \ PULSE "Pulse Audio support" Off \ QT4 "Qt4 Interface" On \ REALAUDIO "Real Audio(R) support" On \ @@ -172,17 +173,12 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules__access__file.c \ ${FILESDIR}/extra-patch-modules__access__fs.c .endif -.if (${OSVERSION} < 700042) && defined(WITH_QT4) -IGNORE= does not build on FreeBSD 6.x with Qt4.x, set this OPTION to off or\ - define WITHOUT_QT4 to build CLI only version -.endif - .if (${OSVERSION} < 701000) CFLAGS+= -DHAVE_SYS_MOUNT_H .endif .if (${OSVERSION} < 700000) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules_access_v4l2.c +BROKEN= VLC 1.1.0 does not work on FreeBSD 6.x .endif .if ${PERL_LEVEL} < 500800 @@ -445,6 +441,13 @@ LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png CONFIGURE_ARGS+=--enable-png .endif +.if defined(WITH_PORTAUDIO) +LIB_DEPENDS+= portaudio.2:${PORTSDIR}/audio/portaudio2 +CONFIGURE_ARGS+=--enable-portaudio +.else +CONFIGURE_ARGS+=--disable-portaudio +.endif + .if defined(WITH_PULSE) CONFIGURE_ARGS+=--enable-pulse .else @@ -635,6 +638,8 @@ post-patch: @${REINPLACE_CMD} -e 's|/dev/cdrom|${WITH_CDROM_DEVICE}|g' \ -e 's|/dev/dvd|${WITH_DVD_DEVICE}|g' \ ${WRKSRC}/include/vlc_config.h + ${REINPLACE_CMD} -e 's|portaudio\.h|portaudio2/&|g' \ + ${WRKSRC}/modules/audio_output/portaudio.c pre-install: ${RM} -rf ${PLIST} ${FAKEDIR} diff --git a/multimedia/vlc/files/extra-patch-modules__access__v4l2.c b/multimedia/vlc/files/extra-patch-modules__access__v4l2.c deleted file mode 100644 index 02ac708d65d2..000000000000 --- a/multimedia/vlc/files/extra-patch-modules__access__v4l2.c +++ /dev/null @@ -1,71 +0,0 @@ ---- modules/access/v4l2.c.orig 2009-12-21 04:43:39.000000000 +1100 -+++ modules/access/v4l2.c 2010-02-19 13:29:51.000000000 +1100 -@@ -492,6 +492,9 @@ - { - void * start; - size_t length; -+#if !defined (HAVE_POSIX_MEMALIGN) && !defined (HAVE_MEMALIGN) -+ void * free; -+#endif - }; - - struct demux_sys_t -@@ -1038,7 +1041,12 @@ - switch( p_sys->io ) - { - case IO_METHOD_READ: -- free( p_sys->p_buffers[0].start ); -+#if !defined (HAVE_POSIX_MEMALIGN) && !defined (HAVE_MEMALIGN) -+ if (p_sys->p_buffers[0].free) -+ free( p_sys->p_buffers[0].free ); -+ else -+#endif -+ free( p_sys->p_buffers[0].start ); - break; - - case IO_METHOD_MMAP: -@@ -1054,7 +1062,12 @@ - case IO_METHOD_USERPTR: - for( i = 0; i < p_sys->i_nbuffers; ++i ) - { -- free( p_sys->p_buffers[i].start ); -+#if !defined (HAVE_POSIX_MEMALIGN) && !defined (HAVE_MEMALIGN) -+ if (p_sys->p_buffers[0].free) -+ free( p_sys->p_buffers[i].free ); -+ else -+#endif -+ free( p_sys->p_buffers[i].start ); - } - break; - -@@ -1600,10 +1613,31 @@ - - for( p_sys->i_nbuffers = 0; p_sys->i_nbuffers < 4; ++p_sys->i_nbuffers ) - { -+#if defined (HAVE_POSIX_MEMALIGN) - p_sys->p_buffers[p_sys->i_nbuffers].length = i_buffer_size; - if( posix_memalign( &p_sys->p_buffers[p_sys->i_nbuffers].start, - /* boundary */ i_page_size, i_buffer_size ) ) - goto open_failed; -+#elif defined (HAVE_MEMALIGN) -+ p_sys->p_buffers[p_sys->i_nbuffers].length = i_buffer_size; -+ p_sys->p_buffers[p_sys->i_nbuffers].start = -+ memalign ( /* boundary */ i_page_size, i_buffer_size ); -+ if (p_sys->p_buffers[p_sys->i_nbuffers].start == NULL) -+ goto open_failed; -+#else -+ unsigned char *ptr; -+ size_t align = i_page_size - 1; -+ -+ p_sys->p_buffers[p_sys->i_nbuffers].length = i_buffer_size; -+ ptr = malloc (i_buffer_size + align); -+ if ( ptr == NULL ) -+ goto open_failed; -+ -+ p_sys->p_buffers[p_sys->i_nbuffers].free = ptr; -+ ptr += align; -+ p_sys->p_buffers[p_sys->i_nbuffers].start = -+ (void *)(((uintptr_t)ptr) & ~align); -+#endif - } - return VLC_SUCCESS; |