# Bundled Pkg and Statistics packages go into ./stdlib
localtarball="${i#julia-}"
cp "${DISTDIR}/${i}""${S}/stdlib/srccache/${tarball}"|| die
# and we have to fix up the sha1sum
localname="${tarball%-*}"
localsha1="${tarball#*-}"
sha1="${sha1%.tar*}"
einfo "using patched stdlib package \"${name}\""
sed -i -e "s/PKG_SHA1 = .*/PKG_SHA1 = ${sha1}/""${S}/stdlib/${name}.version"|| die
else
cp "${DISTDIR}/${i}""${S}/deps/srccache/${i#julia-}"|| die
fi
done
}
src_prepare(){
default
# Sledgehammer:
# - prevent fetching of bundled stuff in compile and install phase
# - respect CFLAGS
# - respect EPREFIX and Gentoo specific paths
sed -i \
-e "s|git submodule|${EPREFIX}/bin/true|g"\
-e "s|GENTOOCFLAGS|${CFLAGS}|g"\
-e "s|/usr/include|${EPREFIX}/usr/include|g"\
deps/Makefile || die
sed -i \
-e "s|GENTOOCFLAGS|${CFLAGS}|g"\
-e "s|GENTOOLIBDIR|$(get_libdir)|"\
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
# disable doc install starting git fetching
sed -i -e 's~install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html~install: $(build_depsbindir)/stringreplace~' Makefile || die
}
src_configure(){
# julia does not play well with the system versions of dsfmt, libuv,
# and utf8proc
use system-llvm && ewarn "You have enabled system-llvm. This is unsupported by upstream and may not work."
# USE_SYSTEM_LIBM=0 implies using external openlibm