Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 12 files changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 15, 2010
@tianyicui tianyicui Refactored LLVM formula
* Add HEAD option
* Optionally build Ocaml binding
* Optionally build all targets
* Enable libffi and shared library by default
* Install files in LLVM_SRC_DIR and LLVM_OBJ_DIR
* Install Clang Static Analyzer with clang
670ad40
@tianyicui tianyicui r: depends on gfortran explicitly when no gfortran executable is found e217aa5
@tianyicui tianyicui New formula: jacl ee6f0d4
@tianyicui tianyicui New Formula: ats-lang-anairiats f41485c
@tianyicui tianyicui gfortran: typo in caveats 9ad4624
@tianyicui tianyicui Updated formula: sbcl 1.0.43
Built from source while automatically download and use the official
1.0.29 binary to bootstrap.
3f0e95d
@tianyicui tianyicui PLT Racket 5.0.2 and alias `racket`. 0db56c1
@tianyicui tianyicui Use https for all GitHub URLs 41ab9ee
@tianyicui tianyicui dependency of cmake should be marked as :build a921062
@tianyicui tianyicui swi-prolog: add fails_with_llvm and test a03cb81
@tianyicui tianyicui New formula: Clozure CL 1193b8b
Matt Barnett Add mit-scheme Formula
Signed-off-by: Tianyi Cui <tianyicui@gmail.com>
4091fb2
Commits on Nov 16, 2010
@tianyicui tianyicui mit-scheme: fix build when gdbm is installed using Homebrew ffb16bc
Commits on Mar 13, 2011
@tianyicui tianyicui Merge remote-tracking branch 'mxcl/master'
Conflicts:
	Library/Formula/arping.rb
	Library/Formula/autojump.rb
	Library/Formula/browser.rb
	Library/Formula/btpd.rb
	Library/Formula/c10t.rb
	Library/Formula/clojure-contrib.rb
	Library/Formula/clojure.rb
	Library/Formula/couchdb-lucene.rb
	Library/Formula/couchdb.rb
	Library/Formula/cpansearch.rb
	Library/Formula/discount.rb
	Library/Formula/docbook.rb
	Library/Formula/doubledown.rb
	Library/Formula/elasticsearch.rb
	Library/Formula/emacs.rb
	Library/Formula/exodriver.rb
	Library/Formula/flac.rb
	Library/Formula/gettext.rb
	Library/Formula/gfortran.rb
	Library/Formula/ghostscript.rb
	Library/Formula/gist.rb
	Library/Formula/git-extras.rb
	Library/Formula/git-ssh.rb
	Library/Formula/git-subtree.rb
	Library/Formula/gmp.rb
	Library/Formula/go.rb
	Library/Formula/greg.rb
	Library/Formula/growlnotify.rb
	Library/Formula/hub.rb
	Library/Formula/kiwi.rb
	Library/Formula/kumofs.rb
	Library/Formula/lastfmfpclient.rb
	Library/Formula/leiningen.rb
	Library/Formula/liblastfm.rb
	Library/Formula/llvm.rb
	Library/Formula/magit.rb
	Library/Formula/metalua.rb
	Library/Formula/openldap.rb
	Library/Formula/orderly.rb
	Library/Formula/p0f.rb
	Library/Formula/pianobar.rb
	Library/Formula/plt-racket.rb
	Library/Formula/plustache.rb
	Library/Formula/r.rb
	Library/Formula/ringojs.rb
	Library/Formula/rock.rb
	Library/Formula/rpg.rb
	Library/Formula/sbcl.rb
	Library/Formula/shell.fm.rb
	Library/Formula/swi-prolog.rb
	Library/Formula/term.rb
	Library/Formula/voldemort.rb
	Library/Formula/webkit2png.rb
	Library/Homebrew/brew.h.rb
d44f4d3
View
1 Library/Aliases/ats-anairiats
View
1 Library/Aliases/ccl
View
1 Library/Aliases/openmcl
View
1 Library/Aliases/racket
View
31 Library/Formula/ats-lang-anairiats.rb
@@ -0,0 +1,31 @@
+require 'formula'
+
+class AtsLangAnairiats <Formula
+ url 'http://downloads.sourceforge.net/sourceforge/ats-lang/ats-lang-anairiats-0.2.2.tar.gz'
+ homepage 'http://www.ats-lang.org'
+ md5 '5dfe7c0f2fa22c341e153ed88ffbafa9'
+
+ depends_on 'gmp'
+
+ def install
+ ENV.j1
+ ENV['ATSHOME']=pwd
+ ENV['ATSHOMERELOC']="ATS-#{version}"
+ system "./configure", "--prefix=#{prefix}"
+ system "make all"
+ system "make install"
+ end
+
+ def caveats
+ <<-EOS.undent
+ In order to use ATS/GTK, you must have gtk+ installed. To do so, run:
+ $ brew install gtk
+ In order to use ATK/Cairo, you must have cairo installed. To do so, run:
+ $ brew install cairo
+ EOS
+ end
+
+ def test
+ system "atscc --version"
+ end
+end
View
25 Library/Formula/clozure-cl.rb
@@ -0,0 +1,25 @@
+require 'formula'
+
+class ClozureCl <Formula
+ url 'ftp://ftp.clozure.com/pub/release/1.5/ccl-1.5-darwinx86.tar.gz'
+ version '1.5'
+ homepage 'http://openmcl.clozure.com/'
+ md5 'd43f9c2aa94b58d9ef56e48638a22ebc'
+
+ def install
+ rm_rf Dir['**/.svn/']+Dir['**/.cvsignore']
+ system "echo '(ccl::rebuild-ccl :full t)' | ./#{bootimg} --batch"
+ (share/'ccl').install Dir['*']
+ (bin/'ccl').write <<-EOF.undent
+ #!/bin/sh
+ export CCL_DEFAULT_DIRECTORY=#{share/'ccl'}
+ exec ${CCL_DEFAULT_DIRECTORY}/#{bootimg} "$@"
+ EOF
+ chmod 0755, bin/'ccl'
+ end
+
+ def bootimg
+ "dx86cl#{snow_leopard_64? ? '64':''}"
+ end
+
+end
View
17 Library/Formula/jacl.rb
@@ -0,0 +1,17 @@
+require 'formula'
+
+class Jacl <Formula
+ url 'http://downloads.sourceforge.net/project/tcljava/jacl/1.4.1/jacl1.4.1.tar.gz'
+ version '1.4.1'
+ homepage 'http://tcljava.sourceforge.net/'
+ md5 'a7ec8300e8933164e854460c73ac6269'
+
+ def install
+ system "./configure", "--prefix=#{prefix}"
+ inreplace "Makefile", "mkdir ", "mkdir -p "
+ system "make"
+ system "make install"
+ system "make tjc2"
+ system "make install"
+ end
+end
View
2 Library/Formula/liblas.rb
@@ -5,7 +5,7 @@ class Liblas < Formula
homepage 'http://liblas.org'
md5 '4a08325b7daf4006e3762804d722b770'
- depends_on 'cmake'
+ depends_on 'cmake' => :build
depends_on 'libgeotiff'
depends_on 'gdal'
depends_on 'boost'
View
106 Library/Formula/llvm.rb
@@ -1,20 +1,36 @@
require 'formula'
-def build_clang?; ARGV.include? '--with-clang'; end
-def build_universal?; ARGV.include? '--universal'; end
-def build_shared?; ARGV.include? '--shared'; end
-def build_rtti?; ARGV.include? '--rtti'; end
+def build_clang?
+ ARGV.include? '--with-clang'
+end
+def all_targets?
+ ARGV.include? '--all-targets'
+end
+def ocaml_binding?
+ ARGV.include? '--ocaml-binding'
+end
+def build_universal?
+ ARGV.include? '--universal'
+end
+def build_shared?
+ ARGV.include? '--shared'
+end
+def build_rtti?
+ ARGV.include? '--rtti'
+end
class Clang < Formula
url 'http://llvm.org/releases/2.8/clang-2.8.tgz'
homepage 'http://llvm.org/'
md5 '10e14c901fc3728eecbd5b829e011b59'
+ head 'http://llvm.org/svn/llvm-project/cfe/trunk', :using => :svn
end
class Llvm < Formula
url 'http://llvm.org/releases/2.8/llvm-2.8.tgz'
homepage 'http://llvm.org/'
md5 '220d361b4d17051ff4bb21c64abe05ba'
+ head 'http://llvm.org/svn/llvm-project/llvm/trunk', :using => :svn
def patches
# changes the link options for the shared library build
@@ -24,14 +40,22 @@ def patches
end
def options
- [['--with-clang', 'Also build & install clang'],
- ['--shared', 'Build shared library'],
- ['--rtti', 'Build with RTTI information'],
- ['--universal', 'Build both i386 and x86_64 architectures']]
+ [
+ ['--with-clang', 'Build and install clang and clang static analyzer'],
+ ['--all-targets', 'Build non-host targets'],
+ ['--ocaml-binding', 'Enable Ocaml language binding'],
+ ['--shared', 'Build shared library'],
+ ['--rtti', 'Build with RTTI information'],
+ ['--universal', 'Build both i386 and x86_64 architectures']
+ ]
end
+ depends_on 'objective-caml' if ocaml_binding?
+
+ skip_clean :all
+
def install
- ENV.gcc_4_2 # llvm can't compile itself
+ fails_with_llvm "The llvm-gcc in Xcode is outdated to compile current version of llvm"
if build_shared? && build_universal?
onoe "Cannot specify both shared and universal (will not build)"
@@ -39,42 +63,78 @@ def install
end
if build_clang?
- clang_dir = Pathname.new(Dir.pwd)+'tools/clang'
- Clang.new.brew { clang_dir.install Dir['*'] }
+ clang_dir = Pathname(Dir.pwd)+'tools/clang'
+ Clang.new('clang').brew { clang_dir.install Dir['*'] }
end
if build_universal?
ENV['UNIVERSAL'] = '1'
ENV['UNIVERSAL_ARCH'] = 'i386 x86_64'
end
-
ENV['REQUIRES_RTTI'] = '1' if build_rtti?
- configure_options = ["--prefix=#{prefix}",
- "--enable-targets=host-only",
- "--enable-optimized"]
-
- configure_options << "--enable-shared" if build_shared?
-
- system "./configure", *configure_options
+ source_dir = Pathname(Dir.pwd)
+ build_dir = source_dir+'build'
+ mkdir build_dir
+ cd build_dir do
+ build_dir = Pathname(Dir.pwd)
+ system "#{source_dir}/configure", "--prefix=#{prefix}",
+ "--disable-assertions",
+ "--enable-bindings=#{ocaml_binding? ? 'ocaml':'none'}",
+ "--enable-libffi",
+ "--enable-optimized",
+ "--#{build_shared ? 'enable' : 'disable'}-shared",
+ "--enable-targets=#{all_targets? ? 'all':'host-only'}"
+ system "make"
+ system "make install"
+ end
system "make" # separate steps required, otherwise the build fails
system "make install"
+ # Install files in LLVM_SRC_DIR and LLVM_OBJ_DIR, they're necessary for llvm to compile some targets, e.g. llvm-gcc
+ # What to copy is roughly the same as MacPorts did
+ src_dir = prefix+'lib/llvm/src'
+ obj_dir = prefix+'lib/llvm/obj'
+ mkdir_p [src_dir, obj_dir]
+ cp_r source_dir+'include', src_dir
+ rm_r [build_dir+'Release/lib/ocaml'] if ocaml_binding? # duplicated
+ cp_r [build_dir+'include', build_dir+'Release', build_dir+'Makefile.config'], obj_dir
+ rm_f Dir["#{lib}/llvm/obj/Release/**/.dir"]
+ inreplace ["#{bin}/llvm-config", "#{obj_dir}/Release/bin/llvm-config"] do |s|
+ s.gsub! build_dir, obj_dir
+ s.gsub! source_dir, src_dir
+ end
+
+ # Install Clang Static Analyzer (http://clang-analyzer.llvm.org/)
if build_clang?
- Dir.chdir clang_dir do
- system "make install"
+ dest_dir = libexec+'clang-analyzer'
+ for tool in ['scan-build', 'scan-view'] do
+ dest_dir.install Dir["tools/clang/tools/#{tool}/*"]
+ # create relative symbol link in bin
+ ln_s (dest_dir+tool).relative_path_from(bin), bin
+ end
+ # pre-compile Python scripts
+ for opt_arg in ['', '-O'] do
+ system "/usr/bin/env python #{opt_arg} -m compileall #{dest_dir}"
end
+ # relative symbol link to clang to prevent the "'clang' executable not found" warning message
+ mkdir dest_dir+'bin'
+ ln_s bin+'clang', dest_dir+'bin/clang'
+ ln_s 'clang', dest_dir+'bin/clang++'
end
end
def caveats; <<-EOS
- If you already have LLVM installed, then "brew upgrade llvm" might not
- work. Instead, try:
+ If you already have pre-2.8 LLVM installed, then "brew upgrade llvm" might not work. Instead, try:
$ brew rm llvm
$ brew install llvm
EOS
end
+
+ def test
+ system 'llvm-config'
+ end
end
__END__
View
33 Library/Formula/mit-scheme.rb
@@ -0,0 +1,33 @@
+require 'formula'
+
+class MitScheme <Formula
+ url 'http://ftp.gnu.org/gnu/mit-scheme/stable.pkg/9.0.1/mit-scheme-c-9.0.1.tar.gz'
+ homepage 'http://www.gnu.org/software/mit-scheme/'
+ md5 '92884092806dd075f103cd1e9996413c'
+
+ # Do not strip the binaries, this will cause missing symbol errors on launch
+ skip_clean :all
+
+ def install
+ # The build breaks __HORRIBLY__ with parallel make -- one target will erase something
+ # before another target gets it, so it's easier to change the environment than to
+ # change_make_var, because there are Makefiles littered everywhere
+ ENV.j1
+
+ # Liarc builds must launch within the src dir, not using the top-level Makefile
+ cd "src"
+
+ # Take care of some hard-coded paths
+ inreplace %w(6001/edextra.scm 6001/floppy.scm compiler/etc/disload.scm configure
+ edwin/techinfo.scm edwin/unix.scm lib/include/configure lib/include/option.c
+ swat/c/tk3.2-custom/Makefile swat/c/tk3.2-custom/tcl/Makefile swat/scheme/other/btest.scm) do |s|
+ s.gsub! "/usr/local", prefix
+ end
+
+ # The configure script will add '-isysroot' to CPPFLAGS, so it didn't check .h here by default even Homebrew is installed in /usr/local. This breaks things when gdbm or other optional dependencies was installed using Homebrew
+ ENV.prepend 'CPPFLAGS', "-I#{HOMEBREW_PREFIX}/include"
+
+ system "etc/make-liarc.sh", "--disable-debug", "--prefix=#{prefix}", "--mandir=#{man}"
+ system "make install"
+ end
+end
View
2 Library/Formula/sedna.rb
@@ -6,7 +6,7 @@ class Sedna < Formula
md5 '8c0006dbfb0ab89a63b4ae93e35f2213'
version '3.4.66'
- depends_on 'cmake'
+ depends_on 'cmake' => :build
def install
path = pwd
View
2 Library/Formula/zint.rb
@@ -6,7 +6,7 @@ class Zint < Formula
md5 '7ec4441907827fa613b11847a467c61d'
head 'git://zint.git.sourceforge.net/gitroot/zint/zint'
- depends_on 'cmake'
+ depends_on 'cmake' => :build
depends_on 'libpng'
def install

No commit comments for this range

Something went wrong with that request. Please try again.