aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/modules.rb
diff options
context:
space:
mode:
authorShaun Jackman2014-03-10 17:14:01 -0700
committerAdam Vandenberg2014-04-17 05:43:09 -0700
commit1664c19f8ef0a8fd2bc02f4674135b0688aafc62 (patch)
tree546cc3ac5aee414ba06948349e772625e86a3411 /Library/Formula/modules.rb
parent672b559e0c8556372303ab4388d1c83fba9c5e64 (diff)
downloadhomebrew-1664c19f8ef0a8fd2bc02f4674135b0688aafc62.tar.bz2
modules 3.2.10
The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. Closes #27394. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/modules.rb')
-rw-r--r--Library/Formula/modules.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/modules.rb b/Library/Formula/modules.rb
new file mode 100644
index 000000000..474a1bf2d
--- /dev/null
+++ b/Library/Formula/modules.rb
@@ -0,0 +1,38 @@
+require "formula"
+
+class Modules < Formula
+ homepage "http://modules.sourceforge.net/"
+ url "https://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.bz2"
+ sha1 "beb67a228ad890206ac776981269a7287cfb7596"
+
+ depends_on :x11 => :optional
+
+ def install
+ # -DUSE_INTERP_ERRORLINE fixes
+ # error: no member named 'errorLine' in 'struct Tcl_Interp'
+ args = %W[
+ --disable-debug
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --prefix=#{prefix}
+ --datarootdir=#{share}
+ --disable-versioning
+ CPPFLAGS=-DUSE_INTERP_ERRORLINE]
+ args << "--without-x" if build.without? "x11"
+ system "./configure", *args
+ system "make", "install"
+ end
+
+ def caveats; <<-EOS.undent
+ To activate modules, add the following at the end of your .zshrc:
+ source #{opt_prefix}/Modules/init/zsh
+ You will also need to reload your .zshrc:
+ source ~/.zshrc
+ EOS
+ end
+
+ test do
+ system *%W[#{prefix}/Modules/bin/modulecmd --version]
+ system "zsh", "-c", "source #{prefix}/Modules/init/zsh; module"
+ end
+end