Warn about jars in lib.

Java software tends to come with its own mini file layout including
bin, lib and other folders. The lib folder typically holds jars,
which can conflict between packages if linked into HOMEBREW_PREFIX/lib
and aren't needed to compile other .dylib based software anyway.

The recommendation for Java software is to install to "libexec" and then
symlink or wrap binaries from libexec/bin to bin in the Cellar.
This commit is contained in:
Adam Vandenberg 2010-08-21 12:18:17 -07:00
parent c905fb79f4
commit 4b198a6664

View File

@ -150,13 +150,22 @@ def install f
end
end
# Check for possibly misplaced folders
# Check for man pages that aren't in share/man
if (f.prefix+'man').exist?
opoo 'A top-level "man" folder was found.'
puts "Homebrew requires that man pages live under share."
puts 'This can often be fixed by passing "--mandir=#{man}" to configure.'
end
# Check for Jars in lib
unless f.lib.children.select{|g| g.to_s =~ /\.jar$/}.empty?
opoo 'JARs where installed to "lib".'
puts "Installing JARs to \"lib\" can cause conflicts between packages."
puts "For Java software, it is typically better for the formula to"
puts "install to \"libexec\" and then symlink or wrap binaries into \"bin\"."
puts "See \"activemq\", \"jruby\", etc. for examples."
end
# link from Cellar to Prefix
begin
Keg.new(f.prefix).link