diff options
| author | Dominyk Tiller | 2015-04-24 02:55:25 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-24 18:25:30 +0100 |
| commit | 4928364d746f53ed64b89aebdc8cba8cf9a78b7a (patch) | |
| tree | aea44c892c1de8c0e8574fc354745610fad27663 | |
| parent | 6623476cc59ae66d6e06f85673499a9eec57eae5 (diff) | |
| download | homebrew-4928364d746f53ed64b89aebdc8cba8cf9a78b7a.tar.bz2 | |
dpkg: runtime fixes for perl and shasums
The whole show here is moving to libexec. The Perl problem we had
several versions ago and patched turns out to exist still.
We previously put in a fairly dirty patch for this, essentially
hacking out that element from the configure script. Given the continuing
problem I've just dumped everything in libexec here and env scripted it.
The env script is way less likely to break long-term than the dirty
patch we were using prior to the last release. My testing passed fine
for the last version bump, but evidently not every element of dpkg
calls for the Perl elements at run-time.
I also fixed a couple of rogue quotation marks on one of the inreplaces.
Closes #38990
Closes #38991.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/dpkg.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Library/Formula/dpkg.rb b/Library/Formula/dpkg.rb index 68a2f2cb4..4066f5515 100644 --- a/Library/Formula/dpkg.rb +++ b/Library/Formula/dpkg.rb @@ -19,16 +19,23 @@ class Dpkg < Formula inreplace "scripts/Dpkg/Checksums.pm" do |s| s.gsub! "md5sum", "md5" s.gsub! "sha1sum", "shasum" - s.gsub! "sha256sum", "'shasum', '-a', '256'" + s.gsub! "sha256sum", "shasum', '-a', '256" end # We need to specify a recent gnutar, otherwise various dpkg C programs will # use the system "tar", which will fail because it lacks certain switches. ENV["TAR"] = Formula["gnu-tar"].opt_bin/"gtar" - ENV["PERL_LIBDIR"] = lib/"perl5/site_perl" + + # Theoretically, we could reinsert a patch here submitted upstream previously + # but the check for PERL_LIB remains in place and incompatible with Homebrew. + # Using an env and scripting is a solution less likely to break over time. + # Both variables need to be set. One is compile-time, the other run-time. + ENV["PERL_LIBDIR"] = libexec/"lib/perl5" + ENV.prepend_create_path "PERL5LIB", libexec+"lib/perl5" + system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", - "--prefix=#{prefix}", + "--prefix=#{libexec}", "--sysconfdir=#{etc}", "--localstatedir=#{var}", "--disable-dselect", @@ -37,6 +44,10 @@ class Dpkg < Formula "--disable-update-alternatives" system "make" system "make", "install" + + bin.install Dir["#{libexec}/bin/*"] + man.install Dir["#{libexec}/share/man/*"] + bin.env_script_all_files(libexec+"bin", :PERL5LIB => ENV["PERL5LIB"]) end def caveats; <<-EOS.undent |
