source: trunk/dports/lang/julia/Portfile

Last change on this file was 153378, checked in by sean@…, 12 months ago

julia: optionally depend on openblas-devel; closes #52423

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 153378 2016-09-29 18:06:21Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           compilers 1.0
7
8github.setup        JuliaLang julia 0.4.6 v
9categories-append   lang 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
23github.tarball_from releases
24
25distfiles           ${name}-${version}-full${extract.suffix}
26
27checksums           rmd160  332a32fb0e10750540592eb125b3f31843702333 \
28                    sha256  4c23c9fc72398014bd39327c2f7efd3a301884567d4cb2a89105c984d4d633ba
29
30# Force buildbot to skip this since julia builds its own blas; see #45101
31archive_sites
32
33set llvm_ver        3.7
34
35depends_lib-append  port:llvm-${llvm_ver} \
36    port:curl \
37    port:pcre2 \
38    port:gmp \
39    port:mpfr \
40    port:SuiteSparse \
41    port:fftw-3 \
42    port:fftw-3-single \
43    port:ncurses \
44    port:arpack \
45    port:libgit2 \
46    path:lib/libopenblas.dylib:OpenBLAS
47
48use_configure       no
49# use_parallel_build  no
50
51post-extract {
52    file mkdir ${worksrcpath}/usr/lib
53    ln -s ${prefix}/lib/libfftw3.dylib ${worksrcpath}/usr/lib/
54    ln -s ${prefix}/lib/libfftw3_threads.dylib ${worksrcpath}/usr/lib/
55    ln -s ${prefix}/lib/libfftw3f.dylib ${worksrcpath}/usr/lib/
56    ln -s ${prefix}/lib/libfftw3f_threads.dylib ${worksrcpath}/usr/lib/
57    ln -s ${prefix}/lib/libpcre2-8.dylib ${worksrcpath}/usr/lib/
58    ln -s ${prefix}/lib/libgmp.dylib ${worksrcpath}/usr/lib/
59    ln -s ${prefix}/lib/libmpfr.dylib ${worksrcpath}/usr/lib/
60    ln -s ${prefix}/lib/libumfpack.dylib ${worksrcpath}/usr/lib/
61    ln -s ${prefix}/lib/libcholmod.dylib ${worksrcpath}/usr/lib/
62    ln -s ${prefix}/lib/libsuitesparseconfig.dylib ${worksrcpath}/usr/lib/
63    ln -s ${prefix}/lib/libarpack.dylib ${worksrcpath}/usr/lib/
64    ln -s ${prefix}/lib/libopenblas.dylib ${worksrcpath}/usr/lib/
65}
66
67build {}
68
69pre-destroot {
70    destroot.args-append \
71        CC=${configure.cc} \
72        CXX=${configure.cxx} \
73        FC=${configure.fc} \
74        USE_SYSTEM_LLVM=1 \
75        LLVM_CONFIG=llvm-config-mp-${llvm_ver} \
76        USE_SYSTEM_LIBUNWIND=1 \
77        USE_SYSTEM_LIBM=1 \
78        USE_SYSTEM_GMP=1 \
79        USE_SYSTEM_MPFR=1 \
80        USE_SYSTEM_ZLIB=1 \
81        USE_SYSTEM_PCRE=1 \
82        USE_SYSTEM_FFTW=1 \
83        USE_SYSTEM_ARPACK=1 \
84        USE_SYSTEM_SUITESPARSE=1 \
85        USE_SYSTEM_LIBGIT2=1 \
86        USE_SYSTEM_BLAS=1 \
87        USE_SYSTEM_LAPACK=1 \
88        USE_BLAS64=0 \
89        LIBBLAS=-lopenblas \
90        LIBBLASNAME=libopenblas \
91        LIBLAPACK=-lopenblas \
92        LIBLAPACKNAME=libopenblas
93}
94
95post-destroot {
96    # julia doesn't do destroot quite right
97    set dpw ${destroot}${worksrcpath}
98    delete ${destroot}${prefix}/bin
99    move [glob $dpw/julia-*/bin] ${destroot}${prefix}/bin
100    move [glob $dpw/julia-*/etc/julia] ${destroot}${prefix}/etc
101    move [glob $dpw/julia-*/include/julia] ${destroot}${prefix}/include
102    move [glob $dpw/julia-*/lib/julia] ${destroot}${prefix}/lib
103    move [glob $dpw/julia-*/share/julia] ${destroot}${prefix}/share
104    delete ${destroot}${prefix}/var
105
106    foreach b {julia julia-debug} {
107        system -W ${destroot}${prefix}/bin "install_name_tool -add_rpath ${prefix}/lib $b"
108    }
109}
110
111variant blas64 description {Build internal OpenBLAS with 64-bit interface} {
112    depends_lib-delete \
113        port:OpenBLAS
114
115    pre-destroot {
116        destroot.args-delete \
117            USE_SYSTEM_BLAS=1 \
118            USE_SYSTEM_LAPACK=1 \
119            USE_BLAS64=0 \
120            LIBBLAS=-lopenblas \
121            LIBBLASNAME=libopenblas \
122            LIBLAPACK=-lopenblas \
123            LIBLAPACKNAME=libopenblas
124    }
125}
126
127livecheck.regex     archive/[join ${github.tag_prefix} ""](\[^"-\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.