homebrew-core/Formula/pcre.rb

54 lines
1.7 KiB
Ruby

class Pcre < Formula
desc "Perl compatible regular expressions library"
homepage "http://www.pcre.org/"
url "https://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.bz2"
mirror "https://www.mirrorservice.org/sites/downloads.sourceforge.net/p/pc/pcre/pcre/8.38/pcre-8.38.tar.bz2"
sha256 "b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df"
bottle do
cellar :any
sha256 "ef6908428e587406f50eb4d09813c823f8a6748324425930681bfcee271211df" => :el_capitan
sha256 "96b7b6dc6b5e5efb1d736f3a035ca2c01f045f3ba80b80744548e5de6b1c5fe1" => :yosemite
sha256 "fb5e4de4665dd83c6516a14d1d8ad41e80a1de608212e2aac14fd4e04b1d4341" => :mavericks
end
head do
url "svn://vcs.exim.org/pcre/code/trunk"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
end
option :universal
fails_with :llvm do
build 2326
cause "Bus error in ld on SL 10.6.4"
end
def install
ENV.universal_binary if build.universal?
system "./autogen.sh" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-utf8",
"--enable-pcre8",
"--enable-pcre16",
"--enable-pcre32",
"--enable-unicode-properties",
"--enable-pcregrep-libz",
"--enable-pcregrep-libbz2",
"--enable-jit"
system "make"
ENV.deparallelize
system "make", "test"
system "make", "install"
end
test do
system "#{bin}/pcregrep", "regular expression", "#{prefix}/README"
end
end