Dynamically link perl lib to system version.
Closes Homebrew/homebrew#33258. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
efb7012439
commit
444a6b4c22
2 changed files with 12 additions and 7 deletions
|
@ -29,9 +29,11 @@ class Perlmagick < Formula
|
|||
end
|
||||
|
||||
# References the system Perl version.
|
||||
def caveats; <<-EOS.undent
|
||||
You may need to define the Perl library directory for PerlMagick.
|
||||
export PERL5LIB="#{HOMEBREW_PREFIX}/lib/perl5/site_perl/5.16.2"
|
||||
def caveats
|
||||
perl_version = `/usr/bin/perl -e 'printf "%vd", $^V;'`
|
||||
<<-EOS.undent
|
||||
You need to define the OS X system Perl library directory to use PerlMagick:
|
||||
export PERL5LIB="#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{perl_version}"
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,14 +36,17 @@ class Xplanetfx < Formula
|
|||
|
||||
prefix.install "bin", "share"
|
||||
|
||||
sPATH = "#{Formula["coreutils"].opt_prefix}/libexec/gnubin"
|
||||
sPATH += ":#{Formula["gnu-sed"].opt_prefix}/libexec/gnubin" if build.with?("gnu-sed")
|
||||
ENV.prepend_create_path "PERL5LIB", "#{HOMEBREW_PREFIX}/lib/perl5/site_perl/5.16.2" if build.with?("perlmagick")
|
||||
path = "#{Formula["coreutils"].opt_prefix}/libexec/gnubin"
|
||||
path += ":#{Formula["gnu-sed"].opt_prefix}/libexec/gnubin" if build.with?("gnu-sed")
|
||||
if build.with?("perlmagick")
|
||||
perl_version = `/usr/bin/perl -e 'printf "%vd\n", $^V;'`
|
||||
ENV.prepend_create_path "PERL5LIB", "#{HOMEBREW_PREFIX}/lib/perl5/site_perl/#{perl_version}"
|
||||
end
|
||||
if build.with?("gui")
|
||||
ENV.prepend_create_path "PYTHONPATH", "#{HOMEBREW_PREFIX}/lib/python2.7/site-packages/gtk-2.0"
|
||||
ENV.prepend_create_path "GDK_PIXBUF_MODULEDIR", "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
||||
end
|
||||
bin.env_script_all_files(libexec+'bin', :PATH => "#{sPATH}:$PATH", :PYTHONPATH => ENV["PYTHONPATH"], :PERL5LIB => ENV["PERL5LIB"], :GDK_PIXBUF_MODULEDIR => ENV["GDK_PIXBUF_MODULEDIR"])
|
||||
bin.env_script_all_files(libexec+'bin', :PATH => "#{path}:$PATH", :PYTHONPATH => ENV["PYTHONPATH"], :PERL5LIB => ENV["PERL5LIB"], :GDK_PIXBUF_MODULEDIR => ENV["GDK_PIXBUF_MODULEDIR"])
|
||||
end
|
||||
|
||||
def post_install
|
||||
|
|
Loading…
Reference in a new issue