summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Riley <justin.t.riley@gmail.com>2014-04-09 13:48:12 -0400
committerJustin Riley <justin.t.riley@gmail.com>2014-04-09 13:48:12 -0400
commitfeee7e4dbfbd380282d63b6695c0bc9b020f6772 (patch)
tree24194f8762a11305345d22d8050a896857a16f8b
parentadd live ebuild for x11-wm/awesome (diff)
downloadjtriley-feee7e4dbfbd380282d63b6695c0bc9b020f6772.tar.gz
jtriley-feee7e4dbfbd380282d63b6695c0bc9b020f6772.tar.bz2
jtriley-feee7e4dbfbd380282d63b6695c0bc9b020f6772.zip
add improved live ebuild for dev-lang/julia
-rw-r--r--dev-lang/julia/ChangeLog37
-rw-r--r--dev-lang/julia/files/63julia-gentoo.el2
-rw-r--r--dev-lang/julia/julia-9999.ebuild148
-rw-r--r--dev-lang/julia/metadata.xml17
4 files changed, 204 insertions, 0 deletions
diff --git a/dev-lang/julia/ChangeLog b/dev-lang/julia/ChangeLog
new file mode 100644
index 0000000..b725a62
--- /dev/null
+++ b/dev-lang/julia/ChangeLog
@@ -0,0 +1,37 @@
+# ChangeLog for dev-lang/julia
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 02 Apr 2014; Sebastien Fabbro <fabbros@gentoo.org> julia-9999.ebuild,
+ metadata.xml:
+ various consistent fixes for main tree
+
+ 08 Feb 2014; <xhochy@gentoo.org> julia-9999.ebuild:
+ PREFIX is now prefix
+
+ 26 Jan 2014; <xhochy@gentoo.org> julia-9999.ebuild:
+ Add missing dependency for utf8proc
+
+ 06 Jan 2014; Justin Lecher <jlec@gentoo.org> julia-9999.ebuild, metadata.xml:
+ Switch from git-2 to git-r3
+
+ 17 Jul 2013; Sébastien Fabbro <bicatali@gentoo.org> julia-9999.ebuild,
+ metadata.xml:
+ dev-lang/julia: Small fixes and cleanup, use system patchelf
+
+ 14 Jul 2013; James Cloos <cloos@jhcloos.com> julia-9999.ebuild:
+ Julia uses submodules, so set EGIT_HAS_SUBMODULES=yes
+
+ 14 Jun 2013; Justin Lecher <jlec@gentoo.org> julia-9999.ebuild, metadata.xml:
+ Drop KEYWORDS of live ebuilds
+
+ 19 Dec 2012; Guillaume Horel <guillaume.horel@gmail.com>
+ +files/63julia-gentoo.el:
+ Add emacs julia mode file
+
+*julia-9999 (19 Dec 2012)
+
+ 19 Dec 2012; Guillaume Horel <guillaume.horel@gmail.com> +julia-9999.ebuild,
+ +metadata.xml:
+ Initial import. Ebuild written with help from Nicolas Bigaouette and
+ Sébastien Fabbro.
diff --git a/dev-lang/julia/files/63julia-gentoo.el b/dev-lang/julia/files/63julia-gentoo.el
new file mode 100644
index 0000000..6b60749
--- /dev/null
+++ b/dev-lang/julia/files/63julia-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.jl$" . julia-mode))
diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild
new file mode 100644
index 0000000..cfe7da1
--- /dev/null
+++ b/dev-lang/julia/julia-9999.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit git-r3 elisp-common eutils multilib pax-utils toolchain-funcs
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="http://julialang.org/"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/JuliaLang/julia.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc emacs"
+
+RDEPEND="
+ dev-lang/R:0=
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ dev-libs/libpcre:3=
+ dev-libs/mpfr:0=
+ dev-libs/utf8proc:0=
+ sci-libs/arpack:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ sci-libs/umfpack:0=
+ sci-libs/camd:0=
+ sci-mathematics/glpk:0=
+ >=sys-devel/llvm-3.3
+ >=sys-libs/libunwind-1.1:7=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ virtual/blas
+ virtual/lapack
+ emacs? ( app-emacs/ess )"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )"
+
+src_prepare() {
+ # sadlib keep fetching in ebuild to make sure live build works
+ # /usr/include/suitesparse is for debian only
+ # respect prefix, flags
+ sed -i \
+ -e 's|^\(SUITESPARSE_INC\s*=\).*||g' \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e 's|/usr/bin/||g' \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ Make.inc || die
+
+ sed -i \
+ -e "s|,lib)|,$(get_libdir))|g" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ Makefile || die
+
+ sed -i \
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ src/Makefile || die
+ echo "include \$(JULIAHOME)/Make.user" >> Make.inc || die
+}
+
+src_configure() {
+ # libuv is an incompatible fork from upstream, so don't use system one
+ cat <<-EOF > Make.user
+ LIBBLAS=$($(tc-getPKG_CONFIG) --libs blas)
+ LIBBLASNAME=$($(tc-getPKG_CONFIG) --libs blas | sed -e "s/-l\([a-z0-9]*\).*/lib\1/")
+ LIBLAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+ LIBLAPACKNAME=$($(tc-getPKG_CONFIG) --libs lapack | sed -e "s/-l\([a-z0-9]*\).*/lib\1/")
+ USE_LLVM_SHLIB=1
+ USE_SYSTEM_ARPACK=1
+ USE_SYSTEM_BLAS=1
+ USE_SYSTEM_FFTW=1
+ USE_SYSTEM_GMP=1
+ USE_SYSTEM_GRISU=1
+ USE_SYSTEM_LAPACK=1
+ USE_SYSTEM_LIBM=0
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_OPENSPECFUN=0
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_RMATH=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_UTF8PROC=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ EOF
+}
+
+src_compile() {
+ emake cleanall
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p usr/$(get_libdir) || die
+ ln -s $(get_libdir) usr/lib || die
+ fi
+ emake julia-release
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+ use doc && emake -C doc html
+ use emacs && elisp-compile contrib/julia-mode.el
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake install prefix="${D}/usr"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ if use emacs; then
+ elisp-install "${PN}" contrib/julia-mode.el
+ elisp-site-file-install "${FILESDIR}"/63julia-gentoo.el
+ fi
+ use doc && dohtml -r doc/_build/html/*
+ dodoc README.md
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml
new file mode 100644
index 0000000..523edd5
--- /dev/null
+++ b/dev-lang/julia/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription>
+ 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).
+</longdescription>
+</pkgmetadata>