From 4b198a6664e40474a56f6c952fbdd25170b5cdd5 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 21 Aug 2010 12:18:17 -0700 Subject: [PATCH] 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. --- Library/Homebrew/install.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 72a2f16821..d4b42fe93e 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -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