Skip to content

Instantly share code, notes, and snippets.

@archaelus
Created January 15, 2009 16:46
Show Gist options
  • Save archaelus/47480 to your computer and use it in GitHub Desktop.
Save archaelus/47480 to your computer and use it in GitHub Desktop.
# $Id: Portfile 28835 2007-09-10 02:01:57Z [email protected] $
PortSystem 1.0
name erlang
version R12B-5
#revision 1
categories lang erlang
maintainers [email protected]
platforms darwin
description The Erlang Programming Language
long_description \
Erlang is a programming language designed at the \
Ericsson Computer Science Laboratory. Open-source \
Erlang is being released to help encourage the spread \
of Erlang outside Ericsson. \
\
We are releasing free of charge: \
The entire source code of the current Erlang \
system. \
Extensive libraries of code for building robust \
fault-tolerant distributed applications. \
All with documentation. \
\
All the above software has been battle tested in a \
number of Ericsson products, for example the new \
Ericsson ATM switch.
homepage http://www.erlang.org/
master_sites http://www3.erlang.org/download/ http://www.erlang.org/download/
distfiles otp_src_${version}${extract.suffix} \
otp_doc_man_${version}${extract.suffix} \
otp_doc_html_${version}${extract.suffix}
checksums otp_src_R12B-5.tar.gz \
md5 3751ea3fea669d2b25c67eeb883734bb \
sha1 6c45509acf70d35d5def2cbefd86ada093c1ac3a \
rmd160 7265ae8ebd045ec5b977148a7c9b995eb7ef2d2d \
otp_doc_man_R12B-5.tar.gz \
md5 6231cb172847040395cc34b20781aa3b \
sha1 ae7036bd2afc9d1fca97f0de2eca84f56656def8 \
rmd160 e28d555d0a86fc69e0ee091864828c8eaa58d2be \
otp_doc_html_R12B-5.tar.gz \
md5 fb0c5454bbd865e881b6712295f6d41f \
sha1 0bd369d02051e01bac58c9b8665bd3538e116f51 \
rmd160 b460906043171b27735332ec90c45e38d888869a
extract.only otp_src_${version}${extract.suffix}
pre-patch { file rename ${workpath}/otp_src_${version} ${workpath}/${name}-${version} }
configure.args --prefix=${destroot}${prefix} \
--enable-threads \
--enable-kernel-poll \
--with-ssl=${prefix} \
--with-ssl-zlib=${prefix}
configure.cflags {}
configure.ldflags {}
configure.cppflags {}
variant hipe {
configure.args-append --enable-hipe
}
variant 64bit {
configure.args-append --enable-darwin-64bit
}
variant gd {
configure.args-append --with-gd=${prefix}
depends_build-append port:gd2
}
variant gproc {
patchfiles-append patch-gproc
}
platform i386 {
pre-configure {
file copy ${filespath}/mach_override.h ${workpath}/${name}-${version}/erts/emulator/hipe
file copy ${filespath}/mach_override.c ${workpath}/${name}-${version}/erts/emulator/hipe
}
}
depends_build port:gawk port:openssl
post-destroot {
system "tar -C ${destroot}${prefix}/lib/erlang -zxvf ${distpath}/otp_doc_html_${version}${extract.suffix}"
system "tar -C ${destroot}${prefix}/lib/erlang -zxvf ${distpath}/otp_doc_man_${version}${extract.suffix}"
set erts_dir erts-5.6.5
reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/bin/erl
reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/bin/start
reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/${erts_dir}/bin/erl
reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/${erts_dir}/bin/start
file delete ${destroot}${prefix}/bin/ear
file delete ${destroot}${prefix}/bin/ecc
file delete ${destroot}${prefix}/bin/elink
file delete ${destroot}${prefix}/bin/erl
file delete ${destroot}${prefix}/bin/erlc
file delete ${destroot}${prefix}/bin/escript
file delete ${destroot}${prefix}/bin/epmd
file delete ${destroot}${prefix}/bin/run_erl
file delete ${destroot}${prefix}/bin/to_erl
file delete ${destroot}${prefix}/bin/typer
file delete ${destroot}${prefix}/lib/erlang/bin/epmd
system "ln -s ../lib/erlang/bin/ear ${destroot}${prefix}/bin/ear"
system "ln -s ../lib/erlang/bin/ecc ${destroot}${prefix}/bin/ecc"
system "ln -s ../lib/erlang/bin/elink ${destroot}${prefix}/bin/elink"
system "ln -s ../lib/erlang/bin/erl ${destroot}${prefix}/bin/erl"
system "ln -s ../lib/erlang/bin/erlc ${destroot}${prefix}/bin/erlc"
system "ln -s ../lib/erlang/bin/escript ${destroot}${prefix}/bin/escript"
system "ln -s ../${erts_dir}/bin/epmd ${destroot}${prefix}/lib/erlang/bin/epmd"
system "ln -s ../${erts_dir}/bin/epmd ${destroot}${prefix}/bin/epmd"
system "ln -s ../lib/erlang/bin/run_erl ${destroot}${prefix}/bin/run_erl"
system "ln -s ../lib/erlang/bin/to_erl ${destroot}${prefix}/bin/to_erl"
system "ln -s ../lib/erlang/bin/typer ${destroot}${prefix}/bin/typer"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment