diff options
| author | Susan Potter | 2013-10-06 09:50:11 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2013-10-06 18:42:10 -0700 |
| commit | 9b96cd4c679787daadb3f35030167d8e8d25ae53 (patch) | |
| tree | a10e91a6e704629e3dbdcc4e5fb3ca7ae53b111e /Library | |
| parent | 7345153740f1cfe72d1d6fcd385db9c8ea6e1732 (diff) | |
| download | homebrew-9b96cd4c679787daadb3f35030167d8e8d25ae53.tar.bz2 | |
yaws 1.96 plus --HEAD
Changes include:
* Update release from 1.94 to 1.96 in yaws formula using GitHub's releases URL
* Update `sha1` for new source archive
* Provide `--HEAD` option for yaws formula (needed for newer Erlang versions)
* Add `test` method with a basic tests for yaws formula
* Revert private method extraction to address method extraction from @adamv
* Use autoconf for yaws formula and specify build dependency on autoconf
* Add patches for yaws formula which is necessary for Erlang R16B01 and above
* Make tests valid for `--HEAD` builds even when the next version is bumped
Closes #23076.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/yaws.rb | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/Library/Formula/yaws.rb b/Library/Formula/yaws.rb index 8a74de40a..9a2c16d91 100644 --- a/Library/Formula/yaws.rb +++ b/Library/Formula/yaws.rb @@ -2,19 +2,32 @@ require 'formula' class Yaws < Formula homepage 'http://yaws.hyber.org' - url 'http://yaws.hyber.org/download/yaws-1.94.tar.gz' - sha1 '36295e40bb4db1812901c31d41152f942a63b5cc' + url 'https://github.com/klacke/yaws/archive/yaws-1.96.tar.gz' + sha1 'c12fc517832299e95c3e02359edfc2271af9cc68' + head 'https://github.com/klacke/yaws.git' option "without-yapp", "Omit yaws applications" option '32-bit' depends_on 'erlang' + depends_on 'autoconf' => :build # the default config expects these folders to exist skip_clean 'var/log/yaws' skip_clean 'lib/yaws/examples/ebin' skip_clean 'lib/yaws/examples/include' + # Patch is only pertinent for 1.96 tagged release and Erlang R16B01+ + # In newer versions of Erlang crypto:sha/1 is deprecated which fails + # the compilation since it is treating warnings as errors. + # This patch adds logic to use crypto:hash/2 for newer versions of + # Erlang (R16B01+). --HEAD installs already have this fix in place thus + # why it isn't included for --HEAD installs + def patches + unless build.head? + { :p1 => [ 'https://github.com/klacke/yaws/compare/yaws-1.96...98db40b3d301254a86820a837848660cb9e1b2f0.diff' ] } + end + end def install if build.build_32_bit? %w{ CFLAGS LDFLAGS }.each do |compiler_flag| @@ -23,21 +36,27 @@ class Yaws < Formula end end - cd 'yaws' do - system "./configure", "--prefix=#{prefix}" - system "make install" + system "autoconf" + system "./configure", "--prefix=#{prefix}" + system "make install" - unless build.include? 'without-yapp' - cd 'applications/yapp' do - system "make" - system "make install" - end + unless build.include? 'without-yapp' + cd 'applications/yapp' do + system "make" + system "make install" end end # the default config expects these folders to exist - (var/'log/yaws').mkpath (lib/'yaws/examples/ebin').mkpath (lib/'yaws/examples/include').mkpath + + (var/'log/yaws').mkpath + (var/'yaws/www').mkpath + end + + def test + system bin/'yaws', '--version' end + end |
