source: trunk/dports/lang/erlang/Portfile @ 139229

Last change on this file since 139229 was 139229, checked in by jeremyhu@…, 4 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.9 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
3
4PortSystem          1.0
5PortGroup           wxWidgets 1.0
6PortGroup           compiler_blacklist_versions 1.0
7
8name                erlang
9version             17.5
10categories          lang erlang
11maintainers         ciserlohn
12platforms           darwin
13license             MPL
14
15description         The Erlang Programming Language
16long_description    Erlang is a programming language designed at the        \
17                    Ericsson Computer Science Laboratory. Open-source       \
18                    Erlang is being released to help encourage the spread   \
19                    of Erlang outside Ericsson.                             \
20                                                                            \
21                    We are releasing free of charge:                        \
22                        The entire source code of the current Erlang        \
23                        system.                                             \
24                        Extensive libraries of code for building robust     \
25                        fault-tolerant distributed applications.            \
26                        All with documentation.                             \
27                                                                            \
28                    All the above software has been battle tested in a      \
29                    number of Ericsson products, for example the new        \
30                    Ericsson ATM switch.
31
32homepage            http://www.erlang.org/
33master_sites        http://www.erlang.org/download/
34
35# Parallel build doesn't work as per R13B01
36use_parallel_build  no
37
38universal_variant   no
39
40distfiles           otp_src_${version}${extract.suffix}                    \
41                    otp_doc_man_${version}${extract.suffix}                \
42                    otp_doc_html_${version}${extract.suffix}
43
44checksums           otp_src_${version}.tar.gz \
45                    rmd160  609406d4e710c1c435dbd0090a0503e1fcb68d08 \
46                    sha256  3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474 \
47                    otp_doc_man_${version}.tar.gz \
48                    rmd160  b3166f1a27622e4c290a0d929b9d935e0947e962 \
49                    sha256  85b1b2a1011fc01af550f1fe9e5a599a4c5f2a35d264d2804af1d05590a857c3 \
50                    otp_doc_html_${version}.tar.gz \
51                    rmd160  6ddf8086cbc36137d2c96453e9dc2370fee10c74 \
52                    sha256  baba1d373c1faacf4a1a6ec1220d57d0cb2b977edb74f32cd58dc786361c6cf5
53
54pre-patch           { file rename ${workpath}/otp_src_${version} ${workpath}/${name}-${version} }
55
56# http://www.erlang.org/pipermail/erlang-bugs/2009-January/001171.html
57patchfiles          patch-erts_emulator_Makefile.in.diff \
58                    patch-erts_configure.diff 
59
60configure.args      --prefix=${prefix}       \
61                    --enable-kernel-poll     \
62                    --enable-threads         \
63                    --enable-dynamic-ssl-lib \
64                    --enable-smp-support     \
65                    --disable-hipe           \
66                    --without-ssl            \
67                    --without-odbc           \
68                    --without-wx
69
70depends_build       port:gawk
71# ${prefix}/lib/erlang/erts-5.8.4/bin/beam.smp links with ncurses
72depends_lib         port:ncurses
73
74# Erlang seems to have an on-again/off-again relationship with Clang.
75# As of XCode 4.2, it's off again.
76compiler.blacklist  {clang < 300} macports-clang-2.9
77
78post-destroot   {
79    system "tar -C ${destroot}${prefix}/lib/erlang -zxvf ${distpath}/otp_doc_html_${version}${extract.suffix}"
80    system "tar -C ${destroot}${prefix}/lib/erlang -zxvf ${distpath}/otp_doc_man_${version}${extract.suffix}"
81 
82    set erts_dir            erts-6.4
83    set erl_interface_dir   erl_interface-3.7.20
84    set wx_dir              wx-1.3.3
85
86    reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/bin/erl
87    reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/bin/start
88    reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/${erts_dir}/bin/erl
89    reinplace s|${destroot}|| ${destroot}${prefix}/lib/erlang/${erts_dir}/bin/start
90
91    foreach x {dialyzer ear ecc elink epmd erl erlc escript run_erl start to_erl typer} { file delete -force ${destroot}${prefix}/bin/${x} }
92    foreach x {dialyzer erl erlc escript run_erl start to_erl typer} { system "ln -s ../lib/erlang/bin/${x} ${destroot}${prefix}/bin/${x}" }
93
94    file delete -force ${destroot}${prefix}/lib/erlang/bin/epmd
95    system "ln -s ../${erts_dir}/bin/epmd ${destroot}${prefix}/lib/erlang/bin/epmd"
96    system "ln -s ../lib/erlang/${erts_dir}/bin/epmd ${destroot}${prefix}/bin/epmd"
97    system "ln -s ../lib/erlang/lib/${erl_interface_dir}/bin/erl_call ${destroot}${prefix}/bin/erl_call"
98}
99
100platform darwin 10 {
101    # 10.6 (and 10.6.1) has a bad bug related to using dlopen in a thread.
102    # rdar://7209349 - http://www.openradar.appspot.com/7209349
103    # This is a workaround.
104    patchfiles-append           patch-erts_emulator_sys_unix_ddll.c.diff
105}
106
107platform darwin {
108    if {${configure.build_arch} eq "x86_64" || ${configure.build_arch} eq "ppc64"} {
109        configure.args-append   --enable-darwin-64bit
110    } else {
111        configure.args-append   --disable-darwin-64-bit
112    }
113    # TODO: not sure about the minimum version
114    if {${os.major} >= 10} {
115        # also "-framework Appkit"?
116        configure.ldflags-append -framework CoreFoundation
117    }
118}
119
120variant wxwidgets description {Build wxWidgets support} {
121    wxWidgets.use               wxWidgets-3.0
122    patchfiles-delete           patch-disable_wx.diff
123    patchfiles-append           patch-lib_wx_configure.in.diff \
124                                patch-lib_wx_configure.diff
125    depends_lib-append          port:${wxWidgets.port}
126    depends_run-append          port:tk
127    configure.args-append       --with-wxdir=${wxWidgets.wxdir}
128    configure.args-delete       --without-wx
129}
130
131variant ssl description {Build SSL support} {
132    configure.args-delete       --without-ssl
133    configure.args-append       --with-ssl=${prefix}
134    configure.ldflags-append    -lz
135    depends_lib-append          path:lib/libssl.dylib:openssl
136}
137
138variant hipe conflicts nohipe description {Enable HiPE (native-code bytecode compiler)} {
139    configure.args-delete       --disable-hipe
140    configure.args-append       --enable-hipe
141}
142
143variant nohipe conflicts hipe description {Legacy compatibility variant} {}
144
145if {[variant_isset nohipe]} {
146    default_variants -hipe
147} else {
148    default_variants +hipe
149}
150
151variant odbc description {Build ODBC support} {
152    depends_lib-append          port:unixODBC
153    configure.args-delete       --without-odbc
154    configure.args-append       --with-odbc=${prefix}
155}
156
157default_variants    +ssl
158
159# Livecheck
160livecheck.type      regex
161livecheck.version   ${version}
162livecheck.url       ${homepage}download/
163livecheck.regex     "otp_src_(\[0-9\]+\\.\[0-9\]+)\\.tar\\.gz"
Note: See TracBrowser for help on using the repository browser.