From 36f2537bda434bfa70a46d40b43bbecfd1c8efe6 Mon Sep 17 00:00:00 2001 From: Jan Wedekind Date: Thu, 9 Jan 2014 18:58:18 +0000 Subject: [PATCH] Add -I/usr/include/ffmpeg to CXXFLAGS --- Rakefile | 8 ++------ ext/ximagepainter.cc | 2 -- ext/xvideoimagepainter.cc | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Rakefile b/Rakefile index cdc0734..53990fb 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,7 @@ require 'rake/loaders/makefile' require 'rbconfig' PKG_NAME = 'hornetseye-xorg' -PKG_VERSION = '1.0.5' +PKG_VERSION = '1.0.6' CFG = RbConfig::CONFIG CXX = ENV[ 'CXX' ] || 'g++' RB_FILES = FileList[ 'lib/**/*.rb' ] @@ -41,6 +41,7 @@ $LIBRUBYARG = "-L#{CFG[ 'libdir' ]} #{CFG[ 'LIBRUBYARG' ]} #{CFG[ 'LDFLAGS' ]} " $SITELIBDIR = CFG[ 'sitelibdir' ] $SITEARCHDIR = CFG[ 'sitearchdir' ] $LDSHARED = CFG[ 'LDSHARED' ][ CFG[ 'LDSHARED' ].index( ' ' ) .. -1 ] +$CXXFLAGS = "#{$CXXFLAGS} -I/usr/include/ffmpeg" task :default => :all @@ -105,16 +106,11 @@ file 'ext/config.h' do |t| # need to compile with -D__STDC_CONSTANT_MACROS if check_c_header 'libswscale/swscale.h' s << "#define HAVE_LIBSWSCALE_INCDIR 1\n" - s << "#undef HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n" - elsif check_c_header 'ffmpeg/libswscale/swscale.h' - s << "#undef HAVE_LIBSWSCALE_INCDIR\n" - s << "#define HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n" else unless check_c_header 'ffmpeg/swscale.h' raise 'Cannot find swscale.h header file' end s << "#undef HAVE_LIBSWSCALE_INCDIR\n" - s << "#undef HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n" end File.open( t.name, 'w' ) { |f| f.puts s } end diff --git a/ext/ximagepainter.cc b/ext/ximagepainter.cc index f267bd0..53e9638 100644 --- a/ext/ximagepainter.cc +++ b/ext/ximagepainter.cc @@ -43,8 +43,6 @@ extern "C" { #ifndef HAVE_LIBSWSCALE_INCDIR #include -#elif HAVE_FFMPEG_LIBSWSCALE_INCDIR - #include #else #include #endif diff --git a/ext/xvideoimagepainter.cc b/ext/xvideoimagepainter.cc index 7cdb9e1..3cefc10 100644 --- a/ext/xvideoimagepainter.cc +++ b/ext/xvideoimagepainter.cc @@ -19,8 +19,6 @@ extern "C" { #ifndef HAVE_LIBSWSCALE_INCDIR #include -#elif HAVE_FFMPEG_LIBSWSCALE_INCDIR - #include #else #include #endif