Ticket #56956: Portfile-v1.2.0rc2

File Portfile-v1.2.0rc2, 5.0 KB (added by krystophny (Christopher Albert), 5 years ago)
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
3PortSystem          1.0
4PortGroup           github 1.0
5PortGroup           compilers 1.0
6
7github.setup        JuliaLang julia 1.2.0-rc2 v
8categories-append   lang math science
9maintainers         nomaintainer
10platforms           darwin
11license             MIT
12homepage            http://julialang.org
13
14compilers.choose    fc f77 f90
15compilers.setup     require_fortran -g95
16
17description         The Julia Language: A fresh approach to technical computing.
18long_description    Julia is a high-level, high-performance dynamic programming \
19                    language for technical computing, with syntax that is familiar \
20                    to users of other technical computing environments.
21
22github.tarball_from releases
23
24distfiles           ${name}-${version}-full${extract.suffix}
25
26checksums           rmd160  0c51f459d33c9ce9bec222b7460d6eb2f083a173\
27                    sha256  22df94f012d5fa1c9be03402f5b7fb742288f97b4b15bd9294f6240797653118
28
29# Force buildbot to skip this since julia builds its own blas; see https://trac.macports.org/ticket/45187
30archive_sites
31
32depends_lib-append port:curl \
33    port:pcre2 \
34    port:gmp \
35    port:mpfr \
36    port:SuiteSparse_UMFPACK \
37    port:SuiteSparse_CHOLMOD \
38    port:SuiteSparse_AMD \
39    port:SuiteSparse_CAMD \
40    port:SuiteSparse_COLAMD \
41    port:SuiteSparse_SPQR \
42    port:fftw-3 \
43    port:fftw-3-single \
44    port:ncurses \
45    port:arpack \
46    port:libgit2 \
47    path:lib/libopenblas.dylib:OpenBLAS
48
49use_configure       no
50# use_parallel_build  no
51
52post-extract {
53    file mkdir ${worksrcpath}/usr/lib/julia
54    ln -s ${prefix}/lib/libfftw3.dylib ${worksrcpath}/usr/lib/julia/
55    ln -s ${prefix}/lib/libfftw3_threads.dylib ${worksrcpath}/usr/lib/julia/
56    ln -s ${prefix}/lib/libfftw3f.dylib ${worksrcpath}/usr/lib/julia/
57    ln -s ${prefix}/lib/libfftw3f_threads.dylib ${worksrcpath}/usr/lib/julia/
58    ln -s ${prefix}/lib/libpcre2-8.dylib ${worksrcpath}/usr/lib/julia/
59    ln -s ${prefix}/lib/libgmp.dylib ${worksrcpath}/usr/lib/julia/
60    ln -s ${prefix}/lib/libmpfr.dylib ${worksrcpath}/usr/lib/julia/
61    ln -s ${prefix}/lib/libumfpack.dylib ${worksrcpath}/usr/lib/julia/
62    ln -s ${prefix}/lib/libcholmod.dylib ${worksrcpath}/usr/lib/julia/
63    ln -s ${prefix}/lib/libsuitesparseconfig.dylib ${worksrcpath}/usr/lib/julia/
64    ln -s ${prefix}/lib/libamd.dylib ${worksrcpath}/usr/lib/julia/
65    ln -s ${prefix}/lib/libcamd.dylib ${worksrcpath}/usr/lib/julia/
66    ln -s ${prefix}/lib/libcolamd.dylib ${worksrcpath}/usr/lib/julia/
67    ln -s ${prefix}/lib/libccolamd.dylib ${worksrcpath}/usr/lib/julia/
68    ln -s ${prefix}/lib/libspqr.dylib ${worksrcpath}/usr/lib/julia/
69    ln -s ${prefix}/lib/libarpack.dylib ${worksrcpath}/usr/lib/julia/
70    ln -s ${prefix}/lib/libopenblas.dylib ${worksrcpath}/usr/lib/julia/
71    ln -s ${prefix}/lib/libgit2.dylib ${worksrcpath}/usr/lib/julia/
72}
73
74build {}
75
76pre-destroot {
77    destroot.args-append \
78        CC=${configure.cc} \
79        CXX=${configure.cxx} \
80        FC=${configure.fc} \
81        USE_SYSTEM_LLVM=0 \
82        USE_SYSTEM_LIBUNWIND=1 \
83        USE_SYSTEM_LIBM=1 \
84        USE_SYSTEM_GMP=1 \
85        USE_SYSTEM_MPFR=1 \
86        USE_SYSTEM_ZLIB=1 \
87        USE_SYSTEM_PCRE=1 \
88        USE_SYSTEM_FFTW=1 \
89        USE_SYSTEM_ARPACK=1 \
90        USE_SYSTEM_SUITESPARSE=1 \
91        USE_SYSTEM_LIBGIT2=1 \
92        USE_SYSTEM_BLAS=1 \
93        USE_SYSTEM_LAPACK=1 \
94        USE_BLAS64=0 \
95        LIBBLAS=-lopenblas \
96        LIBBLASNAME=libopenblas \
97        LIBLAPACK=-lopenblas \
98        LIBLAPACKNAME=libopenblas
99}
100
101post-destroot {
102    # julia doesn't do destroot quite right
103    set dpw ${destroot}${worksrcpath}
104    delete ${destroot}${prefix}/bin
105    move [glob $dpw/julia-*/bin] ${destroot}${prefix}/bin
106    move [glob $dpw/julia-*/etc/julia] ${destroot}${prefix}/etc
107    move [glob $dpw/julia-*/include/julia] ${destroot}${prefix}/include
108    move [glob $dpw/julia-*/lib/julia] ${destroot}${prefix}/lib
109    move [glob $dpw/julia-*/share/julia] ${destroot}${prefix}/share
110
111    set version_short   [join [lrange [split ${version} .] 0 1] .]
112    move [glob $dpw/julia-*/lib/libjulia.${version_short}.dylib] ${destroot}${prefix}/lib
113    move [glob $dpw/julia-*/lib/libjulia.${version_short}.dylib.dSYM] ${destroot}${prefix}/lib
114
115    ln -sf libjulia.${version_short}.dylib       ${destroot}${prefix}/lib/libjulia.dylib
116    ln -sf libjulia.${version_short}.dylib       ${destroot}${prefix}/lib/libjulia.1.dylib
117
118    delete ${destroot}${prefix}/var
119   
120    system -W ${destroot}${prefix}/bin "install_name_tool -add_rpath ${prefix}/lib julia"
121}
122
123variant blas64 description {Build internal OpenBLAS with 64-bit interface} {
124    depends_lib-delete \
125        port:OpenBLAS
126
127    pre-destroot {
128        destroot.args-delete \
129            USE_SYSTEM_BLAS=1 \
130            USE_SYSTEM_LAPACK=1 \
131            USE_BLAS64=0 \
132            LIBBLAS=-lopenblas \
133            LIBBLASNAME=libopenblas \
134            LIBLAPACK=-lopenblas \
135            LIBLAPACKNAME=libopenblas
136    }
137}
138
139github.livecheck.regex  {([^"-]+)}