pgtap 0.94.0.

Closes Homebrew/homebrew#25903.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
David E. Wheeler 2014-01-16 23:44:46 +00:00 committed by Mike McQuaid
parent 66f7385674
commit 763b222f02
1 changed files with 38 additions and 6 deletions

View File

@ -1,16 +1,48 @@
require 'formula'
class Pgtap < Formula
homepage 'http://pgtap.org'
url 'http://api.pgxn.org/dist/pgtap/0.91.0/pgtap-0.91.0.zip'
sha1 '1f10b78eb42361659603228c754a55755fcff4fa'
homepage 'http://pgtap.org/'
url 'http://api.pgxn.org/dist/pgtap/0.94.0/pgtap-0.94.0.zip'
sha1 '58c04a57d79345c18525ed4aee9db058964408a1'
head 'https://github.com/theory/pgtap.git'
depends_on :postgresql
# Not :postgresql, because we need to install into its share directory.
depends_on 'postgresql'
skip_clean 'share'
resource 'Test::Harness' do
url 'http://cpan.metacpan.org/authors/id/L/LE/LEONT/Test-Harness-3.30.tar.gz'
sha1 '5f7cc2392accaf47100cf2a57c5513c3fa29b1dc'
end
resource 'TAP::Parser::SourceHandler::pgTAP' do
url 'http://cpan.metacpan.org/authors/id/D/DW/DWHEELER/TAP-Parser-SourceHandler-pgTAP-3.29.tar.gz'
sha1 '8cf6dc2ec833b896a0638390a33e2c477a58e020'
end
def install
ENV.prepend_path 'PATH', Formula.factory('postgresql').bin
system "make install"
# Make sure modules can find just-installed dependencies.
arch = %x(perl -MConfig -E 'print $Config{archname}')
plib = "#{lib}/perl5"
ENV['PERL5LIB'] = "#{plib}:#{plib}/#{arch}:#{lib}:#{lib}/#{arch}"
resource('Test::Harness').stage do
system 'perl', 'Makefile.PL', "INSTALL_BASE=#{prefix}",
"INSTALLSITEMAN1DIR=#{man1}", "INSTALLSITEMAN3DIR=#{man3}"
system 'make'
system 'make', 'install'
end
resource('TAP::Parser::SourceHandler::pgTAP').stage do
system 'perl', 'Build.PL', "--install_base", prefix, '--install_path',
"bindoc=#{man1}", '--install_path', "libdoc=#{man3}"
system './Build'
system './Build', 'install'
end
pg_config = Formula.factory('postgresql').opt_prefix/'bin/pg_config'
system 'make', "PG_CONFIG=#{pg_config}"
system 'make', "PG_CONFIG=#{pg_config}", 'install'
end
end