Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
ghc: install static gmp in prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-nixon committed Apr 25, 2015
1 parent 0ec3717 commit 670b0ab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Library/Formula/ghc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def install
ENV.m32 if build.build_32_bit?

# Build a static gmp (to avoid dynamic linking to ghc)
gmp_prefix = buildpath/"gmp-static"
gmp_prefix = libexec/"gmp-static"
resource("gmp").stage do
gmp_args = ["--prefix=#{gmp_prefix}", "--enable-cxx", "--enable-shared=no"]
gmp_args << "ABI=32" if build.build_32_bit?
Expand All @@ -84,8 +84,7 @@ def install
system "./configure", *gmp_args
system "make"
system "make", "check"
ENV.deparallelize
system "make", "install"
system "make", "-j1", "install"
end

# Move the main tarball contents into a subdirectory
Expand Down Expand Up @@ -134,8 +133,8 @@ def install
system "./configure", "--prefix=#{prefix}",
"--build=#{arch}-apple-darwin",
"--with-gcc=#{ENV.cc}",
"--with-gmp-includes=#{gmp_prefix}",
"--with-gmp-libraries=#{gmp_prefix}"
"--with-gmp-includes=#{gmp_prefix}/include",
"--with-gmp-libraries=#{gmp_prefix}/lib"
system "make"

if build.with? "tests"
Expand Down

0 comments on commit 670b0ab

Please sign in to comment.