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

New formula: clisp #2707

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions Library/Formula/clisp.rb
@@ -0,0 +1,48 @@
require 'formula'

class Clisp <Formula
url 'http://ftp.gnu.org/pub/gnu/clisp/release/2.49/clisp-2.49.tar.bz2'
homepage 'http://clisp.cons.org/'
md5 '1962b99d5e530390ec3829236d168649'

depends_on 'libiconv'
depends_on 'libsigsegv'
depends_on 'readline'

skip_clean :all # otherwise abort trap

def install
# This build isn't parallel safe.
ENV.j1

# Clisp requires to select word size explicitly this way,
# set it in CFLAGS won't work.
ENV['CC'] = "#{ENV.cc} -m#{snow_leopard_64? ? 64 : 32}"

system "./configure", "--prefix=#{prefix}",
"--with-readline=yes"

cd "src" do
# Multiple -O options will be in the generated Makefile,
# make Homebrew's the last such option so it's effective.
inreplace "Makefile" do |mk|
cf = mk.get_make_var("CFLAGS")
cf.gsub! ENV['CFLAGS'], ''
cf += ' '+ENV['CFLAGS']
mk.change_make_var! 'CFLAGS', cf
end

# The ulimit must be set, otherwise `make` will fail and tell you to do so
system "ulimit -s 16384 && make"

# Considering the complexity of this package, a self-check is highly recommended.
system "make check"

system "make install"
end
end

def test
system "clisp --version"
end
end
26 changes: 26 additions & 0 deletions Library/Formula/libiconv.rb
@@ -0,0 +1,26 @@
require 'formula'

class Libiconv <Formula
url 'http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz'
homepage 'http://www.gnu.org/software/libiconv/'
md5 '7ab33ebd26687c744a37264a330bbe9a'

def keg_only?
:provided_by_osx
end

def patches
{ :p1 => [
'http://svn.macports.org/repository/macports/trunk/dports/textproc/libiconv/files/patch-Makefile.devel',
'http://svn.macports.org/repository/macports/trunk/dports/textproc/libiconv/files/patch-utf8mac.diff',
'http://gist.github.com/raw/355571/2fac6d8b7471e4787748f6335ff062908ec0fdc2/gistfile1.txt']
}
end

def install
ENV.j1
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--enable-extra-encodings"
system "make -f Makefile.devel"
system "make install"
end
end