2009-10-17 00:55:27 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class ClojureContrib < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
url 'https://github.com/downloads/clojure/clojure-contrib/clojure-contrib-1.2.0.zip'
|
2010-08-19 16:14:19 +00:00
|
|
|
md5 '83cc86fd2929ca417a9ab9f2a0dedadb'
|
2010-10-24 15:05:18 +00:00
|
|
|
head 'git://github.com/clojure/clojure-contrib.git'
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
homepage 'http://richhickey.github.com/clojure-contrib/branch-1.1.x/index.html'
|
2009-10-17 00:55:27 +00:00
|
|
|
|
|
|
|
depends_on 'clojure'
|
2010-07-09 19:40:41 +00:00
|
|
|
depends_on 'maven' if ARGV.build_head?
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
|
|
|
|
def jar
|
2010-10-30 11:36:03 +00:00
|
|
|
return ARGV.build_head? ? "*" : 'clojure-contrib.jar'
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
end
|
2009-10-17 00:55:27 +00:00
|
|
|
|
|
|
|
def install
|
2010-07-09 19:40:41 +00:00
|
|
|
if ARGV.build_head?
|
2010-10-30 11:36:03 +00:00
|
|
|
system "mvn package -Dclojure.jar=#{prefix}/clojure.jar"
|
|
|
|
Dir.glob("**/target/*.jar").each do |f|
|
|
|
|
new_file = File.basename(f).gsub(/\-\d\.\d\.\d\-SNAPSHOT/,'')
|
|
|
|
mv f, new_file
|
|
|
|
prefix.install(new_file)
|
|
|
|
end
|
|
|
|
else
|
|
|
|
system "mv target/clojure-contrib-*.jar clojure-contrib.jar"
|
|
|
|
prefix.install jar
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
end
|
2009-10-17 00:55:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-END_CAVEATS
|
|
|
|
For Clojure to detect the contrib libs, the following path must be in your
|
|
|
|
CLASSPATH ENV variable:
|
|
|
|
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
#{prefix}/#{jar}
|
2009-10-17 00:55:27 +00:00
|
|
|
|
|
|
|
To do this with bash, add the following to your ~/.profile file:
|
|
|
|
|
Many fixes for clojure and clojure-contrib formulae.
- clojure formula now works with HEAD installs.
- Use /bin/sh rather than /bin/bash in the clj script.
- Fix argument-passing in the clj script. (Fixes Homebrew/homebrew#867)
- Remove the Java -server flag in the clj script. This is the default
option on 64-bit Macs running 10.5 and 10.6 anyway, unless the user
has used Java Preferences to make the 32-bit VM the preferred VM, in
which case the default is -client. Choosing the 32-bit VM happens to
be the only way to use the client HotSpot VM, as the client VM is
not currently supported on 64-bit architectures. Presumably, if the
user prefers the 32-bit client VM, he has his reasons, and the clj
script should respect them. (The client VM has a faster start-up
time, for example, which may benefit command-line scripts written
in Clojure and invoked using clj.)
It would be nice to allow the user to be explicit about which VM to
use when invoking the clj script, but this would almost certainly
not be portable to other systems' implementations of the 'clj'
script, and would be difficult to document due to the fact that
clojure.main outputs its own usage message when supplied with a
--help/-h/-? argument. Anyone with special needs can simply write
his own wrapper script.
In any case, users of 64-bit Macs who haven't explicitly chosen the
32-bit Java VM in Java Preferences (i.e., probably most Homebrew
users) are unaffected by this change.
- clojure-contrib formula now installs the latest stable release
(1.1.0) by default (it used to install HEAD always). HEAD installs
are still supported via the --HEAD flag but require the HEAD version
of clojure; the build will break if the HEAD version of clojure is
not installed.
- clojure-contrib installs the pre-packaged JAR file, supplied in the
release ZIP file, if installing the release version.
- clojure-contrib only conditionally depends on maven, if installing
HEAD.
- clojure-contrib HEAD builds explicitly use the installed clojure HEAD
JAR file, per the clojure-contrib documentation. (HEAD builds prior
to this change would often mysteriously create a nearly-empty
clojure-contrib JAR file.)
- clojure-contrib always installs the JAR file as clojure-contrib.jar,
rather than adding a version suffix. The Cellar path is sufficient to
discriminate versions, and this way the JAR file name is consistent.
- Change the clojure-contrib homepage to point to the clojure-contrib
documentation, rather than the project's GitHub homepage.
- Clojure does not find the clojure-contrib JAR file unless the
CLASSPATH includes the JAR file name. Fix the clojure-contrib
caveat to reflect this behavior.
- Fix "already initialized constant JAR" warnings in both formulae.
Signed-off-by: David Höppner <0xffea@gmail.com>
2010-03-20 08:37:57 +00:00
|
|
|
export CLASSPATH=$CLASSPATH:#{prefix}/#{jar}
|
2009-10-17 00:55:27 +00:00
|
|
|
END_CAVEATS
|
|
|
|
end
|
|
|
|
end
|