Define and use ARGV.build_devel?

Often it is useful to provide a development build in addition to the
stable release or HEAD download.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Jack Nagel 2011-11-20 20:09:33 -06:00 committed by Adam Vandenberg
parent 3094c408fc
commit 491ef46cea
4 changed files with 9 additions and 9 deletions

View file

@ -3,7 +3,7 @@ require 'formula'
class BdwGc < Formula
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
if ARGV.include? '--devel'
if ARGV.build_devel?
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
md5 '319d0b18cc4eb735c8038ece9df055e4'
version '7.2alpha6'
@ -16,7 +16,7 @@ class BdwGc < Formula
# some directory restructuring between 7.1 and 7.2a6 force us to have two
# versions of the same patch
def patches
if ARGV.include? '--devel'
if ARGV.build_devel?
DATA
else
{ :p0 => "https://trac.macports.org/export/86621/trunk/dports/devel/boehmgc/files/asm.patch" }

View file

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

View file

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

View file

@ -13,7 +13,7 @@ end
class Wine < Formula
homepage 'http://winehq.org/'
if ARGV.include? '--devel'
if ARGV.build_devel?
url 'http://downloads.sourceforge.net/project/wine/Source/wine-1.3.32.tar.bz2'
sha256 'fe1691ef8e9c5c4afeb345ad0f0b364d055cfe67a7e64b0a4a44da4d85cfa8b6'
else
@ -27,7 +27,7 @@ class Wine < Formula
depends_on 'libicns'
# gnutls not needed since 1.3.16
depends_on 'gnutls' unless ARGV.include? '--devel' or ARGV.build_head?
depends_on 'gnutls' unless ARGV.build_devel? or ARGV.build_head?
fails_with_llvm 'Wine dies with an "Unhandled exception code" when built with LLVM'
@ -74,7 +74,7 @@ EOS
rm_rf share+'applications'
# Download Gecko once so we don't need to redownload for each prefix
gecko = (ARGV.include? '--devel') ? WineGecko.new : WineGeckoOld.new
gecko = ARGV.build_devel? ? WineGecko.new : WineGeckoOld.new
gecko.brew { (share+'wine/gecko').install Dir["*"] }
# Use a wrapper script, so rename wine to wine.bin
@ -88,7 +88,7 @@ EOS
# We have backported Camillo Lugaresi's patch from upstream. The patch can
# be removed from this formula once it lands in both the devel and stable
# branches of Wine.
if MacOS.lion? and not (ARGV.include? '--devel' or ARGV.build_head?)
if MacOS.lion? and not (ARGV.build_devel? or ARGV.build_head?)
def patches; DATA; end
end