summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-04-02 23:03:34 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-04-02 23:03:34 +0000
commitc87f0ed227651441497dad2d5775f670b92ff8a2 (patch)
treecd99e41df082d8f6ce0be14915555cc14d50d8ca /dev-lang/julia
parentFixed keywords for regular amd64 and x86 (diff)
downloadgentoo-2-c87f0ed227651441497dad2d5775f670b92ff8a2.tar.gz
gentoo-2-c87f0ed227651441497dad2d5775f670b92ff8a2.tar.bz2
gentoo-2-c87f0ed227651441497dad2d5775f670b92ff8a2.zip
Version bump. Refactored ebuild to use more system dependencies, cleanup, add emacs support, readline-6.3 patch, better prefix support. Add sci as herd and longdescription.
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-lang/julia')
-rw-r--r--dev-lang/julia/ChangeLog10
-rw-r--r--dev-lang/julia/files/63julia-gentoo.el2
-rw-r--r--dev-lang/julia/files/julia-0.2.1-readline63.patch17
-rw-r--r--dev-lang/julia/julia-0.2.1.ebuild151
-rw-r--r--dev-lang/julia/metadata.xml21
5 files changed, 196 insertions, 5 deletions
diff --git a/dev-lang/julia/ChangeLog b/dev-lang/julia/ChangeLog
index 3e14fd1944fc..8862d4c959e2 100644
--- a/dev-lang/julia/ChangeLog
+++ b/dev-lang/julia/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/julia
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/julia/ChangeLog,v 1.7 2014/03/14 19:53:58 calchan Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/julia/ChangeLog,v 1.8 2014/04/02 23:03:34 bicatali Exp $
+
+*julia-0.2.1 (02 Apr 2014)
+
+ 02 Apr 2014; Sébastien Fabbro <bicatali@gentoo.org> +files/63julia-gentoo.el,
+ +files/julia-0.2.1-readline63.patch, +julia-0.2.1.ebuild, metadata.xml:
+ Version bump. Refactored ebuild to use more system dependencies, cleanup, add
+ emacs support, readline-6.3 patch, better prefix support. Add sci as herd and
+ longdescription.
14 Mar 2014; Denis Dupeyron <calchan@gentoo.org> julia-0.2.0-r1.ebuild:
Fixed confusing comment, bug #502482.
diff --git a/dev-lang/julia/files/63julia-gentoo.el b/dev-lang/julia/files/63julia-gentoo.el
new file mode 100644
index 000000000000..6b60749020ca
--- /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/files/julia-0.2.1-readline63.patch b/dev-lang/julia/files/julia-0.2.1-readline63.patch
new file mode 100644
index 000000000000..cc9ede53f392
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.2.1-readline63.patch
@@ -0,0 +1,17 @@
+Description: Fix FTBFS against readline 6.3
+Origin: backport, https://github.com/JuliaLang/julia/commit/d2552e0f03d1dc23d6bb0c89c39da3d73c7aa4e5
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741824
+Last-Update: 2014-03-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/ui/repl-readline.c
++++ b/ui/repl-readline.c
+@@ -831,7 +831,7 @@ void jl_init_repl(int history)
+ rl_instream = fopen("/dev/null","r");
+ prompt_length = 7; // == strlen("julia> ")
+ init_history();
+- rl_startup_hook = (Function*)init_rl;
++ rl_startup_hook = (rl_hook_func_t*)init_rl;
+ }
+
+ static char *prompt_string=NULL;
diff --git a/dev-lang/julia/julia-0.2.1.ebuild b/dev-lang/julia/julia-0.2.1.ebuild
new file mode 100644
index 000000000000..17c0f96d6d84
--- /dev/null
+++ b/dev-lang/julia/julia-0.2.1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/julia/julia-0.2.1.ebuild,v 1.1 2014/04/02 23:03:34 bicatali Exp $
+
+EAPI=5
+
+inherit elisp-common eutils multilib pax-utils toolchain-funcs
+
+PDSFMT=dSFMT-src-2.2
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="http://julialang.org/"
+SRC_URI="
+ https://github.com/JuliaLang/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/${PDSFMT}.tar.gz
+ http://dev.gentoo.org/~bicatali/distfiles/libuv-${P}.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="emacs"
+
+RDEPEND="${CDEPEND}
+ dev-lang/R:0=
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ dev-libs/libpcre:3=
+ dev-libs/mpfr: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-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"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-readline63.patch
+
+ ln -s "${DISTDIR}"/${PDSFMT}.tar.gz deps/random/dsfmt-2.2.tar.gz || die
+ rmdir deps/libuv && ln -s "${WORKDIR}"/libuv deps/libuv
+ # no fetching in ebuild
+ # /usr/include/suitesparse is for debian only
+ # respect prefix, flags
+ sed -i \
+ -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \
+ -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
+}
+
+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=1
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_RMATH=1
+ USE_SYSTEM_SUITESPARSE=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 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
+ 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
index 24cbb90cf0c4..77fd3240ae7d 100644
--- a/dev-lang/julia/metadata.xml
+++ b/dev-lang/julia/metadata.xml
@@ -1,8 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer>
- <email>patrick@gentoo.org</email>
- <name>Patrick Lauer</name>
- </maintainer>
+<maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+</maintainer>
+<herd>sci</herd>
+<longdescription lang="en">
+ 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. Julia programs are organized around defining
+ functions, and overloading them for different combinations of
+ argument types (which can also be user-defined).
+</longdescription>
</pkgmetadata>