From: Nick Hadaway Date: Mon, 21 Oct 2002 20:11:30 +0000 (+0000) Subject: Made changes to the c++ code to compile properly. It currently works on X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=fda3de8bb23d6b2532aee1557777b493cb391c7a;p=gentoo.git Made changes to the c++ code to compile properly. It currently works on gcc3. Have not tested with gcc2. Currently marked unstable. Please see bug #9265 --- diff --git a/media-video/vcr/ChangeLog b/media-video/vcr/ChangeLog index 56784c0072d9..2bdc84a4fb10 100644 --- a/media-video/vcr/ChangeLog +++ b/media-video/vcr/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/vcr # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/vcr/ChangeLog,v 1.2 2002/09/14 23:03:57 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/vcr/ChangeLog,v 1.3 2002/10/21 20:11:30 raker Exp $ + +*vcr-1.09-r2 (21 Oct 2002) + + 21 Oct 2002; Nick Hadaway vcr-1.09-r2.ebuild, + digest-vcr-1.09-r2, 1.09-r2-gentoo.diff : + Patched the c++ code so it compiled without any errors. Currently + marked unstable until I get some test reports back. See bug #9265 *vcr-1.09-r1 (14 Sep 2002) diff --git a/media-video/vcr/files/1.09-r2-gentoo.diff b/media-video/vcr/files/1.09-r2-gentoo.diff new file mode 100644 index 000000000000..9a2226fbb313 --- /dev/null +++ b/media-video/vcr/files/1.09-r2-gentoo.diff @@ -0,0 +1,146 @@ +diff -urN vcr-1.09/src/capproc.cc vcr-1.09-modified/src/capproc.cc +--- vcr-1.09/src/capproc.cc 2001-11-11 08:39:22.000000000 -0600 ++++ vcr-1.09-modified/src/capproc.cc 2002-10-21 14:29:55.000000000 -0500 +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + #ifdef OLDAVIFILE + # include +diff -urN vcr-1.09/src/capproc.h vcr-1.09-modified/src/capproc.h +--- vcr-1.09/src/capproc.h 2001-07-27 17:05:54.000000000 -0500 ++++ vcr-1.09-modified/src/capproc.h 2002-10-21 14:44:31.000000000 -0500 +@@ -1,6 +1,6 @@ + #include + #include +-#include ++#include + #include + #include "v4lxif.h" + #include "vcr.h" +@@ -88,8 +88,8 @@ + int comp_drop; + long long starttime; + +- std::strstream* messenger; +- std::strstream def_mess; ++ std::ostringstream* messenger; ++ std::ostringstream def_mess; + + std::string filename; + int segment_size; +@@ -187,7 +187,7 @@ + { + m_quit = 1; + } +- void setMessenger(std::strstream& mess) ++ void setMessenger(std::ostringstream& mess) + { + messenger=&mess; + } +diff -urN vcr-1.09/src/main.cc vcr-1.09-modified/src/main.cc +--- vcr-1.09/src/main.cc 2001-11-11 08:38:36.000000000 -0600 ++++ vcr-1.09-modified/src/main.cc 2002-10-21 15:00:16.000000000 -0500 +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + /* Custom headerfiles */ + + #include "vcr.h" +@@ -134,7 +134,7 @@ + resolution_width = 0, + resolution_height = 0; + #ifdef OLDAVIFILE +-vector ++std::vector + #else + avm::vector + #endif +@@ -498,10 +498,9 @@ + fprintf(stderr, "\n"); + } + +-void +-list_codecs() ++void list_codecs() + { +- vector::iterator it; ++ avm::vector::iterator it; + + fprintf(stderr, "Available codecs: \n\n"); + +@@ -549,14 +548,14 @@ + return; + + #ifdef OLDAVIFILE +- vector encinfo = video_codecs[idx].encoder_info; ++ std::vector encinfo = video_codecs[idx].encoder_info; + #else + avm::vector encinfo = video_codecs[idx].encoder_info; + #endif + + fprintf(stderr, "These attributes are supported for this codec:\n\n"); + +- vector::const_iterator it; ++ avm::vector::const_iterator it; + for(it=encinfo.begin(); it!=encinfo.end(); it++) + { + #ifdef OLDAVIFILE +@@ -587,9 +586,9 @@ + fprintf(stderr, "\tPossible values: "); + + #ifdef OLDAVIFILE +- vector::const_iterator sit; ++ std::vector::const_iterator sit; + #else +- vector::const_iterator sit; ++ avm::vector::const_iterator sit; + #endif + for (sit=(it->options).begin(); sit!=(it->options).end(); sit++) + fprintf(stderr, "\"%s\" ", sit->c_str()); +@@ -805,7 +804,7 @@ + int + found_codec = -1; + +- vector::iterator it; ++ avm::vector::iterator it; + + for (it = video_codecs.begin(); it != video_codecs.end(); it++) + { +@@ -1003,7 +1002,7 @@ + int + get_codec_index(int fourcc) + { +- vector::iterator it; ++ avm::vector::iterator it; + int i = 0; + + for (it = video_codecs.begin(); it != video_codecs.end(); it++) +@@ -1017,19 +1016,18 @@ + } + + //TODO: It ignores fourcc currently.. +-short +-set_attribute(int fourcc, const char *attr, const char *val) ++short set_attribute(int fourcc, const char *attr, const char *val) + { + int setval = 0; + int retval = 0; + +- vector::const_iterator it; ++ avm::vector::const_iterator it; + int idx = get_codec_index(fourcc); + if (idx < 0) + return 0; + + #ifdef OLDAVIFILE +- vector encinfo = video_codecs[idx].encoder_info; ++ std::vector encinfo = video_codecs[idx].encoder_info; + #else + avm::vector encinfo = video_codecs[idx].encoder_info; + #endif diff --git a/media-video/vcr/files/digest-vcr-1.09-r2 b/media-video/vcr/files/digest-vcr-1.09-r2 new file mode 100644 index 000000000000..c75848ea1ecb --- /dev/null +++ b/media-video/vcr/files/digest-vcr-1.09-r2 @@ -0,0 +1,2 @@ +MD5 18a41f998647b8e32f07de3c9f899009 vcr-1.09.tar.gz 117377 +MD5 f05957fcc83f7c890734e093eda2bd99 vcr_1.09-11.diff.gz 5169 diff --git a/media-video/vcr/vcr-1.09-r2.ebuild b/media-video/vcr/vcr-1.09-r2.ebuild new file mode 100644 index 000000000000..4d4f1c6d9085 --- /dev/null +++ b/media-video/vcr/vcr-1.09-r2.ebuild @@ -0,0 +1,46 @@ +# Copyright 2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/vcr/vcr-1.09-r2.ebuild,v 1.1 2002/10/21 20:11:30 raker Exp $ + +IUSE="" + +S=${WORKDIR}/${P} + +DESCRIPTION="VCR - Linux Console VCR" +SRC_URI="http://www.stack.nl/~brama/${PN}/src/${P}.tar.gz" +HOMEPAGE="http://www.stack.nl/~brama/vcr/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86" + +DEPEND="media-video/avifile" + +src_unpack () { + + unpack ${A} + cd ${S} + patch -p1 < ${FILESDIR}/1.09-r2-gentoo.diff || die "patch failed" + +} + +src_compile () { + + local myconf + myconf="--enable-avifile-0_6" + + export CXX="g++" + + econf ${myconf} || die "econf died" + + emake || die "emake died" + +} + +src_install () { + + einstall || die "einstall died" + + dodoc AUTHORS COPYING ChangeLog NEWS README + +}