Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add platform check for build_depends, adding r16 recipe
- Loading branch information
zane
committed
Oct 20, 2013
1 parent
69adff9
commit de3f5bd
Showing
3 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Adapted from the formula in brew2deb. | ||
|
||
class ErlangR16 < FPM::Cookery::Recipe | ||
description 'Concurrent, real-time, distributed functional language' | ||
|
||
name 'erlang-r16' | ||
version '16.b.1' | ||
homepage 'http://www.erlang.org' | ||
source 'http://www.erlang.org/download/otp_src_R16B01.tar.gz' | ||
sha256 'da388bc07b8ebdd008f5bb6c3d2c280e358bd188b5aac3ea01e3a7436315abc0' | ||
|
||
section 'main' | ||
|
||
case platform | ||
when :centos, :redhat | ||
then | ||
build_depends 'ncurses-devel', 'glibc-devel', 'openssl-devel' | ||
when :debian, :ubuntu | ||
then | ||
build_depends 'libncurses5-dev', 'libssl-dev', 'libc6-dev-i386' | ||
end | ||
|
||
depends 'openssl' | ||
|
||
def build | ||
# Do this if building from a checkout to generate configure | ||
#system "./otp_build autoconf" if File.exist? "otp_build" | ||
|
||
configure :enable_debug => true, | ||
:prefix => "/mochi/opt", | ||
:enable_kernel_poll => true, | ||
:enable_threads => true, | ||
:enable_dynamic_ssl_lib => true, | ||
:enable_smp_support => true | ||
|
||
inline_replace 'Makefile' do |s| | ||
s.gsub! %r{^install\.bin:}, "install.bin:\ndisabled-install.bin:" | ||
end | ||
|
||
make 'libdir_suffix' => '/erlang-r15' | ||
end | ||
|
||
def install | ||
make :install, 'DESTDIR' => destdir, 'libdir_suffix' => '/erlang-r15' | ||
end | ||
|
||
def test | ||
`#{bin}/erl -noshell -eval 'crypto:start().' -s init stop` | ||
|
||
# This test takes some time to run, but per bug #120 should finish in | ||
# "less than 20 minutes". It takes a few minutes on a Mac Pro (2009). | ||
if ARGV.include? "--time" | ||
`#{bin}/dialyzer --build_plt -r #{lib}/erlang/lib/kernel-2.14.1/ebin/` | ||
end | ||
end | ||
end |