hadoop: depend on openjdk
Closes #50490. Signed-off-by: Alexander Bayandin <a.bayandin@gmail.com>master
parent
371c339212
commit
93d5f4c563
|
@ -4,19 +4,26 @@ class Hadoop < Formula
|
|||
url "https://www.apache.org/dyn/closer.cgi?path=hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz"
|
||||
mirror "https://archive.apache.org/dist/hadoop/common/hadoop-3.2.1/hadoop-3.2.1.tar.gz"
|
||||
sha256 "f66a3a4115b8f16c1077d1a198a06854dbef0e4233291712ed08d0a10629ed37"
|
||||
revision 1
|
||||
|
||||
bottle :unneeded
|
||||
|
||||
depends_on :java => "1.8+"
|
||||
depends_on "openjdk"
|
||||
|
||||
conflicts_with "yarn", :because => "both install `yarn` binaries"
|
||||
|
||||
def install
|
||||
rm_f Dir["bin/*.cmd", "sbin/*.cmd", "libexec/*.cmd", "etc/hadoop/*.cmd"]
|
||||
libexec.install %w[bin sbin libexec share etc]
|
||||
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
||||
sbin.write_exec_script Dir["#{libexec}/sbin/*"]
|
||||
libexec.write_exec_script Dir["#{libexec}/libexec/*.sh"]
|
||||
Dir["#{libexec}/bin/*"].each do |path|
|
||||
(bin/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix
|
||||
end
|
||||
Dir["#{libexec}/sbin/*"].each do |path|
|
||||
(sbin/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix
|
||||
end
|
||||
Dir["#{libexec}/libexec/*.sh"].each do |path|
|
||||
(libexec/File.basename(path)).write_env_script path, :JAVA_HOME => Formula["openjdk"].opt_prefix
|
||||
end
|
||||
# Temporary fix until https://github.com/Homebrew/brew/pull/4512 is fixed
|
||||
chmod 0755, Dir["#{libexec}/*.sh"]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue