Add devel to the DSL, + stable and bottle blocks

This commit adds a `devel` entry to the DSL, allowing formulae to
specify an unstable branch.

`devel` takes a block, which should contain standard `url` and `md5`
fields (and `version`, if necessary). This must come after the standard
DSL fields.

This commit also migrates over all formulae currently using `devel` to
the new syntax, as well as formulae which used `head` for non-VCS urls.

The new syntax is also available for `stable` and `bottle`. `stable` is
an option alongside the old syntax. `bottle` replaces the old syntax.

Note that the @stable ivar in Formula has been renamed to @standard,
and the @bottle ivar has been renamed to @bottle_url.

Closes Homebrew/homebrew#9735.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
Misty De Meo 2012-01-22 22:32:15 -06:00
parent ae8de6821b
commit 2f03f781da
15 changed files with 66 additions and 63 deletions

View file

@ -3,13 +3,13 @@ require 'formula'
class BdwGc < Formula
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
if ARGV.build_devel?
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz'
md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
devel do
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
md5 '319d0b18cc4eb735c8038ece9df055e4'
version '7.2alpha6'
else
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz'
md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
end
# patch to fix inline asm errors with LLVM, present in upstream SVN

View file

@ -7,8 +7,10 @@ class Boost < Formula
head 'http://svn.boost.org/svn/boost/trunk', :using => :svn
# Bottle built on 10.7.2 using XCode 4.2
bottle 'https://downloads.sourceforge.net/project/machomebrew/Bottles/boost-1.48.0-bottle.tar.gz'
bottle_sha1 'c7871ddd020a24e3b0cfd3c9a352a1210b68b372'
bottle do
url 'https://downloads.sourceforge.net/project/machomebrew/Bottles/boost-1.48.0-bottle.tar.gz'
sha1 'c7871ddd020a24e3b0cfd3c9a352a1210b68b372'
end
def patches
# https://svn.boost.org/trac/boost/ticket/6131

View file

@ -4,8 +4,11 @@ class Cmake < Formula
url 'http://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz'
md5 'e1b237aeaed880f65dec9c20602452f6'
homepage 'http://www.cmake.org/'
bottle 'https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.7-bottle.tar.gz'
bottle_sha1 'f218ed64ce6e7a5d3670acdd6a18e5ed95421d1f'
bottle do
url 'https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.7-bottle.tar.gz'
sha1 'f218ed64ce6e7a5d3670acdd6a18e5ed95421d1f'
end
def install
# A framework-installed expat will be detected and mess things up.

View file

@ -27,8 +27,10 @@ class Erlang < Formula
md5 'f6cd1347dfb6436b99cc1313011a3d24'
version 'R14B04'
bottle 'https://downloads.sf.net/project/machomebrew/Bottles/erlang-R14B04-bottle.tar.gz'
bottle_sha1 '0cbd2ebd59491a473b38833970ba0cfb78549594'
bottle do
url 'https://downloads.sf.net/project/machomebrew/Bottles/erlang-R14B04-bottle.tar.gz'
sha1 '0cbd2ebd59491a473b38833970ba0cfb78549594'
end
head 'https://github.com/erlang/otp.git', :branch => 'dev'

View file

@ -3,11 +3,11 @@ require 'formula'
class Fltk < Formula
url 'http://ftp2.easysw.com/pub/fltk/1.3.0/fltk-1.3.0-source.tar.gz'
homepage 'http://www.fltk.org/'
head 'http://ftp.easysw.com/pub/fltk/snapshots/fltk-1.3.x-r9013.tar.bz2'
if ARGV.build_head?
md5 '44d5d7ba06afdd36ea17da6b4b703ca3'
devel do
url 'http://ftp.easysw.com/pub/fltk/snapshots/fltk-1.3.x-r9013.tar.bz2'
md5 '9c5eb9eb8642be56cb68e7c5b1c98611'
else
md5 '44d5d7ba06afdd36ea17da6b4b703ca3'
end
depends_on 'jpeg'

View file

@ -2,14 +2,14 @@ require 'formula'
class Fox < Formula
# Development and stable branches are incompatible
if ARGV.build_devel?
url 'ftp://ftp.fox-toolkit.org/pub/fox-1.6.44.tar.gz'
md5 '6ccc8cbcfa6e4c8b6e4deeeb39c36434'
homepage 'http://www.fox-toolkit.org/'
devel do
url 'http://ftp.fox-toolkit.org/pub/fox-1.7.30.tar.gz'
md5 '345df53f1e652bc99d1348444b4e3016'
else
url 'ftp://ftp.fox-toolkit.org/pub/fox-1.6.44.tar.gz'
md5 '6ccc8cbcfa6e4c8b6e4deeeb39c36434'
end
homepage 'http://www.fox-toolkit.org/'
fails_with_llvm "Inline asm errors during build" if ARGV.build_devel?

View file

@ -2,16 +2,16 @@ require 'formula'
class Ghc < Formula
homepage 'http://haskell.org/ghc/'
if not ARGV.build_devel?
version '7.0.4'
if ARGV.include? '--64bit'
url "http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-x86_64-apple-darwin.tar.bz2"
md5 'af89d3d2ca6e9b23384baacb7d8161dd'
else
url "http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-i386-apple-darwin.tar.bz2"
md5 'ce297e783d113cf1547386703d1b1061'
end
version '7.0.4'
if ARGV.include? '--64bit'
url "http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-x86_64-apple-darwin.tar.bz2"
md5 'af89d3d2ca6e9b23384baacb7d8161dd'
else
url "http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-i386-apple-darwin.tar.bz2"
md5 'ce297e783d113cf1547386703d1b1061'
end
devel do
version '7.2.2'
if ARGV.include? '--64bit'
url "http://www.haskell.org/ghc/dist/7.2.2/ghc-7.2.2-x86_64-apple-darwin.tar.bz2"

View file

@ -3,13 +3,12 @@ require 'formula'
class Guile < Formula
homepage 'http://www.gnu.org/software/guile/'
url 'http://ftpmirror.gnu.org/guile/guile-1.8.7.tar.gz'
sha1 '24cd2f06439c76d41d982a7384fe8a0fe5313b54'
mirror 'http://ftp.gnu.org/gnu/guile/guile-1.8.7.tar.gz'
head 'http://ftpmirror.gnu.org/guile/guile-2.0.2.tar.gz'
if ARGV.build_head?
devel do
url 'http://ftpmirror.gnu.org/guile/guile-2.0.2.tar.gz'
sha1 '1943fd22417ce1e51babbdcd7681e66a794a8da3'
else
sha1 '24cd2f06439c76d41d982a7384fe8a0fe5313b54'
end
depends_on 'pkg-config' => :build

View file

@ -6,8 +6,10 @@ class Icu4c < Formula
md5 'ea93970a0275be6b42f56953cd332c17'
version '4.8.1.1'
bottle 'https://downloads.sf.net/project/machomebrew/Bottles/icu4c-4.8.1.1-bottle.tar.gz'
bottle_sha1 '51b6e6e735ea581a2736127414e600362846b7e1'
bottle do
url 'https://downloads.sf.net/project/machomebrew/Bottles/icu4c-4.8.1.1-bottle.tar.gz'
sha1 '51b6e6e735ea581a2736127414e600362846b7e1'
end
keg_only "Conflicts; see: https://github.com/mxcl/homebrew/issues/issue/167"

View file

@ -35,8 +35,10 @@ class Imagemagick < Formula
homepage 'http://www.imagemagick.org'
head 'https://github.com/trevor/ImageMagick.git'
bottle "http://downloads.sf.net/project/machomebrew/Bottles/imagemagick-#{version}-bottle.tar.gz"
bottle_sha1 'd63cbdfb4e314f17ed1d553e5e1c7f3eebf1654b'
bottle do
url "http://downloads.sf.net/project/machomebrew/Bottles/imagemagick-#{version}-bottle.tar.gz"
sha1 'd63cbdfb4e314f17ed1d553e5e1c7f3eebf1654b'
end
depends_on 'jpeg'

View file

@ -2,13 +2,13 @@ require 'formula'
class Libmusicbrainz < Formula
homepage 'http://musicbrainz.org'
if ARGV.build_devel?
version '4.0.0beta1'
url 'http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-3.0.3.tar.gz'
md5 'f4824d0a75bdeeef1e45cc88de7bb58a'
devel do
url 'ftp://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-4.0.0beta1.tar.gz'
md5 '7dffa8fa08e4c0bc8119b8f48a15da41'
else
url 'http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-3.0.3.tar.gz'
md5 'f4824d0a75bdeeef1e45cc88de7bb58a'
version '4.0.0beta1'
end
depends_on 'neon'

View file

@ -3,12 +3,11 @@ require 'formula'
class Nginx < Formula
homepage 'http://nginx.org/'
url 'http://nginx.org/download/nginx-1.0.11.tar.gz'
head 'http://nginx.org/download/nginx-1.1.13.tar.gz'
md5 'a41a01d7cd46e13ea926d7c9ca283a95'
if ARGV.build_head?
devel do
url 'http://nginx.org/download/nginx-1.1.13.tar.gz'
md5 '3a457fc31da382ed0546bfb76fc70c13'
else
md5 'a41a01d7cd46e13ea926d7c9ca283a95'
end
depends_on 'pcre'

View file

@ -5,8 +5,11 @@ class Qt < Formula
url 'http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.8.0.tar.gz'
md5 'e8a5fdbeba2927c948d9f477a6abe904'
homepage 'http://qt.nokia.com/'
bottle 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.0-bottle.tar.gz'
bottle_sha1 '2bfe00c5112b0d2a680cd01144701f8937846096'
bottle do
url 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.0-bottle.tar.gz'
sha1 '2bfe00c5112b0d2a680cd01144701f8937846096'
end
head 'git://gitorious.org/qt/qt.git', :branch => 'master'

View file

@ -2,11 +2,10 @@ require 'formula'
class Scantailor < Formula
homepage 'http://scantailor.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/scantailor/scantailor/0.9.10/scantailor-0.9.10.tar.gz'
md5 'f962c93a2d63b449fa3f6612ade3b028'
unless ARGV.include? '--enhanced'
url 'http://downloads.sourceforge.net/project/scantailor/scantailor/0.9.10/scantailor-0.9.10.tar.gz'
md5 'f962c93a2d63b449fa3f6612ade3b028'
else
devel do
url 'http://downloads.sourceforge.net/project/scantailor/scantailor-devel/enhanced/scantailor-enhanced-20110907.tar.gz'
md5 '8ba5c23c611e7bdd7cdb40f991f6fd35'
version 'enhanced-20110907'
@ -18,12 +17,6 @@ class Scantailor < Formula
depends_on 'jpeg'
depends_on 'libtiff'
def options
[
["--enhanced", "Build experimental \"enhanced\" branch, which includes extra features"]
]
end
def install
system "cmake . #{std_cmake_parameters} -DPNG_INCLUDE_DIR=/usr/X11/include"
system "make install"

View file

@ -12,17 +12,15 @@ end
class Wine < Formula
homepage 'http://winehq.org/'
url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2'
sha256 '3fd8d3f2b466d07eb90b8198cdc9ec3005917a4533db7b8c6c69058a2e57c61f'
head 'git://source.winehq.org/git/wine.git'
if ARGV.build_devel?
devel do
url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.3.35.tar.bz2'
sha256 'e23e4da5efebc11206198e9cf2a2638851db4e00a1af0abccd8b6369e99c288b'
else
url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2'
sha256 '3fd8d3f2b466d07eb90b8198cdc9ec3005917a4533db7b8c6c69058a2e57c61f'
end
head 'git://source.winehq.org/git/wine.git'
depends_on 'jpeg'
depends_on 'libicns'