commit: 21617b930342efc1429e2386c42d51e41cb1604c Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> AuthorDate: Tue Sep 20 06:27:09 2016 +0000 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> CommitDate: Tue Sep 20 06:36:03 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21617b93
dev-lang/julia: version bump to 0.5.0 Package-Manager: portage-2.2.28 dev-lang/julia/Manifest | 2 + .../julia/files/julia-0.5.0-fix_build_system.patch | 85 ++++++++++ dev-lang/julia/julia-0.5.0.ebuild | 188 +++++++++++++++++++++ 3 files changed, 275 insertions(+) diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest index 07327ed..aa23d93 100644 --- a/dev-lang/julia/Manifest +++ b/dev-lang/julia/Manifest @@ -2,3 +2,5 @@ DIST julia-0.4.3-bundled.tar.gz 2678787 SHA256 9451160add4c1fa537762627abcd3dd5f DIST julia-0.4.3.tar.gz 5563437 SHA256 b2c12b267c0d8eb380f6628e7be48c7ec46d2cfb5c585ecb3ca4cc442650e4e0 SHA512 7d5180c69573452c00563c7b98514fc9e4f0f70762912cf4f90cbf632e4b23ec149295ff1955164833ab94efd1feab992067996e3d60f795850542cf2f18f67f WHIRLPOOL 75c3ebf8cb1af67158896872e098bf66a8073eba3daf6cf5903471d34201e1605458e59f14c19ff5177413daee5aac102ec69a0afe9a93a219698a4640acaf33 DIST julia-0.4.6-bundled.tar.gz 2678787 SHA256 9451160add4c1fa537762627abcd3dd5fecca9ce44f71c4140d89a4bb6b23392 SHA512 919ca7b99a6eb17a651ce24fe07e5c12bfcee54ce86fac8f744765195002e8f3330df9059fadd5af3408c1f7e067e247ad4bb135879ae4ae43e1457245f90db9 WHIRLPOOL 94bb022d4f1586dfdc2f52286db423cb09898a3a5dff2f2086ca111b9117dca808758351dada23cea1056a8e5c3b33f6919410c34af96a92a4a9f8b0e0758783 DIST julia-0.4.6.tar.gz 5548248 SHA256 e5d12b5a8ddff0131e460612ecf222ddf16014fc64c4fc3d8b021da7ebbd9a9f SHA512 744fbae14f7b38d5f7ef1c39d05c66f42833ee0e07b3f4be2ae377f2c997872777c6f7e9e667f52e5a33879032b2d02d76b00fab59f81ba6552f1fd4165953da WHIRLPOOL 3403364fc13bd8012da1ee333cc51fd0a957e94920bbd3f951fad4a689469f514e19a661bf2bdfdd29afbcadac1c9d6948638fd9d4201780a1aa7c0fd2995dee +DIST julia-0.5.0-bundled.tar.gz 3461547 SHA256 3f4887fc2c0112666eb28b99f86bd8f7bd50615325e03135c546127885d46fbf SHA512 f8df589edf7d6b0e1e6553583c81d26fd256a79cacd79fbdd0ea1a9eea46b2466e3cbf055b5b7aa2d5c08318a5c35b9c09a30ac46a48689cc5c7245954b615c8 WHIRLPOOL b0137b2ed55aef7dc2c1a8693043ce63305bd2bbb5c2f959b2752fdb68189a506b027b467bfc0bb443fa4202f3735dd9410a257adec08302dfcaa0c9e4bfed98 +DIST julia-0.5.0.tar.gz 6326490 SHA256 bb62a14806e58f079ecd4941d4a18d1f1c1d89ab33c826d3a58a2244e364112e SHA512 6d76c5050da5050cd541c8407c35c8ecd60ad2ba61c4defcc5c084aaeb09e82ffed09be79a3453000bdf88efe56039948335bab21c8389389ffb8b29806568de WHIRLPOOL 7f0066cc7fa912fe7ce5b6bf43449d828b0b9dcf2ab57df6c13a0df17ee53351c6deb30e7b998dc00ff53c548074d79ed6288bc79507afebc4fd827b3e3c032f diff --git a/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch b/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch new file mode 100644 index 00000000..e54b9a4 --- /dev/null +++ b/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch @@ -0,0 +1,85 @@ +diff --git a/Make.inc b/Make.inc +index 651c9df..ff01872 100644 +--- a/Make.inc ++++ b/Make.inc +@@ -389,7 +389,7 @@ ifneq ($(OS), WINNT) + JCXXFLAGS += -pedantic + endif + DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all +-SHIPFLAGS := -O3 -ggdb2 -falign-functions ++SHIPFLAGS := GENTOOCFLAGS + endif + + ifeq ($(USECLANG),1) +@@ -400,7 +400,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 + JCPPFLAGS := -fasynchronous-unwind-tables + JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic + DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all +-SHIPFLAGS := -O3 -g ++SHIPFLAGS := GENTOOCFLAGS + ifeq ($(OS), Darwin) + ifeq ($(USE_LIBCPP), 1) + CC += -stdlib=libc++ -mmacosx-version-min=10.7 +@@ -427,7 +427,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 + JCPPFLAGS := + JCXXFLAGS := -pipe $(fPIC) -fno-rtti + DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all +-SHIPFLAGS := -O3 -g -falign-functions ++SHIPFLAGS := GENTOOCFLAGS + endif + + ifeq ($(USECCACHE), 1) +diff --git a/doc/Makefile b/doc/Makefile +index 0749d73..f4d49ec 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -62,7 +62,7 @@ help: + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + + clean: +- -rm -rf _build/* ++ @echo "Do not clean doc/_build/html. Just use it..." + + cleanall: clean + +diff --git a/src/Makefile b/src/Makefile +index d7ec864..61d2470 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -66,20 +66,8 @@ HEADERS := $(addprefix $(SRCDIR)/,julia.h julia_threads.h julia_internal.h optio + + # In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs + # In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries. +-ifneq ($(USE_LLVM_SHLIB),1) +-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null) +-else +-ifeq ($(LLVM_USE_CMAKE),1) +-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM +-else +-ifeq ($(OS),WINNT) +-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT) +-else +-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version) +-endif # OS == WINNT +-endif # LLVM_USE_CMAKE == 1 ++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs) + FLAGS += -DLLVM_SHLIB +-endif # USE_LLVM_SHLIB == 1 + + COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS) + DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS) +--- a/deps/tools/jldownload ++++ b/deps/tools/jldownload +@@ -5,9 +5,9 @@ + + CACHE_HOST=https://cache.julialang.org + +-WGET=$(which wget 2>/dev/null) +-CURL=$(which curl 2>/dev/null) +-FETCH=$(which fetch 2>/dev/null) ++WGET=/bin/true ++CURL=/bin/true ++FETCH=/bin/true + + TIMEOUT=15 # seconds + WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT" diff --git a/dev-lang/julia/julia-0.5.0.ebuild b/dev-lang/julia/julia-0.5.0.ebuild new file mode 100644 index 00000000..10bce00 --- /dev/null +++ b/dev-lang/julia/julia-0.5.0.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +RESTRICT="test" + +inherit elisp-common eutils multilib pax-utils toolchain-funcs + +DESCRIPTION="High-performance programming language for technical computing" +HOMEPAGE="http://julialang.org/" +SRC_URI=" + https://github.com/JuliaLang/${PN}/releases/download/v${PV}/${P}.tar.gz + https://dev.gentoo.org/~tamiko/distfiles/${P}-bundled.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="emacs" + +RDEPEND=" + dev-lang/R:0= + dev-libs/double-conversion:0= + dev-libs/gmp:0= + dev-libs/libgit2:0= + dev-libs/mpfr:0= + dev-libs/openspecfun + sci-libs/arpack:0= + sci-libs/camd:0= + sci-libs/cholmod:0= + sci-libs/fftw:3.0=[threads] + sci-libs/openlibm:0= + sci-libs/spqr:0= + sci-libs/umfpack:0= + sci-mathematics/glpk:0= + >=sys-devel/llvm-3.5:0= + >=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" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-fix_build_system.patch +) + +src_prepare() { + mkdir deps/srccache || die + mv "${WORKDIR}"/bundled/* deps/srccache || die + rmdir "${WORKDIR}"/bundled || die + + epatch "${PATCHES[@]}" + + eapply_user + + # Sledgehammer: + # - prevent fetching of bundled stuff in compile and install phase + # - respect CFLAGS + # - respect EPREFIX and Gentoo specific paths + # - fix BLAS and LAPACK link interface + + sed -i \ + -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \ + -e 's|git submodule|${EPREFIX}/bin/true|g' \ + -e "s|GENTOOCFLAGS|${CFLAGS}|g" \ + -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \ + deps/Makefile || die + + local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)" + libblas="${libblas%% *}" + libblas="lib${libblas#-l}" + local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)" + liblapack="${liblapack%% *}" + liblapack="lib${liblapack#-l}" + + sed -i \ + -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \ + -e "s|GENTOOCFLAGS|${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}|" \ + -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \ + -e "s|= libblas|= ${libblas}|" \ + -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \ + -e "s|= liblapack|= ${liblapack}|" \ + 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() { + # julia does not play well with the system versions of + # dsfmt, libuv, pcre2 and utf8proc + cat <<-EOF > Make.user + USE_SYSTEM_DSFMT=0 + USE_SYSTEM_LIBUV=0 + USE_SYSTEM_PCRE=0 + USE_SYSTEM_RMATH=0 + USE_SYSTEM_UTF8PROC=0 + 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_LIBGIT2=1 + USE_SYSTEM_LIBM=1 + USE_SYSTEM_LIBUNWIND=1 + USE_SYSTEM_LLVM=1 + USE_SYSTEM_MPFR=1 + USE_SYSTEM_OPENLIBM=1 + USE_SYSTEM_OPENSPECFUN=1 + USE_SYSTEM_PATCHELF=1 + USE_SYSTEM_READLINE=1 + USE_SYSTEM_SUITESPARSE=1 + USE_SYSTEM_ZLIB=1 + VERBOSE=1 + EOF + +} + +src_compile() { + + # Julia accesses /proc/self/mem on Linux + addpredict /proc/self/mem + + emake cleanall + emake julia-release \ + prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + 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="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)" + 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 + + mv "${ED}"/usr/etc/julia "${ED}"/etc || die + rmdir "${ED}"/usr/etc || die + rmdir "${ED}"/usr/libexec || die + mv "${ED}"/usr/share/doc/julia/{examples,html} \ + "${ED}"/usr/share/doc/${P} || die + rmdir "${ED}"/usr/share/doc/julia || die + if [[ $(get_libdir) != lib ]]; then + mkdir -p "${ED}"/usr/$(get_libdir) || die + mv "${ED}"/usr/lib/julia "${ED}"/usr/$(get_libdir)/julia || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +}