From e6cf966ce6188365a0032e9ab74ef16c5f66f10a Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Wed, 19 Dec 2012 02:25:47 -0500 Subject: dev-lang/julia new ebuild --- dev-lang/julia/ChangeLog | 11 +++++ dev-lang/julia/julia-9999.ebuild | 99 ++++++++++++++++++++++++++++++++++++++++ dev-lang/julia/metadata.xml | 23 ++++++++++ 3 files changed, 133 insertions(+) create mode 100644 dev-lang/julia/ChangeLog create mode 100644 dev-lang/julia/julia-9999.ebuild create mode 100644 dev-lang/julia/metadata.xml (limited to 'dev-lang/julia') diff --git a/dev-lang/julia/ChangeLog b/dev-lang/julia/ChangeLog new file mode 100644 index 000000000..e7069c84b --- /dev/null +++ b/dev-lang/julia/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-lang/julia +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*julia-9999 (19 Dec 2012) + + 19 Dec 2012; Guillaume Horel +julia-9999.ebuild, + +metadata.xml: + Initial import. Ebuild written with help from Nicolas Bigaouette and + Sébastien Fabbro. + diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild new file mode 100644 index 000000000..9d503b4c7 --- /dev/null +++ b/dev-lang/julia/julia-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +EGIT_REPO_URI="git://github.com/JuliaLang/julia.git" + +inherit git-2 elisp-common eutils multilib + +DESCRIPTION="High-performance dynamic language for technical computing" +HOMEPAGE="http://julialang.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="doc emacs notebook" + +RDEPEND=">=sys-devel/llvm-3.0 + sys-libs/readline + emacs? ( !app-emacs/ess ) + >=sci-libs/suitesparse-4.0 + sci-libs/arpack + sci-libs/fftw + dev-libs/gmp + sys-libs/libunwind + dev-libs/libpcre + sci-mathematics/glpk + sys-libs/zlib + virtual/blas + virtual/lapack + notebook? ( www-servers/lighttpd )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + # Folder /usr/include/suitesparse does not exists, everything should be in /usr/include + sed -e "s|SUITESPARSE_INC = -I /usr/include/suitesparse|SUITESPARSE_INC = |g" \ + -i deps/Makefile + + blasname=$($(tc-getPKG_CONFIG) --libs blas | \ + sed -e "s/-l\([a-z0-9]*\).*/lib\1/") + lapackname=$($(tc-getPKG_CONFIG) --libs lapack | \ + sed -e "s/-l\([a-z0-9]*\).*/lib\1/") + + sed -i \ + -e 's|\(USE_SYSTEM_.*\)=.*|\1=1|g' \ + -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \ + -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \ + -e "s|liblapack|${lapackname}|" \ + -e "s|libblas|${blasname}|" Make.inc || die + + # do not set the RPATH + sed -e "/RPATH = /d" -e "/RPATH_ORIGIN = /d" -i Make.inc +} + +src_compile() { + emake -j1 + use doc && emake -C doc html + if use notebook; then + emake -C ui/webserver + sed -e "s|etc|/share/julia/etc|" \ + -i usr/bin/launch-julia-webserver ||die + fi + use emacs && elisp-compile contrib/julia-mode.el +} + +src_install() { + emake -j1 install PREFIX="${D}/usr" + cat > 99julia <<-EOF + LDPATH=/usr/$(get_libdir)/julia + EOF + doenvd 99julia + if use notebook; then + cp -R ui/website "${D}/usr/share/julia" + insinto /usr/share/julia/etc + doins deps/lighttpd.conf + fi + if use emacs; then + elisp-install "${PN}" contrib/julia-mode.el + elisp-site-file-install "${FILESDIR}"/63-julia-gentoo.el + fi + use doc && dodoc -r doc/_build/html + dodoc README.md +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} + +src_test() { + emake -C test || die "Running tests failed" +} diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml new file mode 100644 index 000000000..03a860095 --- /dev/null +++ b/dev-lang/julia/metadata.xml @@ -0,0 +1,23 @@ + + + + + guillaume.horel@gmail.com + Guillaume Horel + + + 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. More + libraries continue to be added over time. Julia programs are organized + around defining functions, and overloading them for different combinations + of argument types (which can also be user-defined). + + + Install requirements for the web notebook based on www-servers/lighttpd + + -- cgit v1.2.3