Fix the V4L2 and PORTAUDIO options.

Submitted by:	Matthias Apitz <guru@unixarea.de>
This commit is contained in:
Chris Rees 2012-09-03 18:43:38 +00:00
parent 24b332e8ee
commit 88dffc1be2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=303608
4 changed files with 29 additions and 4 deletions

View File

@ -20,9 +20,9 @@ PLIST_FILES= bin/baresip
PORTDATA= *
PORTDOCS= *
#OPTIONS_NOT_YET_WORKING= ALSA BV32 G722_1 PLC PORTAUDIO V4L2
#OPTIONS_NOT_YET_WORKING= ALSA BV32 G722_1 PLC
OPTIONS_DEFINE= CELT CONS DOCS FFMPEG G711 G722 GSM GSTREAMER ILBC L16 OPUS \
OSS SDL SNDFILE SPEEX SRTP STDIO UUID V4L X11
OSS PORTAUDIO SDL SNDFILE SPEEX SRTP STDIO UUID V4L V4L2 X11
OPTIONS_DEFAULT=CONS G711 G722 L16
BV32_DESC= BroadVoice32 Wideband Audio codec
@ -76,6 +76,10 @@ post-patch:
${ECHO_CMD} ".PHONY: showmodules" >> ${WRKSRC}/Makefile
${ECHO_CMD} "showmodules:" >> ${WRKSRC}/Makefile
${ECHO_CMD} ' @${ECHO_CMD} $$(MODULES)' >> ${WRKSRC}/Makefile
${REINPLACE_CMD} 's,-lcelt[0-9]*,$$(pkg-config --libs celt),' \
${WRKSRC}/modules/celt/module.mk
${REINPLACE_CMD} 's,-lportaudio[0-9]*,-L${LOCALBASE}/lib/portaudio2 -lportaudio,' \
${WRKSRC}/modules/portaudio/module.mk
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin

View File

@ -16,7 +16,7 @@ L16_DEPEND=
OPUS_DEPEND= ${LOCALBASE}/include/opus/opus.h:${PORTSDIR}/audio/opus
OSS_DEPEND= # In base
PLC_DEPEND= ${LOCALBASE}/include/spandsp/plc.h:${PORTSDIR}/comms/spandsp
PORTAUDIO_DEPEND= ${LOCALBASE}/include/portaudio.h:${PORTSDIR}/audio/portaudio
PORTAUDIO_DEPEND= ${LOCALBASE}/include/portaudio2/portaudio.h:${PORTSDIR}/audio/portaudio2
SDL_DEPEND= # Handled with USE_SDL in Makefile
SNDFILE_DEPEND= ${LOCALBASE}/include/sndfile.h:${PORTSDIR}/audio/libsndfile
SPEEX_DEPEND= ${LOCALBASE}/include/speex/speex.h:${PORTSDIR}/audio/speex
@ -24,5 +24,5 @@ SRTP_DEPEND= ${LOCALBASE}/include/srtp/srtp.h:${PORTSDIR}/net/libsrtp
STDIO_DEPEND= # In base
UUID_DEPEND= ${LOCALBASE}/include/uuid/uuid.h:${PORTSDIR}/misc/e2fsprogs-libuuid
V4L_DEPEND= ${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat
V4L2_DEPEND= # nonexistent
V4L2_DEPEND= ${LOCALBASE}/include/libv4l2.h:${PORTSDIR}/multimedia/libv4l
X11_DEPEND= # Handled with USE_XORG in Makefile

View File

@ -0,0 +1,11 @@
--- modules/portaudio/portaudio.c.orig 2012-09-03 19:10:56.385452152 +0100
+++ modules/portaudio/portaudio.c 2012-09-03 19:11:06.160451716 +0100
@@ -4,7 +4,7 @@
* Copyright (C) 2010 Creytiv.com
*/
#include <string.h>
-#include <portaudio.h>
+#include <portaudio2/portaudio.h>
#include <re.h>
#include <baresip.h>

View File

@ -0,0 +1,10 @@
--- modules/v4l2/v4l2.c.orig 2012-09-03 19:15:11.128472643 +0100
+++ modules/v4l2/v4l2.c 2012-09-03 19:15:22.190452621 +0100
@@ -7,7 +7,6 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
-#include <malloc.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>