source: trunk/dports/lang/julia/Portfile @ 121952

Last change on this file since 121952 was 121952, checked in by sean@…, 5 years ago

compilers-1.0: move setup call in all ports to after setting of name

File size: 3.3 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$
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           compilers 1.0
7
8github.setup        JuliaLang julia 0.2.1 v
9categories-append   math science
10maintainers         sean openmaintainer
11platforms           darwin
12license             MIT
13homepage            http://julialang.org
14
15compilers.choose    fc f77 f90
16compilers.setup     require_fortran -g95
17
18description         The Julia Language: A fresh approach to technical computing.
19long_description    Julia is a high-level, high-performance dynamic programming \
20                    language for technical computing, with syntax that is familiar \
21                    to users of other technical computing environments.
22
23# julia's build system uses git submodules
24fetch.type          git
25
26# llvm calls haven't been updated to 3.4, so keep at 3.3
27depends_lib-append  port:llvm-3.3 \
28    port:curl \
29    port:git \
30    port:pcre \
31    port:readline \
32    port:gmp \
33    port:mpfr \
34    port:SuiteSparse \
35    port:fftw-3 \
36    port:fftw-3-single
37
38patch.pre_args      -p1
39patchfiles          patch-readline.diff
40
41use_configure       no
42# use_parallel_build  no
43
44# project does not support destdir
45destroot.destdir    PREFIX=${destroot}${prefix}
46
47if {![fortran_variant_isset]} {
48    default_variants-append +gcc48
49}
50
51post-extract {
52    system -W ${worksrcpath} "git submodule update --init"
53
54    file mkdir ${worksrcpath}/usr/lib
55    ln -s ${prefix}/lib/libfftw3.dylib ${worksrcpath}/usr/lib/
56    ln -s ${prefix}/lib/libfftw3_threads.dylib ${worksrcpath}/usr/lib/
57    ln -s ${prefix}/lib/libfftw3f.dylib ${worksrcpath}/usr/lib/
58    ln -s ${prefix}/lib/libfftw3f_threads.dylib ${worksrcpath}/usr/lib/
59    ln -s ${prefix}/lib/libreadline.dylib ${worksrcpath}/usr/lib/
60    ln -s ${prefix}/lib/libpcre.dylib ${worksrcpath}/usr/lib/
61    ln -s ${prefix}/lib/libgmp.dylib ${worksrcpath}/usr/lib/
62    ln -s ${prefix}/lib/libmpfr.dylib ${worksrcpath}/usr/lib/
63    ln -s ${prefix}/lib/libumfpack.dylib ${worksrcpath}/usr/lib/
64    ln -s ${prefix}/lib/libcholmod.dylib ${worksrcpath}/usr/lib/
65}
66
67build {}
68
69# julia can't use Apple's Accelerate framework so the choices are to build
70# lapack (32-bit interface) or build OpenBLAS (64-bit interface).
71# Alternatively, we could try to use MacPorts' own OpenBLAS port but that would
72# need to be updated to build the 64-bit interface which is inocmpatible with
73# the 32-bit interface. Since that could break other ports dependent on
74# OpenBLAS, we'll just stick with having julia download and build its own
75# internal OpenBLAS.
76pre-destroot {
77    destroot.args-append \
78        FC=${configure.fc} \
79        USE_SYSTEM_LLVM=1 \
80        LLVM_CONFIG=llvm-config-mp-3.3 \
81        USE_SYSTEM_LIBUNWIND=1 \
82        USE_SYSTEM_LIBM=1 \
83        USE_SYSTEM_GMP=1 \
84        USE_SYSTEM_MPFR=1 \
85        USE_SYSTEM_ZLIB=1 \
86        USE_SYSTEM_READLINE=1 \
87        USE_SYSTEM_PCRE=1 \
88        USE_SYSTEM_FFTW=1 \
89        USE_SYSTEM_ARPACK=1 \
90        USE_SYSTEM_SUITESPARSE=1
91}
92
93post-destroot {
94    # skip julia-readline because that already has the rpath
95    foreach b {julia julia-basic julia-debug-basic} {
96        system -W ${destroot}${prefix}/bin "install_name_tool -add_rpath ${prefix}/lib $b"
97    }
98}
Note: See TracBrowser for help on using the repository browser.