Skip to content

Instantly share code, notes, and snippets.

@vtjnash
Created March 20, 2013 17:52
Show Gist options
  • Save vtjnash/5206861 to your computer and use it in GitHub Desktop.
Save vtjnash/5206861 to your computer and use it in GitHub Desktop.
# -*- 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
# $Id$
PortSystem 1.0
PortGroup github 1.0
github.setup JuliaLang julia 0
name julia
version 0
categories lang
platforms darwin
license MIT
maintainers comcast.net:vtjnash
description A high-performance dynamic programming language for technical computing
long_description Julia is a high-level, high-performance dynamic programming language \
for technical computing, with syntax that is familiar to users of other \
technical computing environments. It provides a sophisticated compiler, \
distributed parallel execution, numerical accuracy, and an extensive \
mathematical function library. The library, mostly written in Julia \
itself, also integrates mature, best-of-breed C and Fortran libraries \
for linear algebra, random number generation, FFTs, and string processing.\
\n\nIf you want the development version instead of the newest version at the time \
of the last update of the Portfile, you can use the variant +latest, or build \
from source directly by using the build script in contrib. \
(typically, `git clone git://github.com/JuliaLang/julia.git\; \
\nLD_LIBRARY_PATH=${prefix}/lib:\${LD_LIBRARY_FLAG}\ && \
make -C julia/contrib -f macports.make PREFIX=${prefix}`)
homepage http://julialang.org/
use_configure no
test.run yes
git.branch 887affc1fa54fcbc656b36d9c1fcadea9f0adc99
#checksums rmd160 7bbfce4fecc2a8e1ca081169e70c1a298ab1b75a \
# sha256 2829fcb7393bac85925090b286b1f9c3cd3fbbf8e7f35796ef4131322509aa53
depends_lib port:readline \
port:SuiteSparse \
port:llvm-3.0 \
port:gmp \
port:fftw-3-single \
port:pcre \
port:arpack \
port:glpk \
git
depends_build port:perl5
variant latest description {Build/Install cutting edge version of Julia } {
git.branch master
}
variant gcc42 description {Compile Fortran code using gcc42} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 g95 {
depends_build-append port:gcc42
depends_skip_archcheck gcc42
configure.fc ${prefix}/bin/gfortran-mp-4.2
}
variant gcc43 description {Compile Fortran code using gcc43} conflicts gcc42 gcc44 gcc45 gcc46 gcc47 g95 {
depends_build-append port:gcc43
configure.fc ${prefix}/bin/gfortran-mp-4.3
}
variant gcc44 description {Compile Fortran code using gcc44} conflicts gcc42 gcc43 gcc45 gcc46 gcc47 g95 {
depends_build-append port:gcc44
configure.fc ${prefix}/bin/gfortran-mp-4.4
}
variant gcc45 description {Compile Fortran code using gcc45} conflicts gcc42 gcc43 gcc44 gcc46 gcc47 g95 {
depends_build-append port:gcc45
configure.fc ${prefix}/bin/gfortran-mp-4.5
}
variant gcc46 description {Compile Fortran code using gcc46} conflicts gcc42 gcc43 gcc44 gcc45 gcc47 g95 {
depends_build-append port:gcc46
configure.fc ${prefix}/bin/gfortran-mp-4.6
}
variant gcc47 description {Compile Fortran code using gcc47} conflicts gcc42 gcc43 gcc44 gcc45 gcc46 g95 {
depends_build-append port:gcc47
configure.fc ${prefix}/bin/gfortran-mp-4.7
}
if {![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] &&
![variant_isset gcc46] && ![variant_isset gcc47]} {
default_variants +gcc45
}
configure.cflags-append -I/opt/local/include/ufsparse
build.args-append -C contrib -f macport.make PREFIX=${prefix}
build.args-append USE_DEBIAN=1 LLVM_CONFIG=llvm-config-mp-3.0
build.args-append CFLAGS='${configure.cflags}' CXXFLAGS='${configure.cxxflags}' LDFLAGS='${configure.ldflags}'
build.args-append CC=${configure.cc} CXX=${configure.cxx} CPP=${configure.cpp}
build.env-append LD_LIBRARY_PATH=${prefix}/lib
if { [string first "clang" ${configure.compiler}] != -1} {
build.args-append USE_GCC=0 USE_CLANG=1
else {
build.args-append USE_GCC=1 USE_CLANG=0
}
destroot.args-append ${build.args}
test.env-append ${build.env}
test.args-append ${build.args}
pre-build {
build.args-append FC=${configure.fc}
}
post-destroot {
set julia_script [open "${destroot}${prefix}/bin/julia" w 0755]
puts ${julia_script} "#!/bin/sh"
puts ${julia_script} "export LD_LIBRARY_PATH=${prefix}/lib:\$LD_LIBRARY_PATH"
puts ${julia_script} "${prefix}/share/julia/julia"
close ${julia_script}
}
@vtjnash
Copy link
Author

vtjnash commented Mar 20, 2013

This hasn't been updated in a while, so parts are almost certainly out-of-date (such as the use of USE_DEBIAN=1 instead of USE_SYSTEM_X=1). Additionally, I think the post-destroot script can be replaced by adding a LDFLAG that adds an rpath location of ${prefix}/lib to the binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment