commit: e3402d4739e290f1845e974274fc38ee0f537f9c Author: Hans de Graaff <hans <AT> degraaff <DOT> org> AuthorDate: Wed Sep 10 09:19:15 2014 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Wed Sep 10 09:19:15 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=dev/graaff.git;a=commit;h=e3402d47
Add a new revision with the output encoding patch. Package-Manager: portage-2.2.8-r1 --- dev-ruby/rvideo/ChangeLog | 6 +++ dev-ruby/rvideo/files/rvideo-output-encoding.patch | 52 +++++++--------------- dev-ruby/rvideo/rvideo-0.9.3-r3.ebuild | 28 ++++++++++++ 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/dev-ruby/rvideo/ChangeLog b/dev-ruby/rvideo/ChangeLog index be523e0..141ff77 100644 --- a/dev-ruby/rvideo/ChangeLog +++ b/dev-ruby/rvideo/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*rvideo-0.9.3-r3 (10 Sep 2014) + + 10 Sep 2014; Hans de Graaff <[email protected]> +rvideo-0.9.3-r3.ebuild, + files/rvideo-output-encoding.patch: + Add a new revision with the output encoding patch. + 10 Sep 2014; Hans de Graaff <[email protected]> -rvideo-0.9.5.ebuild: Remove this version again because the API changes in a breaking and partially undocumented way. diff --git a/dev-ruby/rvideo/files/rvideo-output-encoding.patch b/dev-ruby/rvideo/files/rvideo-output-encoding.patch index 012f10e..7cfe316 100644 --- a/dev-ruby/rvideo/files/rvideo-output-encoding.patch +++ b/dev-ruby/rvideo/files/rvideo-output-encoding.patch @@ -1,49 +1,31 @@ -diff --git a/lib/rvideo/inspector.rb b/lib/rvideo/inspector.rb -index f93466f..0d2f43a 100644 ---- a/lib/rvideo/inspector.rb -+++ b/lib/rvideo/inspector.rb -@@ -45,7 +45,8 @@ module RVideo # :nodoc: +--- lib/rvideo/tools/abstract_tool.rb.~1~ 2014-09-10 11:13:10.951030299 +0200 ++++ lib/rvideo/tools/abstract_tool.rb 2014-09-10 11:14:22.804030526 +0200 +@@ -62,7 +62,8 @@ + def execute + final_command = "#{@command} 2>&1" + Transcoder.logger.info("\nExecuting Command: #{final_command}\n") +- @raw_result = `#{final_command}` ++ @raw_result = IO::popen(final_command, ++ :external_encoding => 'ASCII-8BIT').read + Transcoder.logger.info("Result: \n#{@raw_result}") + parse_result(@raw_result) + end +--- lib/rvideo/inspector.rb.~1~ 2014-09-10 11:13:10.951030299 +0200 ++++ lib/rvideo/inspector.rb 2014-09-10 11:15:08.907030671 +0200 +@@ -45,7 +45,8 @@ @path = File.dirname(file) @full_filename = file - raise TranscoderError::InputFileNotFound, "File not found (#{file})" unless FileTest.exist?(file.gsub("\"","")) + raise ArgumentError, "File not found (#{file})" unless FileTest.exist?(file.gsub("\"","")) - @raw_response = `#{@ffmpeg_binary} -i #{@full_filename} 2>&1` + @raw_response = IO::popen("#{@ffmpeg_binary} -i #{@full_filename} 2>&1", + :external_encoding => 'ASCII-8BIT').read else raise ArgumentError, "Must supply either an input file or a pregenerated response" if options[:raw_response].nil? and file.nil? end -@@ -542,4 +543,4 @@ module RVideo # :nodoc: +@@ -483,4 +484,4 @@ match end end -end \ No newline at end of file +end -diff --git a/lib/rvideo/tools/abstract_tool.rb b/lib/rvideo/tools/abstract_tool.rb -index d336baa..565137a 100644 ---- a/lib/rvideo/tools/abstract_tool.rb -+++ b/lib/rvideo/tools/abstract_tool.rb -@@ -329,7 +329,8 @@ module RVideo # :nodoc: - # Pulls the interesting bits of the temp log file into memory. This is fairly tool-specific, so - # it's doubtful that this default version is going to work without being overridded. - def populate_raw_result(temp_file_name) -- @raw_result = `tail -n 500 #{temp_file_name}` -+ @raw_result = IO::popen("tail -n 500 #{temp_file_name}", -+ :external_encoding => 'ASCII-8BIT').read - end - - end -diff --git a/lib/rvideo/tools/ffmpeg.rb b/lib/rvideo/tools/ffmpeg.rb -index 5d4221d..e518171 100644 ---- a/lib/rvideo/tools/ffmpeg.rb -+++ b/lib/rvideo/tools/ffmpeg.rb -@@ -79,7 +79,8 @@ module RVideo - end - - # Append the bottom of the log file, where the interesting bits live. -- @raw_result << `tail -n 500 #{temp_file_name}` -+ @raw_result << IO::popen("tail -n 500 #{temp_file_name}", -+ :external_encoding => 'ASCII-8BIT').read - end - - def parse_result(result) diff --git a/dev-ruby/rvideo/rvideo-0.9.3-r3.ebuild b/dev-ruby/rvideo/rvideo-0.9.3-r3.ebuild new file mode 100644 index 0000000..4fe2fc2 --- /dev/null +++ b/dev-ruby/rvideo/rvideo-0.9.3-r3.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="ENV ENV2 History.txt README.txt RULES" + +# There are specs but they require an old version of rspec. +RUBY_FAKEGEM_TASK_TEST="" + +RUBY_FAKEGEM_EXTRAINSTALL="config" + +inherit ruby-fakegem + +DESCRIPTION="Inspect and process video or audio files." +HOMEPAGE="http://code.google.com/p/rvideo/" +LICENSE="MIT" + +KEYWORDS="~amd64 ~x86 ~x86-macos" +SLOT="0" +IUSE="doc flv" + +RUBY_PATCHES=( rvideo-ffmpeg.patch rvideo-output-encoding.patch ) + +ruby_add_rdepend "flv? ( media-video/flvtool2 )"
