ports/95422: devel/pwlib: unbreak sdl detection, repair bsdvideo plugin, ...
Joerg Pulz
Joerg.Pulz at frm2.tum.de
Thu Apr 6 19:20:31 UTC 2006
>Number: 95422
>Category: ports
>Synopsis: devel/pwlib: unbreak sdl detection, repair bsdvideo plugin, ...
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 06 19:20:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Joerg Pulz
>Release: FreeBSD 6.1-PRERELEASE i386
>Organization:
TU-Munich / ZWE FRM-II
>Environment:
System: FreeBSD hades.admin.frm2 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #11: Wed Feb 22 19:01:44 CET 2006 root at hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386
>Description:
- files/patch-configureac
* use a better way to detect the SDL header
* (the old way did not work for me on several systems)
- Makefile
- files/patch-plugins::Makefile.in
- files/patch-plugins::configure
* add WITH_ESOUND knob and enable the plugin build
- files/patch-plugins::sound_esd::Makefile
- files/patch-plugins::sound_esd::sound_esd.h
* make the esound plugin build- and loadable
- files/patch-plugins::vidinput_bsd::vidinput_bsd.cxx
- files/patch-plugins::vidinput_bsd::vidinput_bsd.h
* fix the bsdvideo (bktr(4) based) plugin
* convert to the correct API
- files/patch-src::ptlib::unix::udll.cxx
* add a small "error handler" to detect unresolved symbols in plugins
- pkg-plist
* add more plugins
* use @dirrmtry for DATADIR, to don't complain during upgrades
(net/openh323 installs its codecs in ${PREFIX}/lib/pwlib/codecs)
- Makefile
- files/patch-plugins::vidinput_avc::Makefile
- files/patch-plugins::vidinput_dc::Makefile.in
* add very experimental support for firewire(4) based video devices
* as we do not have ports for all necessary libraries, provide
information how to obtain the archives for them from our FTP server
! As the appropriate part is completely commented in the ports
Makefile, it breaks nothing. It is mostly for testing purposes for
brave people with firewire(4) based video devices. !
>How-To-Repeat:
<code/Input/activities to reproduce the problem (multiple lines)>
>Fix:
- apply the patch
- add new files to CVS
--- devel_pwlib.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/pwlib/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- Makefile 5 Apr 2006 12:50:56 -0000 1.26
+++ Makefile 6 Apr 2006 16:52:38 -0000
@@ -7,6 +7,7 @@
PORTNAME= pwlib
PORTVERSION= 1.10.0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= http://www.voxgratia.org/releases/
@@ -23,6 +24,7 @@
USE_BISON= yes
USE_GMAKE= yes
USE_AUTOTOOLS= autoconf:259
+WANT_GNOME= yes
WANT_SDL= yes
USE_OPENSSL= yes
NO_FILTER_SHLIBS= yes
@@ -75,6 +77,44 @@
MAKE_ENV+= OPENLDAPLIBDIR="${LOCALBASE}/lib"
.endif
+#enable esound support
+.if defined(WITH_ESOUND) && ${HAVE_GNOME:Mesound}!=""
+USE_GNOME+= esound
+CONFIGURE_ARGS+= --enable-esd
+PLIST_SUB+= ESD=""
+.else
+CONFIGURE_ARGS+= --disable-esd
+PLIST_SUB+= ESD="@comment "
+.endif
+
+# ONLY FOR THE BRAVE!
+# If someone owns a firewire(4) video device and wants to use it for
+# video-conferencing purposes, please download the files:
+# libraw1394.shar.gz, libavc1394.shar.gz and libdc1394.shar.gz from
+# ftp://ftp.frm2.tum.de/pub/jpulz/FreeBSD/ports/
+# Extract the files in ${PORTSDIR}/devel and uncomment the following lines.
+#
+##enable libavc1394
+#.if defined(WITH_AVC1394)
+#LIB_DEPENDS+= avc1394.2:${PORTSDIR}/devel/libavc1394 \
+# dv.4:${PORTSDIR}/multimedia/libdv
+#CONFIGURE_ARGS+= --enable-avc
+#PLIST_SUB+= AVC1394=""
+#.else
+CONFIGURE_ARGS+= --disable-avc
+PLIST_SUB+= AVC1394="@comment "
+#.endif
+#
+##enable libdc1394
+#.if defined(WITH_DC1394)
+#LIB_DEPENDS+= dc1394_control.13:${PORTSDIR}/devel/libdc1394
+#CONFIGURE_ARGS+= --enable-dc
+#PLIST_SUB+= DC1394=""
+#.else
+CONFIGURE_ARGS+= --disable-dc
+PLIST_SUB+= DC1394="@comment "
+#.endif
+
.if (${ARCH} == "amd64") || (${ARCH} == "ia64") || (${ARCH} == "sparc64")
CFLAGS+= -fPIC
.endif
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/devel/pwlib/pkg-plist,v
retrieving revision 1.6
diff -u -r1.6 pkg-plist
--- pkg-plist 5 Apr 2006 12:50:56 -0000 1.6
+++ pkg-plist 6 Apr 2006 16:52:39 -0000
@@ -158,11 +158,14 @@
lib/libpt_r.so.1.10
lib/libpt_r.so.1.10.0
lib/pwlib/devices/sound/oss_pwplugin.so
+%%ESD%%lib/pwlib/devices/sound/esd_pwplugin.so
+%%AVC1394%%lib/pwlib/devices/videoinput/avc_pwplugin.so
%%BSDVIDEO%%lib/pwlib/devices/videoinput/bsdvideo_pwplugin.so
+%%DC1394%%lib/pwlib/devices/videoinput/dc_pwplugin.so
@dirrm lib/pwlib/devices/sound
@dirrm lib/pwlib/devices/videoinput
@dirrm lib/pwlib/devices
- at dirrm lib/pwlib
+ at dirrmtry lib/pwlib
%%DATADIR%%/make/common.mak
%%DATADIR%%/make/defaultgui.mak
%%DATADIR%%/make/gui.mak
Index: files/patch-configureac
===================================================================
RCS file: /home/ncvs/ports/devel/pwlib/files/patch-configureac,v
retrieving revision 1.1
diff -u -r1.1 patch-configureac
--- files/patch-configureac 5 Feb 2006 13:39:41 -0000 1.1
+++ files/patch-configureac 6 Apr 2006 16:52:39 -0000
@@ -115,7 +115,7 @@
+ dnl FreeBSD SDL check
if test "${HAS_SDL:-unset}" = "unset" ; then
- AC_CHECK_FILE(/usr/local/include/SDL11/SDL.h, HAS_SDL=1)
-+ AC_CHECK_FILE(SDL11/SDL.h, HAS_SDL=1)
++ AC_CHECK_HEADER(SDL11/SDL.h, HAS_SDL=1)
if test "${HAS_SDL:-unset}" != "unset" ; then
SDLLIB=SDL-1.1
fi
Index: files/patch-plugins::Makefile.in
===================================================================
RCS file: files/patch-plugins::Makefile.in
diff -N files/patch-plugins::Makefile.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::Makefile.in 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,18 @@
+--- plugins/Makefile.in.orig Thu Apr 6 10:15:56 2006
++++ plugins/Makefile.in Thu Apr 6 10:18:41 2006
+@@ -22,6 +22,15 @@
+ endif
+ endif
+
++HAS_ESD = @HAS_ESD@
++
++ifeq (1,$(HAS_ESD))
++SUBDIRS += sound_esd
++ifeq (,$(DEFAULT_SOUND))
++DEFAULT_SOUND = sound_esd
++endif
++endif
++
+ HAS_SUNAUDIO = @HAS_SUNAUDIO@
+
+ ifeq (1,$(HAS_SUNAUDIO))
Index: files/patch-plugins::configure
===================================================================
RCS file: files/patch-plugins::configure
diff -N files/patch-plugins::configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::configure 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,200 @@
+--- plugins/configure.orig Thu Apr 6 10:16:09 2006
++++ plugins/configure Thu Apr 6 09:56:04 2006
+@@ -309,7 +309,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT PWLIBDIR PWINSTDIR INSTALLPREFIX LIBDIR CC CFLAGS ac_ct_CC CPP EGREP HAS_ALSA HAS_OSS HAS_SUNAUDIO HAS_V4L HAS_V4L2 HAS_BSDVIDEOCAP HAS_AVC1394 HAS_DC1394 DC_CFLAGS LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT PWLIBDIR PWINSTDIR INSTALLPREFIX LIBDIR CC CFLAGS ac_ct_CC CPP EGREP HAS_ALSA HAS_OSS HAS_ESD HAS_SUNAUDIO HAS_V4L HAS_V4L2 HAS_BSDVIDEOCAP HAS_AVC1394 HAS_DC1394 DC_CFLAGS LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -852,6 +852,7 @@
+ --disable-audio disable audio support
+ --enable-alsa enable ALSA audio support
+ --enable-oss enable OSS audio support
++ --enable-esd enable ESD audio support
+ --enable-sunaudio enable Sun audio support
+ --disable-video disable video device support in PWLIB
+ --enable-v4l enable V4L video support
+@@ -3444,6 +3459,172 @@
+ fi
+
+
++# Check whether --enable-esd or --disable-esd was given.
++if test "${enable_esd+set}" = set; then
++ enableval="$enable_esd"
++
++else
++ enable_oss=yes
++fi;
++
++if test "${enable_esd}z" = "yesz" ; then
++ if test "${ac_cv_header_esd_h+set}" = set; then
++ echo "$as_me:$LINENO: checking for esd.h" >&5
++echo $ECHO_N "checking for esd.h... $ECHO_C" >&6
++if test "${ac_cv_header_esd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5
++echo "${ECHO_T}$ac_cv_header_esd_h" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking esd.h usability" >&5
++echo $ECHO_N "checking esd.h usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <esd.h>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking esd.h presence" >&5
++echo $ECHO_N "checking esd.h presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <esd.h>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { echo "$as_me:$LINENO: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: esd.h: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { echo "$as_me:$LINENO: WARNING: esd.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: esd.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: esd.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: esd.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: esd.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: esd.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: esd.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: esd.h: in the future, the compiler will take precedence" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------------ ##
++## Report this to the AC_PACKAGE_NAME lists. ##
++## ------------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for esd.h" >&5
++echo $ECHO_N "checking for esd.h... $ECHO_C" >&6
++if test "${ac_cv_header_esd_h+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_cv_header_esd_h=$ac_header_preproc
++fi
++echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5
++echo "${ECHO_T}$ac_cv_header_esd_h" >&6
++
++fi
++if test $ac_cv_header_esd_h = yes; then
++ ESDHDR=1
++fi
++
++
++ echo "$as_me:$LINENO: checking for ESD sound support" >&5
++echo $ECHO_N "checking for ESD sound support... $ECHO_C" >&6
++ if test "${ESDHDR}z" != "z"; then
++ HAS_ESD=1
++
++ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6
++ else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++ fi
++fi
++
++
++
+ # Check whether --enable-sunaudio or --disable-sunaudio was given.
+ if test "${enable_sunaudio+set}" = set; then
+ enableval="$enable_sunaudio"
+@@ -5872,6 +6065,7 @@
+ s, at EGREP@,$EGREP,;t t
+ s, at HAS_ALSA@,$HAS_ALSA,;t t
+ s, at HAS_OSS@,$HAS_OSS,;t t
++s, at HAS_ESD@,$HAS_ESD,;t t
+ s, at HAS_SUNAUDIO@,$HAS_SUNAUDIO,;t t
+ s, at HAS_V4L@,$HAS_V4L,;t t
+ s, at HAS_V4L2@,$HAS_V4L2,;t t
Index: files/patch-plugins::sound_esd::Makefile
===================================================================
RCS file: files/patch-plugins::sound_esd::Makefile
diff -N files/patch-plugins::sound_esd::Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::sound_esd::Makefile 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,11 @@
+--- plugins/sound_esd/Makefile.orig Thu Apr 6 16:47:13 2006
++++ plugins/sound_esd/Makefile Thu Apr 6 16:50:52 2006
+@@ -4,7 +4,7 @@
+
+ PLUGIN_NAME = esd
+ PLUGIN_FAMILY = device/sound
+-PLUGIN_LIBS =
++PLUGIN_LIBS = $(LDFLAGS) -lesd
+ PLUGIN_SOURCES = sound_esd.cxx
+
+ include ../../make/plugins.mak
Index: files/patch-plugins::sound_esd::sound_esd.h
===================================================================
RCS file: files/patch-plugins::sound_esd::sound_esd.h
diff -N files/patch-plugins::sound_esd::sound_esd.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::sound_esd::sound_esd.h 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,22 @@
+--- plugins/sound_esd/sound_esd.h.orig Thu Apr 6 16:47:28 2006
++++ plugins/sound_esd/sound_esd.h Thu Apr 6 16:48:06 2006
+@@ -43,15 +43,15 @@
+ unsigned _bitsPerSample);
+ BOOL Setup();
+ BOOL Close();
+- BOOL IsOpen() const;
++// BOOL IsOpen() const;
+ BOOL Write(const void * buf, PINDEX len);
+ BOOL Read(void * buf, PINDEX len);
+ BOOL SetFormat(unsigned numChannels,
+ unsigned sampleRate,
+ unsigned bitsPerSample);
+- unsigned GetChannels() const;
+- unsigned GetSampleRate() const;
+- unsigned GetSampleSize() const;
++// unsigned GetChannels() const;
++// unsigned GetSampleRate() const;
++// unsigned GetSampleSize() const;
+ BOOL SetBuffers(PINDEX size, PINDEX count);
+ BOOL GetBuffers(PINDEX & size, PINDEX & count);
+ BOOL PlaySound(const PSound & sound, BOOL wait);
Index: files/patch-plugins::vidinput_avc::Makefile
===================================================================
RCS file: files/patch-plugins::vidinput_avc::Makefile
diff -N files/patch-plugins::vidinput_avc::Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::vidinput_avc::Makefile 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,11 @@
+--- plugins/vidinput_avc/Makefile.orig Fri Nov 14 07:16:13 2003
++++ plugins/vidinput_avc/Makefile Thu Apr 6 17:00:31 2006
+@@ -4,7 +4,7 @@
+
+ PLUGIN_NAME = avc
+ PLUGIN_FAMILY = device/videoinput
+-PLUGIN_LIBS = -lraw1394 -ldv -lrom1394
++PLUGIN_LIBS = $(LDFLAGS) -lraw1394 -ldv -lrom1394
+ PLUGIN_SOURCES = vidinput_avc.cxx
+
+ include ../../make/plugins.mak
Index: files/patch-plugins::vidinput_bsd::vidinput_bsd.cxx
===================================================================
RCS file: files/patch-plugins::vidinput_bsd::vidinput_bsd.cxx
diff -N files/patch-plugins::vidinput_bsd::vidinput_bsd.cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::vidinput_bsd::vidinput_bsd.cxx 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,43 @@
+--- plugins/vidinput_bsd/vidinput_bsd.cxx.orig Tue Aug 9 11:08:09 2005
++++ plugins/vidinput_bsd/vidinput_bsd.cxx Wed Apr 5 21:35:08 2006
+@@ -122,12 +122,11 @@
+ #pragma implementation "vidinput_bsd.h"
+
+ #include "vidinput_bsd.h"
+-#include <sys/mman.h>
+
+ PCREATE_VIDINPUT_PLUGIN(BSDCAPTURE);
+
+ ///////////////////////////////////////////////////////////////////////////////
+-// PVideoInputDevice_BSDCAPTURE
++// PVideoInputBSDCAPTURE
+
+ PVideoInputDevice_BSDCAPTURE::PVideoInputDevice_BSDCAPTURE()
+ {
+@@ -142,6 +141,7 @@
+
+ BOOL PVideoInputDevice_BSDCAPTURE::Open(const PString & devName, BOOL startImmediate)
+ {
++ if (IsOpen())
+ Close();
+
+ deviceName = devName;
+@@ -235,10 +235,14 @@
+ {
+ PStringList list;
+
+- list.AppendString("/dev/bktr0");
+- list.AppendString("/dev/bktr1");
+- list.AppendString("/dev/meteor0");
+- list.AppendString("/dev/meteor1");
++ if (PFile::Exists("/dev/bktr0"))
++ list.AppendString("/dev/bktr0");
++ if (PFile::Exists("/dev/bktr1"))
++ list.AppendString("/dev/bktr1");
++ if (PFile::Exists("/dev/meteor0"))
++ list.AppendString("/dev/meteor0");
++ if (PFile::Exists("/dev/meteor1"))
++ list.AppendString("/dev/meteor1");
+
+ return list;
+ }
Index: files/patch-plugins::vidinput_bsd::vidinput_bsd.h
===================================================================
RCS file: files/patch-plugins::vidinput_bsd::vidinput_bsd.h
diff -N files/patch-plugins::vidinput_bsd::vidinput_bsd.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::vidinput_bsd::vidinput_bsd.h 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,95 @@
+--- plugins/vidinput_bsd/vidinput_bsd.h.orig Tue Aug 9 11:08:09 2005
++++ plugins/vidinput_bsd/vidinput_bsd.h Thu Apr 6 09:37:11 2006
+@@ -1,13 +1,24 @@
++#ifndef _PVIDEOIOBSDCAPTURE
+
+-//#include <sys/mman.h>
+-//#include <sys/time.h>
++#define _PVIDEOIOBSDCAPTURE
++
++#ifdef __GNUC__
++#pragma interface
++#endif
++
++#include <sys/mman.h>
+
+ #include <ptlib.h>
+ #include <ptlib/videoio.h>
+ #include <ptlib/vconvert.h>
+
+ #if defined(P_FREEBSD)
++#include <sys/param.h>
++# if __FreeBSD_version >= 502100
++#include <dev/bktr/ioctl_meteor.h>
++# else
+ #include <machine/ioctl_meteor.h>
++# endif
+ #endif
+
+ #if defined(P_OPENBSD) || defined(P_NETBSD)
+@@ -20,19 +30,24 @@
+ #endif
+ #endif
+
+-class PVideoInputDevice_BSDCAPTURE: public PVideoInputDevice
++#if !P_USE_INLINES
++#include <ptlib/contain.inl>
++#endif
++
++
++class PVideoInputDevice_BSDCAPTURE : public PVideoInputDevice
+ {
+
++ PCLASSINFO(PVideoInputDevice_BSDCAPTURE, PVideoInputDevice);
++
+ public:
+ PVideoInputDevice_BSDCAPTURE();
+ ~PVideoInputDevice_BSDCAPTURE();
+
+- static PStringList GetInputDeviceNames();
+-
+- PStringList GetDeviceNames() const
+- { return GetInputDeviceNames(); }
+-
+- BOOL Open(const PString &deviceName, BOOL startImmediate);
++ BOOL Open(
++ const PString &deviceName,
++ BOOL startImmediate = TRUE
++ );
+
+ BOOL IsOpen();
+
+@@ -43,11 +58,24 @@
+
+ BOOL IsCapturing();
+
++ static PStringList GetInputDeviceNames();
++
++ PStringList GetDeviceNames() const
++ { return GetInputDeviceNames(); }
++
+ PINDEX GetMaxFrameBytes();
+
+- BOOL GetFrame(PBYTEArray & frame);
+- BOOL GetFrameData(BYTE*, PINDEX*);
+- BOOL GetFrameDataNoDelay(BYTE*, PINDEX*);
++// BOOL GetFrame(
++// PBYTEArray & frame
++// );
++ BOOL GetFrameData(
++ BYTE * buffer,
++ PINDEX * bytesReturned = NULL
++ );
++ BOOL GetFrameDataNoDelay(
++ BYTE * buffer,
++ PINDEX * bytesReturned = NULL
++ );
+
+ BOOL GetFrameSizeLimits(unsigned int&, unsigned int&,
+ unsigned int&, unsigned int&);
+@@ -99,3 +127,5 @@
+ int mmap_size;
+
+ };
++
++#endif
Index: files/patch-plugins::vidinput_dc::Makefile.in
===================================================================
RCS file: files/patch-plugins::vidinput_dc::Makefile.in
diff -N files/patch-plugins::vidinput_dc::Makefile.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-plugins::vidinput_dc::Makefile.in 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,11 @@
+--- plugins/vidinput_dc/Makefile.in.orig Thu Apr 6 17:01:27 2006
++++ plugins/vidinput_dc/Makefile.in Thu Apr 6 17:01:38 2006
+@@ -4,7 +4,7 @@
+
+ PLUGIN_NAME = dc
+ PLUGIN_FAMILY = device/videoinput
+-PLUGIN_LIBS = -lraw1394 -ldv -ldc1394_control
++PLUGIN_LIBS = $(LDFLAGS) -lraw1394 -ldv -ldc1394_control
+ PLUGIN_SOURCES = video4dc1394.cxx
+
+ CFLAGS = @DC_CFLAGS@
Index: files/patch-src::ptlib::unix::udll.cxx
===================================================================
RCS file: files/patch-src::ptlib::unix::udll.cxx
diff -N files/patch-src::ptlib::unix::udll.cxx
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-src::ptlib::unix::udll.cxx 6 Apr 2006 16:52:39 -0000
@@ -0,0 +1,13 @@
+--- src/ptlib/unix/udll.cxx.orig Wed Nov 30 13:47:42 2005
++++ src/ptlib/unix/udll.cxx Wed Apr 5 22:36:51 2006
+@@ -382,6 +382,10 @@
+ dllHandle = dlopen((char *)(const char *)name, RTLD_NOW);
+ #else
++ const char *dummyerr = dlerror();
+ dllHandle = dlopen((const char *)name, RTLD_NOW);
++ const char *err = dlerror();
++ if (err != NULL)
++ cerr << err << '\n';
+ #endif
+
+ return IsLoaded();
--- devel_pwlib.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list