blob: 54ca253637db8adc2b9b2200e597617170bd0bae (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  | 
require 'formula'
class Guile < Formula
  homepage 'http://www.gnu.org/software/guile/'
  url 'http://ftpmirror.gnu.org/guile/guile-2.0.9.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/guile/guile-2.0.9.tar.gz'
  sha1 'fc5d770e8b1d364b2f222a8f8c96ccf740b2956f'
  head do
    url 'http://git.sv.gnu.org/r/guile.git'
    depends_on 'autoconf' => :build
    depends_on 'automake' => :build
    depends_on 'gettext' => :build
  end
  depends_on 'pkg-config' => :build
  depends_on :libtool
  depends_on 'libffi'
  depends_on 'libunistring'
  depends_on 'bdw-gc'
  depends_on 'gmp'
  # GNU Readline is required; libedit won't work.
  depends_on 'readline'
  fails_with :llvm do
    build 2336
    cause "Segfaults during compilation"
  end
  fails_with :clang do
    build 211
    cause "Segfaults during compilation"
  end
  # Only for 2.0.9: Fix shebang shell in build-aux/install-sh.
  # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14201#19
  def patches; DATA; end
  def install
    system './autogen.sh' if build.head?
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-libreadline-prefix=#{Formula["readline"].prefix}",
                          "--with-libgmp-prefix=#{Formula["gmp"].prefix}"
    system "make install"
    # A really messed up workaround required on OS X --mkhl
    lib.cd { Dir["*.dylib"].each {|p| ln_sf p, File.basename(p, ".dylib")+".so" }}
  end
  test do
    hello = testpath/'hello.scm'
    hello.write <<-EOS.undent
    (display "Hello World")
    (newline)
    EOS
    ENV['GUILE_AUTO_COMPILE'] = '0'
    system bin/'guile', hello
  end
end
__END__
--- guile-2.0.9.orig/build-aux/install-sh  2013-01-28 12:35:24.000000000 -0800
+++ guile-2.0.9/build-aux/install-sh	2013-04-21 08:41:10.000000000 -0700
@@ -1,4 +1,4 @@
-#!/nix/store/ryk1ywzz31kp4biclxq3yq6hpjycalyy-bash-4.2/bin/sh
+#!/bin/sh
 # install - install a program, script, or datafile
 scriptversion=2011-11-20.07; # UTC
  |