aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/minizinc.rb
blob: 160c6cc5c8e9d63928262795a771685992891841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require 'formula'

class Minizinc < Formula
  homepage 'http://www.minizinc.org'
  url 'http://www.minizinc.org/downloads/release-1.6/minizinc-1.6-x86_64-apple-darwin.tar.gz'
  sha1 '71f0e08962eb8bb44c463851f0144c8b006fdb80'

  depends_on :arch => :x86_64

  # remove echoed recommendations about linking directories
  # add installation location as parameter of SETUP script
  patch :DATA

  def install
    system "sh", "SETUP", libexec
    man.install Dir['doc/man/*']
    libexec.install 'bin', 'lib'
    bin.install_symlink Dir["#{libexec}/bin/*"]
    (bin/'private').unlink
  end

  test do
    system "#{bin}/mzn2fzn", "--help"
  end
end

__END__
diff --git a/SETUP b/SETUP
index 33d973e..7715800 100755
--- a/SETUP
+++ b/SETUP
@@ -33,7 +33,3 @@ chmod a+x bin/mzn2fzn
 #----------------------------------------------------------------------------#

 echo "-- G12 MiniZinc distribution setup complete."
-echo
-echo "-- Don't forget to add $INSTALL_PATH/bin to your PATH"
-echo "-- and $INSTALL_PATH/doc/man to your MANPATH."
-echo

diff --git a/SETUP b/SETUP
index 7715800..71c93b6 100755
--- a/SETUP
+++ b/SETUP
@@ -11,7 +11,7 @@
 
 #-----------------------------------------------------------------------------#

-INSTALL_PATH=`pwd`
+INSTALL_PATH=$1
 EXEEXT=""
  
 #----------------------------------------------------------------------------#