From 8f51e53912bc395c9afef12ca7a0654907e3c8ee Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 16 Feb 2015 20:20:41 +0000 Subject: [PATCH] capstone: fix pkg-config references Closes Homebrew/homebrew#36871. Closes Homebrew/homebrew#36872. Signed-off-by: Mike McQuaid --- Formula/capstone.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/capstone.rb b/Formula/capstone.rb index 78c61709add50..60e2e01c16383 100644 --- a/Formula/capstone.rb +++ b/Formula/capstone.rb @@ -1,5 +1,3 @@ -require "formula" - class Capstone < Formula homepage "http://capstone-engine.org" url "http://capstone-engine.org/download/3.0.1/capstone-3.0.1.tgz" @@ -21,6 +19,12 @@ def install ENV["HOMEBREW_CAPSTONE"] = "1" system "./make.sh" system "./make.sh", "install" + + # As per the above inreplace, the pkgconfig file needs fixing as well. + inreplace lib/"pkgconfig/capstone.pc" do |s| + s.gsub! "/usr/lib", lib + s.gsub! "/usr/include/capstone", include + end end test do