From 05abb1e26fc7a33f491942cc19edebc7145f0e80 Mon Sep 17 00:00:00 2001 From: nibbles 2bits Date: Sat, 12 May 2012 10:02:35 -0700 Subject: avidemux: fix failing inreplace The two inreplaces that add an RPATH to the x264 and xvid dylibs are not meant to run unless the Qt gui is built. The conditional that stops them from running was not coded correctly. This commit changes the conditional to only run the inreplaces if Qt4 is installed using `linked_keg.exist?`. Fixes an issue reported in #12051 Closes #12213. Signed-off-by: Jack Nagel --- Library/Formula/avidemux.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Library') diff --git a/Library/Formula/avidemux.rb b/Library/Formula/avidemux.rb index b71d7a3d0..a8f8e8e52 100644 --- a/Library/Formula/avidemux.rb +++ b/Library/Formula/avidemux.rb @@ -139,15 +139,13 @@ class Avidemux < Formula system "make" # Two dylibs that are only built as part of the Qt gui need an RPATH - # set on their internal deps. Check if they exist before patching them. - # A patch to introduce RPATH use upstream is being fashioned. - fxv = 'ADM_videoEncoder/ADM_vidEnc_xvid/qt4/cmake_install.cmake' - fx2 = 'ADM_videoEncoder/ADM_vidEnc_x264/qt4/cmake_install.cmake' - if (File.exists? fxv and File.exists? fx2) then - inreplace fxv, + # set on their internal deps. Check if Qt4 exists before patching them, + # otherwise the inreplaces will fail. + if Formula.factory('qt').linked_keg.exist? + inreplace 'ADM_videoEncoder/ADM_vidEnc_xvid/qt4/cmake_install.cmake', '"libADM_vidEnc_xvid.dylib"', '"${CMAKE_INSTALL_PREFIX}/lib/ADM_plugins/videoEncoder/libADM_vidEnc_xvid.dylib"' - inreplace fx2, + inreplace 'ADM_videoEncoder/ADM_vidEnc_x264/qt4/cmake_install.cmake', '"libADM_vidEnc_x264.dylib"', '"${CMAKE_INSTALL_PREFIX}/lib/ADM_plugins/videoEncoder/libADM_vidEnc_x264.dylib"' end -- cgit v1.2.3