2007-09-04 Doug Scott <[email protected]>
authordrdoug007
Tue, 04 Sep 2007 07:22:46 +0000
changeset 445 8739b4d845c1
parent 444 df90a02b2e3d
child 446 6c4d4de60f5e
2007-09-04 Doug Scott <[email protected]> * SFElibraw1394.spec: *NEW* Interface to IEEE-1394 subsystem - requires raw1394 driver for Solaris (in progress) * SFEdvgrab.spec: *NEW* DV grabbing utility * SFElibavc1394.spec: *NEW* interface to the 1394 AV/C specification * SFElibiec61883.spec: *NEW* Streaming library for IEEE1394 * SFEdocbook-utils.spec: Fixed typo * base-specs/libraw1394.spec: base spec * base-specs/libiec61883.spec: base spec * base-specs/dvgrab.spec: base spec * base-specs/libavc1394.spec: base spec * patches/dvgrab-04-sunpro.diff: Sun Studio patch * patches/libraw1394-01-configure.diff: configure patch * patches/libavc1394-01-wall.diff: remove -Wall * patches/dvgrab-02-v4l2.diff: patch for Solaris v4l2 * patches/libraw1394-02-u_int.diff: add u_intX_t types * patches/dvgrab-03-u_int.diff: add u_intX_t types * patches/dvgrab-01-configure.diff: configure patch * patches/libraw1394-04-eremoteio.diff: change EREMOTEIO to EIO * patches/dvgrab-06-return.diff: add return * patches/libiec61883-01-function.diff: Change __FUNCTION__ to __func__ * patches/libraw1394-03-kernel.diff: Initial raw1394 port defns * patches/libiec61883-02-struct.diff: gccism * patches/dvgrab-05-strsep.diff: Add strsep function * include/byteswap-compat.h: Fix Sun CXX asm issues
ChangeLog
SFEdocbook-utils.spec
SFEdvgrab.spec
SFElibavc1394.spec
SFElibiec61883.spec
SFElibraw1394.spec
base-specs/dvgrab.spec
base-specs/libavc1394.spec
base-specs/libiec61883.spec
base-specs/libraw1394.spec
include/byteswap-compat.h
patches/dvgrab-01-configure.diff
patches/dvgrab-02-v4l2.diff
patches/dvgrab-03-u_int.diff
patches/dvgrab-04-sunpro.diff
patches/dvgrab-05-strsep.diff
patches/dvgrab-06-return.diff
patches/libavc1394-01-wall.diff
patches/libiec61883-01-function.diff
patches/libiec61883-02-struct.diff
patches/libraw1394-01-configure.diff
patches/libraw1394-02-u_int.diff
patches/libraw1394-03-kernel.diff
patches/libraw1394-04-eremoteio.diff
--- a/ChangeLog	Mon Sep 03 22:28:16 2007 +0000
+++ b/ChangeLog	Tue Sep 04 07:22:46 2007 +0000
@@ -1,3 +1,30 @@
+2007-09-04  Doug Scott  <[email protected]>
+
+	* SFElibraw1394.spec: *NEW* Interface to IEEE-1394 subsystem
+	   - requires raw1394 driver for Solaris (in progress)
+	* SFEdvgrab.spec: *NEW*	DV grabbing utility
+	* SFElibavc1394.spec: *NEW* interface to the 1394 AV/C specification
+	* SFElibiec61883.spec: *NEW* Streaming library for IEEE1394
+	* SFEdocbook-utils.spec: Fixed typo
+	* base-specs/libraw1394.spec: base spec
+	* base-specs/libiec61883.spec: base spec
+	* base-specs/dvgrab.spec: base spec
+	* base-specs/libavc1394.spec: base spec
+	* patches/dvgrab-04-sunpro.diff: Sun Studio patch
+	* patches/libraw1394-01-configure.diff: configure patch
+	* patches/libavc1394-01-wall.diff: remove -Wall
+	* patches/dvgrab-02-v4l2.diff: patch for Solaris v4l2
+	* patches/libraw1394-02-u_int.diff: add u_intX_t types
+	* patches/dvgrab-03-u_int.diff: add u_intX_t types
+	* patches/dvgrab-01-configure.diff: configure patch
+	* patches/libraw1394-04-eremoteio.diff: change EREMOTEIO to EIO
+	* patches/dvgrab-06-return.diff: add return
+	* patches/libiec61883-01-function.diff: Change __FUNCTION__ to __func__
+	* patches/libraw1394-03-kernel.diff: Initial raw1394 port defns
+	* patches/libiec61883-02-struct.diff: gccism
+	* patches/dvgrab-05-strsep.diff: Add strsep function
+	* include/byteswap-compat.h: Fix Sun CXX asm issues
+
 2007-09-03  Albert Lee  <[email protected]>
 
 	* SFEmonodevelop.spec: Bump to 0.15, add patch2
--- a/SFEdocbook-utils.spec	Mon Sep 03 22:28:16 2007 +0000
+++ b/SFEdocbook-utils.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -17,7 +17,7 @@
 BuildRoot:           %{_tmppath}/%{name}-%{version}-build
 %include default-depend.inc
 BuildRequires: SUNWopenjade
-Requires: SFEperl-SGMLSpm
+Requires: SFEperl-SGMLpm
 
 %prep
 %setup -q -n %{src_name}-%version
@@ -61,5 +61,7 @@
 %{_mandir}
 
 %changelog
+* Tue Sep  4 2007 - [email protected]
+- Fixed typo
 * Fri Jul 27 2007 - [email protected]
 - Initial spec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEdvgrab.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,76 @@
+#
+# spec file for package SFEdvgrab
+#
+# includes module(s): dvgrab
+#
+%include Solaris.inc
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use dvgrab64 = dvgrab.spec
+%endif
+
+%include base.inc
+%use dvgrab = dvgrab.spec
+
+Name:		SFEdvgrab
+Summary:	%{dvgrab.summary}
+Version:	%{dvgrab.version}
+SUNW_BaseDir:	%{_basedir}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+BuildRequires: SFElibiec61883-devel
+Requires: SFElibiec61883
+BuildRequires: SFElibraw1394-devel
+Requires: SFElibraw1394
+BuildRequires: SFElibdv-devel
+Requires: SFElibdv
+
+%package devel
+Summary:         %{summary} - development files
+SUNW_BaseDir:    %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+%ifarch amd64 sparcv9
+mkdir %name-%version/%_arch64
+%dvgrab64.prep -d %name-%version/%_arch64
+%endif
+
+mkdir %name-%version/%{base_arch}
+%dvgrab.prep -d %name-%version/%{base_arch}
+
+%build
+%ifarch amd64 sparcv9
+%dvgrab64.build -d %name-%version/%_arch64
+%endif
+
+%dvgrab.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifarch amd64 sparcv9
+%dvgrab64.install -d %name-%version/%_arch64
+%endif
+
+%dvgrab.install -d %name-%version/%{base_arch}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/dvgrab
+%dir %attr (0755, root, sys) %{_datadir}
+%{_mandir}
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
+%{_bindir}/%{_arch64}/dvgrab
+%endif
+
+%changelog
+* Thu Sep  4 2007 - [email protected]
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFElibavc1394.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,92 @@
+#
+# spec file for package SFElibavc1394
+#
+# includes module(s): libavc1394
+#
+%include Solaris.inc
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use libavc139464 = libavc1394.spec
+%endif
+
+%include base.inc
+%use libavc1394 = libavc1394.spec
+
+Name:		SFElibavc1394
+Summary:	%{libavc1394.summary}
+Version:	%{libavc1394.version}
+SUNW_BaseDir:	%{_basedir}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+BuildRequires: SFElibraw1394-devel
+Requires: SFElibraw1394
+
+%package devel
+Summary:         %{summary} - development files
+SUNW_BaseDir:    %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+%ifarch amd64 sparcv9
+mkdir %name-%version/%_arch64
+%libavc139464.prep -d %name-%version/%_arch64
+%endif
+
+mkdir %name-%version/%{base_arch}
+%libavc1394.prep -d %name-%version/%{base_arch}
+
+%build
+%ifarch amd64 sparcv9
+%libavc139464.build -d %name-%version/%_arch64
+%endif
+
+%libavc1394.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifarch amd64 sparcv9
+%libavc139464.install -d %name-%version/%_arch64
+%endif
+
+%libavc1394.install -d %name-%version/%{base_arch}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/dvcont
+%{_bindir}/mkrfc2734
+%{_bindir}/panelctl
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+%dir %attr (0755, root, sys) %{_datadir}
+%{_mandir}
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
+%{_bindir}/%{_arch64}/dvcont
+%{_bindir}/%{_arch64}/mkrfc2734
+%{_bindir}/%{_arch64}/panelctl
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%{_libdir}/%{_arch64}/lib*.so*
+%endif
+
+%files devel
+%defattr (-, root, bin)
+%{_includedir}
+%dir %attr (0755, root, bin) %{_libdir}
+%dir %attr (0755, root, other) %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
+%{_libdir}/%{_arch64}/pkgconfig/*
+%endif
+
+%changelog
+* Thu Sep  4 2007 - [email protected]
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFElibiec61883.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,90 @@
+#
+# spec file for package SFElibiec61883
+#
+# includes module(s): libiec61883
+#
+%include Solaris.inc
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use libiec6188364 = libiec61883.spec
+%endif
+
+%include base.inc
+%use libiec61883 = libiec61883.spec
+
+Name:		SFElibiec61883
+Summary:	%{libiec61883.summary}
+Version:	%{libiec61883.version}
+SUNW_BaseDir:	%{_basedir}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+BuildRequires: SFElibraw1394-devel
+Requires: SFElibraw1394
+
+%package devel
+Summary:         %{summary} - development files
+SUNW_BaseDir:    %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+%ifarch amd64 sparcv9
+mkdir %name-%version/%_arch64
+%libiec6188364.prep -d %name-%version/%_arch64
+%endif
+
+mkdir %name-%version/%{base_arch}
+%libiec61883.prep -d %name-%version/%{base_arch}
+
+%build
+%ifarch amd64 sparcv9
+%libiec6188364.build -d %name-%version/%_arch64
+%endif
+
+%libiec61883.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifarch amd64 sparcv9
+%libiec6188364.install -d %name-%version/%_arch64
+%endif
+
+%libiec61883.install -d %name-%version/%{base_arch}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/plugctl
+%{_bindir}/plugreport
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+%dir %attr (0755, root, sys) %{_datadir}
+%{_mandir}
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
+%{_bindir}/%{_arch64}/plugctl
+%{_bindir}/%{_arch64}/plugreport
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%{_libdir}/%{_arch64}/lib*.so*
+%endif
+
+%files devel
+%defattr (-, root, bin)
+%{_includedir}
+%dir %attr (0755, root, bin) %{_libdir}
+%dir %attr (0755, root, other) %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
+%{_libdir}/%{_arch64}/pkgconfig/*
+%endif
+
+%changelog
+* Thu Sep  4 2007 - [email protected]
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SFElibraw1394.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,90 @@
+#
+# spec file for package SFElibraw1394
+#
+# includes module(s): libraw1394
+#
+%include Solaris.inc
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use libraw139464 = libraw1394.spec
+%endif
+
+%include base.inc
+%use libraw1394 = libraw1394.spec
+
+Name:		SFElibraw1394
+Summary:	%{libraw1394.summary}
+Version:	%{libraw1394.version}
+SUNW_BaseDir:	%{_basedir}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+%package devel
+Summary:         %{summary} - development files
+SUNW_BaseDir:    %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+%ifarch amd64 sparcv9
+mkdir %name-%version/%_arch64
+%libraw139464.prep -d %name-%version/%_arch64
+%endif
+
+mkdir %name-%version/%{base_arch}
+%libraw1394.prep -d %name-%version/%{base_arch}
+
+%build
+%ifarch amd64 sparcv9
+%libraw139464.build -d %name-%version/%_arch64
+%endif
+
+%libraw1394.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifarch amd64 sparcv9
+%libraw139464.install -d %name-%version/%_arch64
+%endif
+
+%libraw1394.install -d %name-%version/%{base_arch}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/dumpiso
+%{_bindir}/sendiso
+%{_bindir}/testlibraw
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+%dir %attr (0755, root, sys) %{_datadir}
+%{_mandir}
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_bindir}/%{_arch64}
+%{_bindir}/%{_arch64}/dumpiso
+%{_bindir}/%{_arch64}/sendiso
+%{_bindir}/%{_arch64}/testlibraw
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%{_libdir}/%{_arch64}/lib*.so*
+%endif
+
+%files devel
+%defattr (-, root, bin)
+%{_includedir}
+%dir %attr (0755, root, bin) %{_libdir}
+%dir %attr (0755, root, other) %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
+%{_libdir}/%{_arch64}/pkgconfig/*
+%endif
+
+%changelog
+* Tue Sep  4 2007 - [email protected]
+- Initial version
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/dvgrab.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,83 @@
+#
+# spec file for package dvgrab
+#
+# includes module(s): dvgrab
+#
+
+%define src_ver 3.0
+%define src_name dvgrab
+%define src_url http://dl.sourceforge.net/sourceforge/kino
+
+Name:		dvgrab
+Summary:	DV grabbing utility
+Version:	%{src_ver}
+Source:		%{src_url}/%{src_name}-%{version}.tar.gz
+Source1:        byteswap-compat.h
+Source2:        endian-compat.h
+Patch1:		dvgrab-01-configure.diff
+Patch2:		dvgrab-02-v4l2.diff
+Patch3:		dvgrab-03-u_int.diff
+Patch4:		dvgrab-04-sunpro.diff
+Patch5:		dvgrab-05-strsep.diff
+Patch6:		dvgrab-06-return.diff
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+#%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+cp %SOURCE1 byteswap.h
+cp %SOURCE2 endian.h
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+export CPPFLAGS="-D__ASSERT_FUNCTION=__FUNCTION__"
+export CC=gcc
+export CFLAGS="-O4 -fPIC"
+export CXX=g++
+export CXXFLAGS="-O4 -fPIC"
+export LDFLAGS="%_ldflags"
+
+if $( echo "%{_libdir}" | /usr/xpg4/bin/grep -q %{_arch64} ) ; then
+        export CFLAGS="$CFLAGS -m64"
+        export CXXFLAGS="$CXXFLAGS -m64"
+        export LDFLAGS="-Wl,-64 -L%{_libdir} -R%{_libdir} $LDFLAGS"
+fi
+
+
+libtoolize -f -c
+aclocal
+autoheader
+autoconf -f
+automake -a -f
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --libexecdir=%{_libexecdir}	\
+            --sysconfdir=%{_sysconfdir}	\
+            --enable-shared		\
+	    --disable-static
+
+#perl -pi -e 's,-shared,-Wl,-G' libtool
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Tue Sep  4 2007 - [email protected]
+- Initial base spec file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/libavc1394.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,62 @@
+#
+# spec file for package libavc1394
+#
+# includes module(s): libavc1394
+#
+
+%define src_ver 0.5.3
+%define src_name libavc1394
+%define src_url http://nchc.dl.sourceforge.net/sourceforge/%{src_name}
+
+Name:		libavc1394
+Summary:	Programming interface to the 1394 AV/C specification
+Version:	%{src_ver}
+Source:		%{src_url}/%{src_name}-%{version}.tar.gz
+Patch1:		libavc1394-01-wall.diff
+Source1:	byteswap-compat.h
+Source2:	endian-compat.h
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+#cp %SOURCE1 src/byteswap.h
+#cp %SOURCE2 src/endian.h
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags"
+
+libtoolize -f -c
+aclocal
+autoheader
+autoconf -f
+automake -a -f
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --libexecdir=%{_libexecdir}	\
+            --sysconfdir=%{_sysconfdir}	\
+            --enable-shared		\
+	    --disable-static
+
+#perl -pi -e 's,-shared,-Wl,-G' libtool
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Tue Sep  4 2007 - [email protected]
+- Initial base spec file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/libiec61883.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,65 @@
+#
+# spec file for package libiec61883
+#
+# includes module(s): libiec61883
+#
+
+%define src_ver 1.1.0
+%define src_name libiec61883
+%define src_url http://www.linux1394.org/dl
+
+Name:		libiec61883
+Summary:	Streaming library for IEEE1394
+Version:	%{src_ver}
+Source:		%{src_url}/%{src_name}-%{version}.tar.gz
+Source1:	byteswap-compat.h
+Source2:	endian-compat.h
+Patch1:		libiec61883-01-function.diff
+Patch2:		libiec61883-02-struct.diff
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+%patch2 -p1
+cp %SOURCE1 src/byteswap.h
+cp %SOURCE2 src/endian.h
+cp %SOURCE2 examples/endian.h
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags"
+
+libtoolize -f -c
+aclocal
+autoheader
+autoconf -f
+automake -a -f
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --libexecdir=%{_libexecdir}	\
+            --sysconfdir=%{_sysconfdir}	\
+            --enable-shared		\
+	    --disable-static
+
+#perl -pi -e 's,-shared,-Wl,-G' libtool
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Tue Sep  4 2007 - [email protected]
+- Initial base spec file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/libraw1394.spec	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,70 @@
+#
+# spec file for package libraw1394
+#
+# includes module(s): libraw1394
+#
+
+%define src_ver 1.2.1
+%define src_name libraw1394
+%define src_url http://www.linux1394.org/dl
+
+Name:		libraw1394
+Summary:	Interface to IEEE-1394 subsystem
+Version:	%{src_ver}
+Source:		%{src_url}/%{src_name}-%{version}.tar.gz
+Source1:	byteswap-compat.h
+Source2:	endian-compat.h
+Patch1:		libraw1394-01-configure.diff
+Patch2:		libraw1394-02-u_int.diff
+# Solaris raw1394 driver not yet written
+Patch3:		libraw1394-03-kernel.diff
+Patch4:		libraw1394-04-eremoteio.diff
+BuildRoot:	%{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+cp %SOURCE1 src/byteswap.h
+cp %SOURCE2 src/endian.h
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+    CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags"
+
+libtoolize -f -c
+aclocal
+autoheader
+autoconf -f
+automake -a -f
+
+./configure --prefix=%{_prefix}		\
+	    --bindir=%{_bindir}		\
+	    --mandir=%{_mandir}		\
+            --libdir=%{_libdir}		\
+            --libexecdir=%{_libexecdir}	\
+            --sysconfdir=%{_sysconfdir}	\
+            --enable-shared		\
+	    --disable-static
+
+#perl -pi -e 's,-shared,-Wl,-G' libtool
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.*a
+rm -f $RPM_BUILD_ROOT%{_libdir}/libraw1394/lib*.*a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Tue Sep  4 2007 - [email protected]
+- Initial base spec file
--- a/include/byteswap-compat.h	Mon Sep 03 22:28:16 2007 +0000
+++ b/include/byteswap-compat.h	Tue Sep 04 07:22:46 2007 +0000
@@ -31,7 +31,7 @@
 
 static inline uint16_t bswap_16(uint16_t x)
 {
-#if defined(__i386)
+#if defined(__i386) && !defined(__SUNPRO_CC)
   __asm("rorw $8, %0"   :
         LEGACY_REGS (x) :
         "0" (x));
@@ -43,7 +43,7 @@
 
 static inline uint32_t bswap_32(uint32_t x)
 {
-#if defined(__i386)
+#if defined(__i386) && !defined(__SUNPRO_CC)
 #if __CPU__ != 386
  __asm("bswap   %0":
       "=r" (x)     :
@@ -67,7 +67,7 @@
     x= ((x<< 8)&0xFF00FF00FF00FF00ULL) | ((x>> 8)&0x00FF00FF00FF00FFULL);
     x= ((x<<16)&0xFFFF0000FFFF0000ULL) | ((x>>16)&0x0000FFFF0000FFFFULL);
     return (x>>32) | (x<<32);
-#elif defined(__amd64)
+#elif defined(__amd64) && !defined(__SUNPRO_CC)
   __asm("bswap  %0":
         "=r" (x)   :
         "0" (x));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-01-configure.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,45 @@
+diff -ur dvgrab-3.0.orig/configure.in dvgrab-3.0/configure.in
+--- dvgrab-3.0.orig/configure.in	2007-08-07 09:51:47.000000000 +0700
++++ dvgrab-3.0/configure.in	2007-09-04 11:06:22.749719100 +0700
+@@ -15,7 +15,28 @@
+ 
+ dnl Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(fcntl.h unistd.h stdio.h)
++AC_CHECK_HEADERS(fcntl.h unistd.h stdio.h sys/types.h inttypes.h sys/ioccom.h)
++
++AC_MSG_CHECKING([if inttypes has u_int32_t etc])
++AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++        [[
++#if HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#if HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++#if HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++        ]],[[
++    u_int32_t  s;
++    sleep((unsigned int)s);
++        ]]
++    )],
++    [AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define to 1 if have u_int32_t types etc])
++    AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
+ 
+ dnl Checks for libraries.
+ 
+@@ -86,6 +107,11 @@
+ 	AC_WARN(V4L2 headers missing; install linux 2.6 headers to use USB.)
+ ])
+ 
++AC_CHECK_HEADERS(sys/videodev2.h,,
++[
++	AC_WARN(V4L2 headers missing.)
++])
++
+ 
+ # EFENCE
+ AC_ARG_WITH(efence,[  --with-efence        Use ElectricFence for debugging support.],
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-02-v4l2.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,48 @@
+diff -ur dvgrab-3.0.orig/v4l2reader.cc dvgrab-3.0/v4l2reader.cc
+--- dvgrab-3.0.orig/v4l2reader.cc	2007-08-07 09:51:47.000000000 +0700
++++ dvgrab-3.0/v4l2reader.cc	2007-09-04 13:53:45.183579886 +0700
+@@ -20,7 +20,7 @@
+ 
+ #include "v4l2reader.h"
+ 
+-#ifdef HAVE_LINUX_VIDEODEV2_H
++#if defined(HAVE_LINUX_VIDEODEV2_H) || defined(HAVE_SYS_VIDEODEV2_H)
+ 
+ #include <string>
+ 
+@@ -31,9 +31,23 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#if defined(HAVE_ASM_TYPES_H)
+ #include <asm/types.h>
++#endif
++#if defined(HAVE_INTTYPES_H)
++#include <inttypes.h>
++#endif
++#if defined(HAVE_SYS_IOCCOM_H)
++#include <sys/ioccom.h>
++#endif
+ #include <sys/mman.h>
++#if defined(HAVE_LINUX_VIDEODEV2_H)
+ #include <linux/videodev2.h>
++#elif defined(HAVE_SYS_VIDEODEV2_H)
++#include <sys/videodev2.h>
++#else
++#error "No videodev2.h found. You may have problems"
++#endif
+ #include <assert.h>
+ #include <poll.h>
+ 
+diff -ur dvgrab-3.0.orig/v4l2reader.h dvgrab-3.0/v4l2reader.h
+--- dvgrab-3.0.orig/v4l2reader.h	2007-08-07 09:51:47.000000000 +0700
++++ dvgrab-3.0/v4l2reader.h	2007-09-04 13:53:45.183631955 +0700
+@@ -23,7 +23,7 @@
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-#ifdef HAVE_LINUX_VIDEODEV2_H
++#if defined(HAVE_LINUX_VIDEODEV2_H) || defined(HAVE_SYS_VIDEODEV2_H)
+ 
+ #include "ieee1394io.h"
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-03-u_int.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,20 @@
+diff -ur dvgrab-3.0.orig/endian_types.h dvgrab-3.0/endian_types.h
+--- dvgrab-3.0.orig/endian_types.h	2005-04-18 21:24:48.000000000 +0700
++++ dvgrab-3.0/endian_types.h	2007-09-04 11:02:24.105387990 +0700
+@@ -39,6 +39,16 @@
+ #include <sys/types.h>
+ #include <byteswap.h>
+ 
++#ifdef HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++#ifndef HAVE_U_INT_TYPES
++typedef uint8_t u_int8_t;
++typedef uint16_t u_int16_t;
++typedef uint32_t u_int32_t;
++typedef uint64_t u_int64_t;
++#endif
++
+ static inline int8_t bswap(const int8_t& x)
+ {
+ 	return x;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-04-sunpro.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,822 @@
+diff -ur dvgrab-3.0.orig/avi.cc dvgrab-3.0/avi.cc
+--- dvgrab-3.0.orig/avi.cc	2007-07-07 01:47:26.000000000 +0700
++++ dvgrab-3.0/avi.cc	2007-09-04 13:10:15.407408980 +0700
+@@ -341,8 +341,8 @@
+ 		int frameNumIndex = 0;
+ 		for ( int i = 0; i < idx1->nEntriesInUse; ++i )
+ 		{
+-			FOURCC chunkID1 = make_fourcc( "00dc" );
+-			FOURCC chunkID2 = make_fourcc( "00db" );
++			FOURCC chunkID1 = make_fourcc((char *)"00dc" );
++			FOURCC chunkID2 = make_fourcc((char *)"00db" );
+ 			if ( idx1->aIndex[ i ].dwChunkId == chunkID1 ||
+ 			        idx1->aIndex[ i ].dwChunkId == chunkID2 )
+ 			{
+@@ -418,9 +418,9 @@
+ 
+ void AVIFile::PrintDirectoryEntryData( const RIFFDirEntry &entry )
+ {
+-	static FOURCC lastStreamType = make_fourcc( "    " );
++	static FOURCC lastStreamType = make_fourcc((char *)"    " );
+ 
+-	if ( entry.type == make_fourcc( "avih" ) )
++	if ( entry.type == make_fourcc((char *)"avih" ) )
+ 	{
+ 
+ 		int i;
+@@ -443,7 +443,7 @@
+ 			cout << "    dwReserved[" << i << "]:        " << ( int ) main_avi_header.dwReserved[ i ] << endl;
+ 
+ 	}
+-	else if ( entry.type == make_fourcc( "strh" ) )
++	else if ( entry.type == make_fourcc((char *)"strh" ) )
+ 	{
+ 
+ 		AVIStreamHeader	avi_stream_header;
+@@ -476,7 +476,7 @@
+ 		<< "    dwSampleSize:    " << ( int ) avi_stream_header.dwSampleSize << endl;
+ 
+ 	}
+-	else if ( entry.type == make_fourcc( "indx" ) )
++	else if ( entry.type == make_fourcc((char *)"indx" ) )
+ 	{
+ 
+ 		int i;
+@@ -507,9 +507,9 @@
+ 			<< "       dwDuration  : " << dec << avi_super_index.aIndex[ i ].dwDuration << endl;
+ 		}
+ 	}
+-	else if ( entry.type == make_fourcc( "strf" ) )
++	else if ( entry.type == make_fourcc((char *)"strf" ) )
+ 	{
+-		if ( lastStreamType == make_fourcc( "auds" ) )
++		if ( lastStreamType == make_fourcc((char *)"auds" ) )
+ 		{
+ 			WAVEFORMATEX waveformatex;
+ 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
+@@ -522,7 +522,7 @@
+ 			cout << "    waveformatex.wBitsPerSample : " << waveformatex.wBitsPerSample << endl;
+ 			cout << "    waveformatex.cbSize         : " << waveformatex.cbSize << endl;
+ 		}
+-		else if ( lastStreamType == make_fourcc( "vids" ) )
++		else if ( lastStreamType == make_fourcc((char *)"vids" ) )
+ 		{
+ 			BITMAPINFOHEADER bitmapinfo;
+ 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
+@@ -539,7 +539,7 @@
+ 			cout << "    bitmapinfo.biClrUsed      : " << bitmapinfo.biClrUsed << endl;
+ 			cout << "    bitmapinfo.biClrImportant : " << bitmapinfo.biClrImportant << endl;
+ 		}
+-		else if ( lastStreamType == make_fourcc( "iavs" ) )
++		else if ( lastStreamType == make_fourcc((char *)"iavs" ) )
+ 		{
+ 			DVINFO dvinfo;
+ 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
+@@ -556,7 +556,7 @@
+ 	/* This is the Standard Index. It is an array of offsets and
+ 	   sizes relative to some start offset. */
+ 
+-	else if ( ( entry.type == make_fourcc( "ix00" ) ) || ( entry.type == make_fourcc( "ix01" ) ) )
++	else if ( ( entry.type == make_fourcc((char *)"ix00" ) ) || ( entry.type == make_fourcc((char *)"ix01" ) ) )
+ 	{
+ 
+ 		int i;
+@@ -587,13 +587,13 @@
+ 		}
+ 
+ 	}
+-	else if ( entry.type == make_fourcc( "idx1" ) )
++	else if ( entry.type == make_fourcc((char *)"idx1" ) )
+ 	{
+ 
+ 		int i;
+ 		int numEntries = entry.length / sizeof( int ) / 4;
+ 		DWORD *idx1 = new DWORD[ numEntries * 4 ];
+-		// FOURCC movi_list = FindDirectoryEntry(make_fourcc("movi"));
++		// FOURCC movi_list = FindDirectoryEntry(make_fourcc((char *)"movi"));
+ 
+ 		fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
+ 		fail_neg( read( fd, idx1, entry.length ) );
+@@ -615,7 +615,7 @@
+ 
+ 		delete[] idx1;
+ 	}
+-	else if ( entry.type == make_fourcc( "dmlh" ) )
++	else if ( entry.type == make_fourcc((char *)"dmlh" ) )
+ 	{
+ 		int i;
+ 		int numEntries = entry.length / sizeof( int );
+@@ -664,7 +664,7 @@
+ 	/* if we encounter a movi list, do not read it. It takes too much time
+ 	   and we don't need it anyway. */
+ 
+-	if ( name != make_fourcc( "movi" ) )
++	if ( name != make_fourcc((char *)"movi" ) )
+ 	{
+ 		//    if (1) {
+ 
+@@ -698,7 +698,7 @@
+ {
+ 	RIFFFile::ParseRIFF();
+ 
+-	avih_chunk = FindDirectoryEntry( make_fourcc( "avih" ) );
++	avih_chunk = FindDirectoryEntry( make_fourcc((char *)"avih" ) );
+ 	if ( avih_chunk != -1 )
+ 		ReadChunk( avih_chunk, ( void* ) & mainHdr );
+ }
+@@ -706,7 +706,7 @@
+ 
+ void AVIFile::ReadIndex()
+ {
+-	indx_chunk[ 0 ] = FindDirectoryEntry( make_fourcc( "indx" ) );
++	indx_chunk[ 0 ] = FindDirectoryEntry( make_fourcc((char *)"indx" ) );
+ 	if ( indx_chunk[ 0 ] != -1 )
+ 	{
+ 		ReadChunk( indx_chunk[ 0 ], ( void* ) indx[ 0 ] );
+@@ -720,7 +720,7 @@
+ 			;
+ 		return ;
+ 	}
+-	idx1_chunk = FindDirectoryEntry( make_fourcc( "idx1" ) );
++	idx1_chunk = FindDirectoryEntry( make_fourcc((char *)"idx1" ) );
+ 	if ( idx1_chunk != -1 )
+ 	{
+ 		ReadChunk( idx1_chunk, ( void* ) idx1 );
+@@ -729,8 +729,8 @@
+ 
+ 		/* recalc number of frames from the simple index */
+ 		int frameNumIndex = 0;
+-		FOURCC chunkID1 = make_fourcc( "00dc" );
+-		FOURCC chunkID2 = make_fourcc( "00db" );
++		FOURCC chunkID1 = make_fourcc((char *)"00dc" );
++		FOURCC chunkID2 = make_fourcc((char *)"00db" );
+ 		for ( int i = 0; i < idx1->nEntriesInUse; ++i )
+ 		{
+ 			if ( idx1->aIndex[ i ].dwChunkId == chunkID1 ||
+@@ -766,9 +766,9 @@
+ 	/* make a new ix chunk. */
+ 
+ 	if ( stream == 0 )
+-		type = make_fourcc( "ix00" );
++		type = make_fourcc((char *)"ix00" );
+ 	else
+-		type = make_fourcc( "ix01" );
++		type = make_fourcc((char *)"ix01" );
+ 	ix_chunk[ stream ] = AddDirectoryEntry( type, 0, sizeof( AVIStdIndex ), movi_list );
+ 	GetDirectoryEntry( ix_chunk[ stream ], type, name, length, offset, parent );
+ 
+@@ -853,8 +853,8 @@
+ 	int i, j = 0;
+ 	AVIStreamHeader	avi_stream_header;
+ 	BITMAPINFOHEADER bih;
+-	FOURCC strh = make_fourcc( "strh" );
+-	FOURCC strf = make_fourcc( "strf" );
++	FOURCC strh = make_fourcc((char *)"strh" );
++	FOURCC strf = make_fourcc((char *)"strf" );
+ 
+ 	while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
+ 	{
+@@ -877,7 +877,7 @@
+ {
+ 	int i, j = 0;
+ 	AVIStreamHeader	avi_stream_header;
+-	FOURCC strh = make_fourcc( "strh" );
++	FOURCC strh = make_fourcc((char *)"strh" );
+ 
+ 	while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
+ 	{
+@@ -891,7 +891,7 @@
+ bool AVIFile::isOpenDML( void )
+ {
+ 	int i, j = 0;
+-	FOURCC dmlh = make_fourcc( "dmlh" );
++	FOURCC dmlh = make_fourcc((char *)"dmlh" );
+ 
+ 	while ( ( i = FindDirectoryEntry( dmlh, j++ ) ) != -1 )
+ 	{
+@@ -1000,12 +1000,12 @@
+ 		break;
+ 	}
+ 
+-	indx[ 0 ] ->dwChunkId = make_fourcc( "00__" );
++	indx[ 0 ] ->dwChunkId = make_fourcc((char *)"00__" );
+ 
+ 	/* Initialize the 'strh' chunk */
+ 
+-	streamHdr[ 0 ].fccType = make_fourcc( "iavs" );
+-	streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
++	streamHdr[ 0 ].fccType = make_fourcc((char *)"iavs" );
++	streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
+ 	streamHdr[ 0 ].dwFlags = 0;
+ 	streamHdr[ 0 ].wPriority = 0;
+ 	streamHdr[ 0 ].wLanguage = 0;
+@@ -1046,29 +1046,29 @@
+ 
+ 	/* Create the container directory entry */
+ 
+-	file_list = AddDirectoryEntry( make_fourcc( "FILE" ), make_fourcc( "FILE" ), 0, RIFF_NO_PARENT );
++	file_list = AddDirectoryEntry( make_fourcc((char *)"FILE" ), make_fourcc((char *)"FILE" ), 0, RIFF_NO_PARENT );
+ 
+ 	/* Create a basic directory structure. Only chunks defined from here on will be written to the AVI file. */
+ 
+-	riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVI " ), RIFF_LISTSIZE, file_list );
+-	hdrl_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "hdrl" ), RIFF_LISTSIZE, riff_list );
+-	avih_chunk = AddDirectoryEntry( make_fourcc( "avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
+-	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
+-	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
+-	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( dvinfo ), strl_list[ 0 ] );
++	riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVI " ), RIFF_LISTSIZE, file_list );
++	hdrl_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"hdrl" ), RIFF_LISTSIZE, riff_list );
++	avih_chunk = AddDirectoryEntry( make_fourcc((char *)"avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
++	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
++	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
++	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( dvinfo ), strl_list[ 0 ] );
+ 	if ( index_type & AVI_LARGE_INDEX )
+-		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
++		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
+ 
+-	odml_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "odml" ), RIFF_LISTSIZE, hdrl_list );
+-	dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
++	odml_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"odml" ), RIFF_LISTSIZE, hdrl_list );
++	dmlh_chunk = AddDirectoryEntry( make_fourcc((char *)"dmlh" ), 0, 0x00f8, odml_list );
+ 
+ 	/* align movi list to block */
+ 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
+ 	num_blocks = length / PADDING_SIZE + 1;
+ 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5?
+-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
++	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
+ 
+-	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
++	movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
+ 
+ 	/* The ix00 chunk will be added dynamically to the movi_list in avi_write_frame
+ 	          as needed */
+@@ -1108,7 +1108,7 @@
+ 	   frame, then add a JUNK chunk which is sized such that we
+ 	   end up on a 512 bytes boundary. */
+ 
+-	frame_chunk = AddDirectoryEntry( make_fourcc( "00__" ), 0, frame->GetDataLen(), movi_list );
++	frame_chunk = AddDirectoryEntry( make_fourcc((char *)"00__" ), 0, frame->GetDataLen(), movi_list );
+ 	if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
+ 	{
+ 		GetDirectoryEntry( frame_chunk, type, name, length, offset, parent );
+@@ -1117,7 +1117,7 @@
+ 	WriteChunk( frame_chunk, frame->data );
+ 	//    num_blocks = (frame->GetDataLen() + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
+ 	//	length = num_blocks * PADDING_SIZE - frame->GetDataLen() - 2 * RIFF_HEADERSIZE;
+-	//    junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
++	//    junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
+ 	//    WriteChunk(junk_chunk, g_zeroes);
+ 
+ 	if ( index_type & AVI_LARGE_INDEX )
+@@ -1143,7 +1143,7 @@
+ 		/* write idx1 only once and before end of first GB */
+ 		if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
+ 		{
+-			int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
++			int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
+ 			WriteChunk( idx1_chunk, ( void* ) idx1 );
+ 		}
+ 		isUpdateIdx1 = false;
+@@ -1152,7 +1152,7 @@
+ 		{
+ 			/* pad out to 1GB */
+ 			//GetDirectoryEntry(riff_list, type, name, length, offset, parent);
+-			//junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, PADDING_1GB - length - 5 * RIFF_HEADERSIZE, riff_list);
++			//junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, PADDING_1GB - length - 5 * RIFF_HEADERSIZE, riff_list);
+ 			//WriteChunk(junk_chunk, g_zeroes);
+ 
+ 			/* padding for alignment */
+@@ -1161,12 +1161,12 @@
+ 			length = ( num_blocks * PADDING_SIZE ) - length - 4 * RIFF_HEADERSIZE - 2 * RIFF_LISTSIZE;
+ 			if ( length > 0 )
+ 			{
+-				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
++				junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
+ 				WriteChunk( junk_chunk, g_zeroes );
+ 			}
+ 
+-			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
+-			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
++			riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVIX" ), RIFF_LISTSIZE, file_list );
++			movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
+ 		}
+ 	}
+ 	return true;
+@@ -1189,7 +1189,7 @@
+ 
+ 	if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
+ 	{
+-		int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
++		int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
+ 		WriteChunk( idx1_chunk, ( void* ) idx1 );
+ 	}
+ 
+@@ -1231,8 +1231,8 @@
+ 
+ 		/* Initialize the 'strh' chunk */
+ 
+-		streamHdr[ 0 ].fccType = make_fourcc( "vids" );
+-		streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
++		streamHdr[ 0 ].fccType = make_fourcc((char *)"vids" );
++		streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
+ 		streamHdr[ 0 ].dwFlags = 0;
+ 		streamHdr[ 0 ].wPriority = 0;
+ 		streamHdr[ 0 ].wLanguage = 0;
+@@ -1254,14 +1254,14 @@
+ 		bitmapinfo.biHeight = 576;
+ 		bitmapinfo.biPlanes = 1;
+ 		bitmapinfo.biBitCount = 24;
+-		bitmapinfo.biCompression = make_fourcc( "dvsd" );
++		bitmapinfo.biCompression = make_fourcc((char *)"dvsd" );
+ 		bitmapinfo.biSizeImage = 144000;
+ 		bitmapinfo.biXPelsPerMeter = 0;
+ 		bitmapinfo.biYPelsPerMeter = 0;
+ 		bitmapinfo.biClrUsed = 0;
+ 		bitmapinfo.biClrImportant = 0;
+ 
+-		streamHdr[ 1 ].fccType = make_fourcc( "auds" );
++		streamHdr[ 1 ].fccType = make_fourcc((char *)"auds" );
+ 		streamHdr[ 1 ].fccHandler = 0;
+ 		streamHdr[ 1 ].dwFlags = 0;
+ 		streamHdr[ 1 ].wPriority = 0;
+@@ -1289,8 +1289,8 @@
+ 
+ 		/* Initialize the 'strh' chunk */
+ 
+-		streamHdr[ 0 ].fccType = make_fourcc( "vids" );
+-		streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
++		streamHdr[ 0 ].fccType = make_fourcc((char *)"vids" );
++		streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
+ 		streamHdr[ 0 ].dwFlags = 0;
+ 		streamHdr[ 0 ].wPriority = 0;
+ 		streamHdr[ 0 ].wLanguage = 0;
+@@ -1312,14 +1312,14 @@
+ 		bitmapinfo.biHeight = 480;
+ 		bitmapinfo.biPlanes = 1;
+ 		bitmapinfo.biBitCount = 24;
+-		bitmapinfo.biCompression = make_fourcc( "dvsd" );
++		bitmapinfo.biCompression = make_fourcc((char *)"dvsd" );
+ 		bitmapinfo.biSizeImage = 120000;
+ 		bitmapinfo.biXPelsPerMeter = 0;
+ 		bitmapinfo.biYPelsPerMeter = 0;
+ 		bitmapinfo.biClrUsed = 0;
+ 		bitmapinfo.biClrImportant = 0;
+ 
+-		streamHdr[ 1 ].fccType = make_fourcc( "auds" );
++		streamHdr[ 1 ].fccType = make_fourcc((char *)"auds" );
+ 		streamHdr[ 1 ].fccHandler = 0;
+ 		streamHdr[ 1 ].dwFlags = 0;
+ 		streamHdr[ 1 ].wPriority = 0;
+@@ -1347,47 +1347,47 @@
+ 	waveformatex.wBitsPerSample = 16;
+ 	waveformatex.cbSize = 0;
+ 
+-	file_list = AddDirectoryEntry( make_fourcc( "FILE" ), make_fourcc( "FILE" ), 0, RIFF_NO_PARENT );
++	file_list = AddDirectoryEntry( make_fourcc((char *)"FILE" ), make_fourcc((char *)"FILE" ), 0, RIFF_NO_PARENT );
+ 
+ 	/* Create a basic directory structure. Only chunks defined from here on will be written to the AVI file. */
+ 
+-	riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVI " ), RIFF_LISTSIZE, file_list );
+-	hdrl_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "hdrl" ), RIFF_LISTSIZE, riff_list );
+-	avih_chunk = AddDirectoryEntry( make_fourcc( "avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
+-
+-	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
+-	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
+-	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( BITMAPINFOHEADER ), strl_list[ 0 ] );
++	riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVI " ), RIFF_LISTSIZE, file_list );
++	hdrl_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"hdrl" ), RIFF_LISTSIZE, riff_list );
++	avih_chunk = AddDirectoryEntry( make_fourcc((char *)"avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
++
++	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
++	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
++	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( BITMAPINFOHEADER ), strl_list[ 0 ] );
+ 	if ( index_type & AVI_LARGE_INDEX )
+ 	{
+-		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
++		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
+ 		ix_chunk[ 0 ] = -1;
+-		indx[ 0 ] ->dwChunkId = make_fourcc( "00dc" );
++		indx[ 0 ] ->dwChunkId = make_fourcc((char *)"00dc" );
+ 	}
+ 
+-	strl_list[ 1 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
+-	strh_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 1 ] );
+-	strf_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( WAVEFORMATEX ) - 2, strl_list[ 1 ] );
+-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, 2, strl_list[ 1 ] );
++	strl_list[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
++	strh_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 1 ] );
++	strf_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( WAVEFORMATEX ) - 2, strl_list[ 1 ] );
++	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, 2, strl_list[ 1 ] );
+ 	if ( index_type & AVI_LARGE_INDEX )
+ 	{
+-		indx_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 1 ] );
++		indx_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 1 ] );
+ 		ix_chunk[ 1 ] = -1;
+-		indx[ 1 ] ->dwChunkId = make_fourcc( "01wb" );
++		indx[ 1 ] ->dwChunkId = make_fourcc((char *)"01wb" );
+ 
+-		odml_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "odml" ), RIFF_LISTSIZE, hdrl_list );
+-		dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
++		odml_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"odml" ), RIFF_LISTSIZE, hdrl_list );
++		dmlh_chunk = AddDirectoryEntry( make_fourcc((char *)"dmlh" ), 0, 0x00f8, odml_list );
+ 	}
+ 
+ 	/* align movi list to block */
+ 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
+ 	num_blocks = length / PADDING_SIZE + 1;
+ 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5 headers?
+-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
++	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
+ 
+-	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
++	movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
+ 
+-	idx1->aIndex[ idx1->nEntriesInUse ].dwChunkId = make_fourcc( "7Fxx" );
++	idx1->aIndex[ idx1->nEntriesInUse ].dwChunkId = make_fourcc((char *)"7Fxx" );
+ 	idx1->aIndex[ idx1->nEntriesInUse ].dwFlags = 0;
+ 	idx1->aIndex[ idx1->nEntriesInUse ].dwOffset = 0;
+ 	idx1->aIndex[ idx1->nEntriesInUse ].dwSize = 0;
+@@ -1416,7 +1416,7 @@
+ 
+ 	if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
+ 	{
+-		int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
++		int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
+ 		WriteChunk( idx1_chunk, ( void* ) idx1 );
+ 	}
+ 	RIFFFile::WriteRIFF();
+@@ -1463,7 +1463,7 @@
+ 	audio_size = ((DVFrame*)frame)->ExtractAudio( soundbuf );
+ 	if ( audio_size > 0 )
+ 	{
+-		audio_chunk = AddDirectoryEntry( make_fourcc( "01wb" ), 0, audio_size, movi_list );
++		audio_chunk = AddDirectoryEntry( make_fourcc((char *)"01wb" ), 0, audio_size, movi_list );
+ 		if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
+ 		{
+ 			GetDirectoryEntry( audio_chunk, type, name, length, offset, parent );
+@@ -1472,7 +1472,7 @@
+ 		WriteChunk( audio_chunk, soundbuf );
+ 		//        num_blocks = (audio_size + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
+ 		//		length = num_blocks * PADDING_SIZE - audio_size - 2 * RIFF_HEADERSIZE;
+-		//        junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
++		//        junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
+ 		//        WriteChunk(junk_chunk, g_zeroes);
+ 		if ( index_type & AVI_LARGE_INDEX )
+ 			UpdateIndx( 1, audio_chunk, audio_size / waveformatex.nChannels / 2 );
+@@ -1484,7 +1484,7 @@
+ 
+ 	/* Write video data */
+ 
+-	frame_chunk = AddDirectoryEntry( make_fourcc( "00dc" ), 0, frame->GetDataLen(), movi_list );
++	frame_chunk = AddDirectoryEntry( make_fourcc((char *)"00dc" ), 0, frame->GetDataLen(), movi_list );
+ 	if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
+ 	{
+ 		GetDirectoryEntry( frame_chunk, type, name, length, offset, parent );
+@@ -1493,7 +1493,7 @@
+ 	WriteChunk( frame_chunk, frame->data );
+ 	//    num_blocks = (frame->GetDataLen() + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
+ 	//	length = num_blocks * PADDING_SIZE - frame->GetDataLen() - 2 * RIFF_HEADERSIZE;
+-	//    junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
++	//    junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
+ 	//    WriteChunk(junk_chunk, g_zeroes);
+ 	if ( index_type & AVI_LARGE_INDEX )
+ 		UpdateIndx( 0, frame_chunk, 1 );
+@@ -1519,7 +1519,7 @@
+ 		/* write idx1 only once and before end of first GB */
+ 		if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
+ 		{
+-			int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
++			int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
+ 			WriteChunk( idx1_chunk, ( void* ) idx1 );
+ 		}
+ 		isUpdateIdx1 = false;
+@@ -1532,12 +1532,12 @@
+ 			length = ( num_blocks * PADDING_SIZE ) - length - 4 * RIFF_HEADERSIZE - 2 * RIFF_LISTSIZE;
+ 			if ( length > 0 )
+ 			{
+-				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
++				junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
+ 				WriteChunk( junk_chunk, g_zeroes );
+ 			}
+ 
+-			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
+-			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
++			riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVIX" ), RIFF_LISTSIZE, file_list );
++			movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
+ 		}
+ 	}
+ 	return true;
+@@ -1568,7 +1568,7 @@
+ 		if ( streamHdr[ i ].fccType == type )
+ 		{
+ 			int k, j = 0;
+-			FOURCC strf = make_fourcc( "strf" );
++			FOURCC strf = make_fourcc((char *)"strf" );
+ 			BITMAPINFOHEADER bih;
+ 
+ 			streamHdr[ i ].fccHandler = handler;
+diff -ur dvgrab-3.0.orig/avi.h dvgrab-3.0/avi.h
+--- dvgrab-3.0.orig/avi.h	2007-07-07 01:47:26.000000000 +0700
++++ dvgrab-3.0/avi.h	2007-09-04 13:06:50.888773270 +0700
+@@ -31,7 +31,15 @@
+ #include "riff.h"
+ #include "dvframe.h"
+ 
++#if !defined(__ASSERT_FUNCTION)
++#define __ASSERT_FUNCTION __func__
++#endif
++
++#if defined(__SUNPRO_CC)
++#define PACKED(x)	x
++#else
+ #define PACKED(x)	__attribute__((packed)) x
++#endif
+ 
+ #define AVI_SMALL_INDEX (0x01)
+ #define AVI_LARGE_INDEX (0x02)
+@@ -45,6 +53,9 @@
+  
+     The contents of this struct goes into the 'avih' chunk.  */
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	/// frame display rate (or 0L)
+@@ -71,17 +82,29 @@
+ 	DWORD dwReserved[ 4 ];
+ }
+ PACKED(MainAVIHeader);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	WORD top, bottom, left, right;
+ }
+ PACKED(RECT);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
+ /** Declaration of a stream header
+  
+     The contents of this struct goes into the 'strh' header. */
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	FOURCC fccType;
+@@ -100,7 +123,13 @@
+ 	RECT rcFrame;
+ }
+ PACKED(AVIStreamHeader);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	DWORD dwDVAAuxSrc;
+@@ -112,7 +141,13 @@
+ 	DWORD dwDVReserved[ 2 ];
+ }
+ PACKED(DVINFO);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	DWORD biSize;
+@@ -128,7 +163,13 @@
+ 	DWORD biClrImportant;
+ }
+ PACKED(BITMAPINFOHEADER);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	WORD wFormatTag;
+@@ -141,7 +182,13 @@
+ 	WORD dummy;
+ }
+ PACKED(WAVEFORMATEX);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	WORD wLongsPerEntry;
+@@ -159,7 +206,13 @@
+ 	aIndex[ 2014 ];
+ }
+ PACKED(AVISuperIndex);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	WORD wLongsPerEntry;
+@@ -177,7 +230,13 @@
+ 	aIndex[ 4028 ];
+ }
+ PACKED(AVIStdIndex);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ typedef struct
+ {
+ 	struct avisimpleindex_entry
+@@ -191,6 +250,9 @@
+ 	DWORD	nEntriesInUse;
+ }
+ PACKED(AVISimpleIndex);
++#if defined(__SUNPRO_CC)
++#pragma packed
++#endif
+ 
+ typedef struct
+ {
+diff -ur dvgrab-3.0.orig/dvgrab.cc dvgrab-3.0/dvgrab.cc
+--- dvgrab-3.0.orig/dvgrab.cc	2007-08-07 10:00:43.000000000 +0700
++++ dvgrab-3.0/dvgrab.cc	2007-09-04 13:06:50.889447865 +0700
+@@ -291,50 +291,50 @@
+ 
+ void DVgrab::getargs( int argc, char *argv[] )
+ {
+-	char *opts = "d:hif:F:I:s:tVv-";
++	char *opts = (char *)"d:hif:F:I:s:tVv-";
+ 	int optindex = 0;
+ 	int c;
+ 	struct option long_opts[] = {
+ 		// all these use sscanf for int conversion, use val == 0xff to indicate
+-		{ "autosplit", no_argument, &m_autosplit, true },
+-		{ "buffers", required_argument, &m_buffers, 0xff },
+-		{ "card", required_argument, &m_port, 0xff },
+-		{ "channel", required_argument, &m_channel, 0xff },
+-		{ "cmincutsize", required_argument, &m_collection_min_cut_file_size, 0xff },
+-		{ "csize", required_argument, &m_collection_size, 0xff },
+-		{ "debug", required_argument, 0, 0 },
+-		{ "duration", required_argument, 0, 0 },
+-		{ "every", required_argument, &m_frame_every, 0xff },
+-		{ "format", required_argument, 0, 'f' },
+-		{ "frames", required_argument, &m_frame_count, 0xff },
+-		{ "guid", required_argument, 0, 0 },
+-		{ "help", no_argument, 0, 'h' },
+-		{ "input", required_argument, 0, 'I' },
+-		{ "interactive", no_argument, 0, 'i'},
++		{ (char *)"autosplit", no_argument, &m_autosplit, true },
++		{ (char *)"buffers", required_argument, &m_buffers, 0xff },
++		{ (char *)"card", required_argument, &m_port, 0xff },
++		{ (char *)"channel", required_argument, &m_channel, 0xff },
++		{ (char *)"cmincutsize", required_argument, &m_collection_min_cut_file_size, 0xff },
++		{ (char *)"csize", required_argument, &m_collection_size, 0xff },
++		{ (char *)"debug", required_argument, 0, 0 },
++		{ (char *)"duration", required_argument, 0, 0 },
++		{ (char *)"every", required_argument, &m_frame_every, 0xff },
++		{ (char *)"format", required_argument, 0, 'f' },
++		{ (char *)"frames", required_argument, &m_frame_count, 0xff },
++		{ (char *)"guid", required_argument, 0, 0 },
++		{ (char *)"help", no_argument, 0, 'h' },
++		{ (char *)"input", required_argument, 0, 'I' },
++		{ (char *)"interactive", no_argument, 0, 'i'},
+ #if defined(HAVE_LIBJPEG) && defined(HAVE_LIBDV)
+-		{ "jpeg-deinterlace", no_argument, &m_jpeg_deinterlace, true },
+-		{ "jpeg-height", required_argument, &m_jpeg_height, 0xff },
+-		{ "jpeg-overwrite", no_argument, &m_jpeg_overwrite, true },
+-		{ "jpeg-quality", required_argument, &m_jpeg_quality, 0xff },
+-		{ "jpeg-temp", required_argument, &m_jpeg_usetemp, true },
+-		{ "jpeg-width", required_argument, &m_jpeg_width, 0xff },
++		{ (char *)"jpeg-deinterlace", no_argument, &m_jpeg_deinterlace, true },
++		{ (char *)"jpeg-height", required_argument, &m_jpeg_height, 0xff },
++		{ (char *)"jpeg-overwrite", no_argument, &m_jpeg_overwrite, true },
++		{ (char *)"jpeg-quality", required_argument, &m_jpeg_quality, 0xff },
++		{ (char *)"jpeg-temp", required_argument, &m_jpeg_usetemp, true },
++		{ (char *)"jpeg-width", required_argument, &m_jpeg_width, 0xff },
+ #endif
+-		{ "lockstep", no_argument, &m_lockstep, true },
+-		{ "lockstep_maxdrops", required_argument, &m_lockstep_maxdrops, 0xff },
+-		{ "lockstep_totaldrops", required_argument, &m_lockstep_totaldrops, 0xff },
+-		{ "noavc", no_argument, &m_noavc, true },
+-		{ "nostop", no_argument, &m_no_stop, true },
+-		{ "opendml", no_argument, &m_open_dml, true },
+-		{ "showstatus", no_argument, &m_showstatus, true },
+-		{ "size", required_argument, &m_max_file_size, 0xff },
+-		{ "stdin", no_argument, 0, 0 },
+-		{ "timecode", no_argument, &m_timecode, true },
+-		{ "timestamp", no_argument, &m_timestamp, true },
+-		{ "timesys", no_argument, &m_timesys, true },
++		{ (char *)"lockstep", no_argument, &m_lockstep, true },
++		{ (char *)"lockstep_maxdrops", required_argument, &m_lockstep_maxdrops, 0xff },
++		{ (char *)"lockstep_totaldrops", required_argument, &m_lockstep_totaldrops, 0xff },
++		{ (char *)"noavc", no_argument, &m_noavc, true },
++		{ (char *)"nostop", no_argument, &m_no_stop, true },
++		{ (char *)"opendml", no_argument, &m_open_dml, true },
++		{ (char *)"showstatus", no_argument, &m_showstatus, true },
++		{ (char *)"size", required_argument, &m_max_file_size, 0xff },
++		{ (char *)"stdin", no_argument, 0, 0 },
++		{ (char *)"timecode", no_argument, &m_timecode, true },
++		{ (char *)"timestamp", no_argument, &m_timestamp, true },
++		{ (char *)"timesys", no_argument, &m_timesys, true },
+ #ifdef HAVE_LINUX_VIDEODEV2_H
+-		{ "v4l2", no_argument, 0, 'V' },
++		{ (char *)"v4l2", no_argument, 0, 'V' },
+ #endif
+-		{ "version", no_argument, 0, 'v' },
++		{ (char *)"version", no_argument, 0, 'v' },
+ 		{ 0, 0, 0, 0 }
+ 	};
+ 
+diff -ur dvgrab-3.0.orig/endian_types.h dvgrab-3.0/endian_types.h
+--- dvgrab-3.0.orig/endian_types.h	2005-04-18 21:24:48.000000000 +0700
++++ dvgrab-3.0/endian_types.h	2007-09-04 13:06:50.889699833 +0700
+@@ -100,6 +100,9 @@
+ #endif
+ }
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ template <class T> class le_t {
+ 	T	m;
+ 	T	read() const {
+@@ -150,10 +153,19 @@
+ 		m |= t.m;
+ 		return *this;
+ 	};
++#if defined(__SUNPRO_CC)
++};
++#pragma packed
++#else
+ } __attribute__((packed));
++#endif
++
+ 
+ /* Just copy-and-pasted from le_t. Too lazy to do it right. */
+ 
++#if defined(__SUNPRO_CC)
++#pragma packed(1)
++#endif
+ template <class T> class be_t {
+ 	T	m;
+ 	T	read() const {
+@@ -204,7 +216,12 @@
+ 		m |= t.m;
+ 		return *this;
+ 	};
++#if defined(__SUNPRO_CC)
++};
++#pragma packed
++#else
+ } __attribute__((packed));
++#endif
+ 
+ /* Define types of native endianness similar to the little and big endian
+  * versions below. Not really necessary but useful occasionally to emphasize
+diff -ur dvgrab-3.0.orig/ieee1394io.cc dvgrab-3.0/ieee1394io.cc
+--- dvgrab-3.0.orig/ieee1394io.cc	2007-07-07 14:10:12.000000000 +0700
++++ dvgrab-3.0/ieee1394io.cc	2007-09-04 13:06:50.890098559 +0700
+@@ -47,6 +47,10 @@
+ #include <config.h>
+ #endif
+ 
++#if !defined(__ASSERT_FUNCTION)
++#define __ASSERT_FUNCTION __func__
++#endif
++
+ #include <deque>
+ #include <iostream>
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-05-strsep.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,26 @@
+--- dvgrab-3.0/dvgrab.cc.orig	2007-09-04 12:43:17.221892690 +0700
++++ dvgrab-3.0/dvgrab.cc	2007-09-04 12:45:03.704249501 +0700
+@@ -57,6 +57,23 @@
+ Frame *DVgrab::m_frame;
+ FileHandler *DVgrab::m_writer;
+ 
++extern "C" {
++
++char * strsep(char **str, const char *delim)
++{
++    char *ret = *str;
++    if(*str == NULL) return NULL;
++    *str = *str + strcspn(*str, delim);
++    if(**str == 0) *str = NULL;
++    else{
++        **str = 0;
++        (*str)++;
++    }
++    return ret;
++}
++
++}
++
+ DVgrab::DVgrab( int argc, char *argv[] ) :
+ 		m_program_name( argv[0] ), m_port( -1 ), m_node( -1 ), m_reader_active( false ), m_autosplit( false ),
+ 		m_timestamp( false ), m_channel( DEFAULT_CHANNEL ), m_frame_count( DEFAULT_FRAMES ),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/dvgrab-06-return.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,11 @@
+--- dvgrab-3.0/iec13818-1.cc.orig	2007-09-04 12:51:25.864036600 +0700
++++ dvgrab-3.0/iec13818-1.cc	2007-09-04 12:49:40.629386401 +0700
+@@ -38,7 +38,7 @@
+ bool HDVPacket::payload_unit_start_indicator() { return GetBits( 9, 1 ); }
+ bool HDVPacket::transport_priority() { return GetBits( 10, 1 ); }
+ unsigned short HDVPacket::pid() { return GetBits( 11, 13 ); }
+-unsigned char HDVPacket::transport_scrambling_control() { GetBits( 24, 2 ); }
++unsigned char HDVPacket::transport_scrambling_control() { return GetBits( 24, 2 ); }
+ unsigned char HDVPacket::adaptation_field_control() { return GetBits( 26, 2 ); }
+ unsigned char HDVPacket::continuity_counter() { return GetBits( 28, 4 ); }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libavc1394-01-wall.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,11 @@
+--- libavc1394-0.5.3/configure.in.orig	2007-09-04 10:30:55.525460678 +0700
++++ libavc1394-0.5.3/configure.in	2007-09-04 10:31:09.635177660 +0700
+@@ -22,7 +22,7 @@
+ AC_SUBST(lt_revision)
+ AC_SUBST(lt_age)
+ 
+-CFLAGS="$CFLAGS -Wall -Wunused"
++# CFLAGS="$CFLAGS -Wall -Wunused"
+ 
+ AC_OUTPUT([
+ Makefile 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libiec61883-01-function.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,12 @@
+--- libiec61883-1.1.0/src/cmp.c.orig	2007-09-04 10:00:37.014541437 +0700
++++ libiec61883-1.1.0/src/cmp.c	2007-09-04 10:02:26.689523953 +0700
+@@ -29,6 +29,9 @@
+ #include <libraw1394/csr.h>
+ #include <netinet/in.h>
+ 
++#if !defined(__FUNCTION__)
++#define __FUNCTION__ __func__
++#endif
+ 
+ int
+ iec61883_cmp_calc_bandwidth (raw1394handle_t handle, nodeid_t from, int plug,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libiec61883-02-struct.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,28 @@
+--- libiec61883-1.1.0/examples/test-dv.c.orig	2007-09-04 10:09:03.239249499 +0700
++++ libiec61883-1.1.0/examples/test-dv.c	2007-09-04 10:09:42.617502317 +0700
+@@ -60,9 +60,9 @@
+ 	if (frame && iec61883_dv_fb_start (frame, channel) == 0)
+ 	{
+ 		struct pollfd pfd = {
+-			fd: raw1394_get_fd (handle),
+-			events: POLLIN | POLLPRI,
+-			revents: 0
++			raw1394_get_fd (handle),
++			POLLIN | POLLPRI,
++			0
+ 		};
+ 		int result = 0;
+ 		
+@@ -94,9 +94,9 @@
+ 	if (dv && iec61883_dv_xmit_start (dv, channel) == 0)
+ 	{
+ 		struct pollfd pfd = {
+-			fd: raw1394_get_fd (handle),
+-			events: POLLIN,
+-			revents: 0
++			raw1394_get_fd (handle),
++			POLLIN,
++			0
+ 		};
+ 		int result = 0;
+ 		
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libraw1394-01-configure.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,34 @@
+diff -ur libraw1394-1.2.1.orig/configure.ac libraw1394-1.2.1/configure.ac
+--- libraw1394-1.2.1.orig/configure.ac	2005-06-23 03:12:08.000000000 +0700
++++ libraw1394-1.2.1/configure.ac	2007-09-04 08:30:14.441286216 +0700
+@@ -25,6 +25,30 @@
+ AC_SUBST(lt_age)
+ 
+ 
++AC_CHECK_HEADERS(endian.h byteswap.h sys/byteorder.h sys/ioccom.h sys/types.h)
++AC_CHECK_HEADERS(unistd.h inttypes.h linux/ioctl.h linux/types.h stropts.h sys/ioccom.h)
++
++AC_MSG_CHECKING([if inttypes has u_int32_t etc])
++AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++        [[
++#if HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#if HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
+++#if HAVE_UNISTD_H
+++#include <unistd.h>
+++#endif
++        ]],[[
++    u_int32_t	s;
++    sleep((unsigned int)s);
++        ]]
++    )],
++    [AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define to 1 if have u_int32_t types etc])
++    AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
++
+ #CFLAGS=${CFLAGS:-"-Wall"}
+ AC_OUTPUT([
+ Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libraw1394-02-u_int.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,19 @@
+diff -ur libraw1394-1.2.1.orig/src/raw1394.h libraw1394-1.2.1/src/raw1394.h
+--- libraw1394-1.2.1.orig/src/raw1394.h	2006-03-04 08:25:13.000000000 +0700
++++ libraw1394-1.2.1/src/raw1394.h	2007-09-04 08:35:57.944626320 +0700
+@@ -13,6 +13,15 @@
+ #define _LIBRAW1394_RAW1394_H
+ 
+ #include <sys/types.h>
++#ifdef HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++#ifndef HAVE_U_INT_TYPES
++typedef uint8_t u_int8_t;
++typedef uint16_t u_int16_t;
++typedef uint32_t u_int32_t;
++typedef uint64_t u_int64_t;
++#endif
+ 
+ #define RAW1394_ARM_READ  1
+ #define RAW1394_ARM_WRITE 2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libraw1394-03-kernel.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,88 @@
+diff -ur libraw1394-1.2.1.orig/src/ieee1394-ioctl.h libraw1394-1.2.1/src/ieee1394-ioctl.h
+--- libraw1394-1.2.1.orig/src/ieee1394-ioctl.h	2004-02-01 03:26:07.000000000 +0700
++++ libraw1394-1.2.1/src/ieee1394-ioctl.h	2007-09-04 09:36:53.290395724 +0700
+@@ -4,10 +4,23 @@
+ #ifndef __IEEE1394_IOCTL_H
+ #define __IEEE1394_IOCTL_H
+ 
++#ifdef HAVE_LINUX_IOCTL_H
+ #include <linux/ioctl.h>
++#endif
++#ifdef HAVE_LINUX_TYPES_H
+ #include <linux/types.h>
++#endif
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#ifdef HAVE_STROPTS_H
++#include <stropts.h>
++#endif
++#ifdef HAVE_SYS_IOCCOM_H
++#include <sys/ioccom.h>
++#endif
+ 
+-
++#if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
+ /* AMDTP Gets 6 */
+ #define AMDTP_IOC_CHANNEL	_IOW('#', 0x00, struct amdtp_ioctl)
+ #define AMDTP_IOC_PLUG		_IOW('#', 0x01, struct amdtp_ioctl)
+@@ -107,5 +120,35 @@
+ #define RAW1394_IOC_ISO_RECV_FLUSH              \
+ 	_IO  ('#', 0x29)
+ 
++#elif defined(sun) || defined(__sun)
++#define RAW1394IOC    (('#' | 128) << 8)
++
++/* AMDTP Gets 6 */
++#define AMDTP_IOC_CHANNEL       (RAW1394IOC | 0x00)
++#define AMDTP_IOC_PLUG          (RAW1394IOC | 0x01)
++#define AMDTP_IOC_PING          (RAW1394IOC | 0x02)
++#define AMDTP_IOC_ZAP           (RAW1394IOC | 0x03)
++
++/* Raw1394's ISO interface */
++
++#define RAW1394_IOC_ISO_XMIT_INIT               (RAW1394IOC | 0x1a)
++#define RAW1394_IOC_ISO_RECV_INIT               (RAW1394IOC | 0x1b)
++#define RAW1394_IOC_ISO_RECV_START              (RAW1394IOC | 0x1c)
++#define RAW1394_IOC_ISO_XMIT_START              (RAW1394IOC | 0x1d)
++#define RAW1394_IOC_ISO_XMIT_RECV_STOP          (RAW1394IOC | 0x1e)
++#define RAW1394_IOC_ISO_GET_STATUS              (RAW1394IOC | 0x1f)
++#define RAW1394_IOC_ISO_SHUTDOWN                (RAW1394IOC | 0x20)
++#define RAW1394_IOC_ISO_QUEUE_ACTIVITY          (RAW1394IOC | 0x21)
++#define RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL     (RAW1394IOC | 0x22)
++#define RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL   (RAW1394IOC | 0x23)
++#define RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK   (RAW1394IOC | 0x24)
++#define RAW1394_IOC_ISO_RECV_PACKETS            (RAW1394IOC | 0x25)
++#define RAW1394_IOC_ISO_RECV_RELEASE_PACKETS    (RAW1394IOC | 0x26)
++#define RAW1394_IOC_ISO_XMIT_PACKETS            (RAW1394IOC | 0x27)
++#define RAW1394_IOC_ISO_XMIT_SYNC               (RAW1394IOC | 0x28)
++#define RAW1394_IOC_ISO_RECV_FLUSH              (RAW1394IOC | 0x29)
++#else
++#error "Unknown system"
++#endif
+ 
+ #endif /* __IEEE1394_IOCTL_H */
+diff -ur libraw1394-1.2.1.orig/src/kernel-raw1394.h libraw1394-1.2.1/src/kernel-raw1394.h
+--- libraw1394-1.2.1.orig/src/kernel-raw1394.h	2004-11-06 07:26:44.000000000 +0700
++++ libraw1394-1.2.1/src/kernel-raw1394.h	2007-09-04 09:07:23.710232109 +0700
+@@ -72,7 +72,20 @@
+ #define RAW1394_NOTIFY_OFF 0
+ #define RAW1394_NOTIFY_ON  1
+ 
++#if defined(HAVE_ASM_TYPES_H)
+ #include <asm/types.h>
++#elif defined(HAVE_INTTYPES_H) && defined(HAVE_SYS_TYPES_H)
++#include <sys/types.h>
++#include <inttypes.h>
++typedef uint8_t  __u8;
++typedef uint16_t __u16;
++typedef uint32_t __u32;
++typedef uint64_t __u64;
++typedef int8_t   __s8;
++typedef int16_t  __s16;
++typedef int32_t  __s32;
++typedef int64_t  __s64;
++#endif
+ 
+ struct raw1394_request {
+         __u32 type;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/libraw1394-04-eremoteio.diff	Tue Sep 04 07:22:46 2007 +0000
@@ -0,0 +1,26 @@
+--- libraw1394-1.2.1/src/errors.c.orig	2007-09-04 09:13:44.271609655 +0700
++++ libraw1394-1.2.1/src/errors.c	2007-09-04 09:15:09.343585630 +0700
+@@ -38,7 +38,11 @@
+                 0xdead,
+                 0xdead,
+                 0xdead,
++#ifdef EREMOTEIO
+                 EREMOTEIO, /* ack_data_error */
++#else
++                EIO,	   /* ack_data_error */
++#endif
+                 EPERM,     /* ack_type_error */
+                 0xdead     /* invalid ack code */
+         };
+@@ -48,7 +52,11 @@
+                 0xdead,
+                 0xdead,
+                 EAGAIN,    /* rcode_conflict_error */
++#ifdef EREMOTEIO
+                 EREMOTEIO, /* rcode_data_error */
++#else
++                EIO,	   /* rcode_data_error */
++#endif
+                 EPERM,     /* rcode_type_error */
+                 EINVAL,    /* rcode_address_error */
+                 0xdead,    /* invalid rcodes */