public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthias Maier" <tamiko@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/julia/, dev-lang/julia/files/
Date: Tue, 18 Jul 2017 19:39:42 +0000 (UTC)	[thread overview]
Message-ID: <1500406737.f3506fdb14a41519aef6905d992d2f1dde53ef10.tamiko@gentoo> (raw)

commit:     f3506fdb14a41519aef6905d992d2f1dde53ef10
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 18 19:13:30 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Jul 18 19:38:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3506fdb

dev-lang/julia: add new ebuild for 0.6.0

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-lang/julia/Manifest                            |   2 +
 ...em.patch => julia-0.6.0-fix_build_system.patch} |  39 +++--
 .../julia/files/julia-9999-fix_build_system.patch  |  39 +++--
 dev-lang/julia/julia-0.6.0.ebuild                  | 176 +++++++++++++++++++++
 4 files changed, 234 insertions(+), 22 deletions(-)

diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest
index c91190d4268..344995da4b7 100644
--- a/dev-lang/julia/Manifest
+++ b/dev-lang/julia/Manifest
@@ -1,2 +1,4 @@
 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
+DIST julia-0.6.0-bundled.tar.gz 2097663 SHA256 2c5505baa76649c35b239aeed20a238427cad76ed4c93bc538f672a1f1ea18dd SHA512 50581da3628930b2d1b89d226f3551fa7b18ca23c322b7e93d1227cc0c3428f255a6087f9859ff2c592014407d53238e01a3847a727a87287fb8c7f679b022d1 WHIRLPOOL 6c07396cebd4799c66e1dc403185b330d5dd9816786d84de5a995782571ce31ceb249d46811540a1d7f87377a9db25b45572f148af4107feaef79b2aec13e89f
+DIST julia-0.6.0.tar.gz 5565427 SHA256 1c62bfce8075acf2b5b02355520a61210690324eceb021030681459d18a3a665 SHA512 da21b35eb2c682c0fb8720974a76759c51fe993f10e6af5ca4864fc7f0bb6c90d880b706eb798476c7228bae2db19ff0825add6a2abde2961f16a93a3050cb69 WHIRLPOOL 7bc1bb82d4ee112d258473d1200b99dfd1a48ae59d9a9b700e60484c6007e45aed3a6bc42b5ecf7d3eae2c61cab166a1086c8c16f5039abd073571cb83fde4a9

diff --git a/dev-lang/julia/files/julia-9999-fix_build_system.patch b/dev-lang/julia/files/julia-0.6.0-fix_build_system.patch
similarity index 70%
copy from dev-lang/julia/files/julia-9999-fix_build_system.patch
copy to dev-lang/julia/files/julia-0.6.0-fix_build_system.patch
index 4ed2822c141..6f804161775 100644
--- a/dev-lang/julia/files/julia-9999-fix_build_system.patch
+++ b/dev-lang/julia/files/julia-0.6.0-fix_build_system.patch
@@ -1,8 +1,8 @@
 diff --git a/Make.inc b/Make.inc
-index 651c9df..ff01872 100644
+index e30c150..e6fdbb2 100644
 --- a/Make.inc
 +++ b/Make.inc
-@@ -389,7 +389,7 @@ ifneq ($(OS), WINNT)
+@@ -399,7 +399,7 @@ ifneq ($(OS), WINNT)
  JCXXFLAGS += -pedantic
  endif
  DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
@@ -11,7 +11,7 @@ index 651c9df..ff01872 100644
  endif
  
  ifeq ($(USECLANG),1)
-@@ -400,7 +400,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+@@ -410,7 +410,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
@@ -19,8 +19,8 @@ index 651c9df..ff01872 100644
 +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
+ MACOSX_VERSION_MIN := 10.8
+@@ -439,7 +439,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
@@ -29,24 +29,41 @@ index 651c9df..ff01872 100644
  endif
  
  ifeq ($(USECCACHE), 1)
+diff --git a/deps/tools/jldownload b/deps/tools/jldownload
+index ab4fd69..e2c2408 100755
+--- 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/doc/Makefile b/doc/Makefile
-index 0749d73..f4d49ec 100644
+index 743804d..e06dde0 100644
 --- a/doc/Makefile
 +++ b/doc/Makefile
-@@ -62,7 +62,7 @@ help:
- 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+@@ -25,7 +25,7 @@ deps: UnicodeData.txt
+ 	$(JLCHECKSUM) UnicodeData.txt
  
  clean:
--	-rm -rf _build/*
+-	-rm -rf _build/* deps/* docbuild.log UnicodeData.txt
 +	@echo "Do not clean doc/_build/html. Just use it..."
  
  cleanall: clean
  
 diff --git a/src/Makefile b/src/Makefile
-index d7ec864..61d2470 100644
+index f71f53d..7cdd23f 100644
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -66,20 +66,8 @@ HEADERS := $(addprefix $(SRCDIR)/,julia.h julia_threads.h julia_internal.h optio
+@@ -85,20 +85,8 @@ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLI
  
  # 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.

diff --git a/dev-lang/julia/files/julia-9999-fix_build_system.patch b/dev-lang/julia/files/julia-9999-fix_build_system.patch
index 4ed2822c141..6f804161775 100644
--- a/dev-lang/julia/files/julia-9999-fix_build_system.patch
+++ b/dev-lang/julia/files/julia-9999-fix_build_system.patch
@@ -1,8 +1,8 @@
 diff --git a/Make.inc b/Make.inc
-index 651c9df..ff01872 100644
+index e30c150..e6fdbb2 100644
 --- a/Make.inc
 +++ b/Make.inc
-@@ -389,7 +389,7 @@ ifneq ($(OS), WINNT)
+@@ -399,7 +399,7 @@ ifneq ($(OS), WINNT)
  JCXXFLAGS += -pedantic
  endif
  DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
@@ -11,7 +11,7 @@ index 651c9df..ff01872 100644
  endif
  
  ifeq ($(USECLANG),1)
-@@ -400,7 +400,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+@@ -410,7 +410,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
@@ -19,8 +19,8 @@ index 651c9df..ff01872 100644
 +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
+ MACOSX_VERSION_MIN := 10.8
+@@ -439,7 +439,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
@@ -29,24 +29,41 @@ index 651c9df..ff01872 100644
  endif
  
  ifeq ($(USECCACHE), 1)
+diff --git a/deps/tools/jldownload b/deps/tools/jldownload
+index ab4fd69..e2c2408 100755
+--- 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/doc/Makefile b/doc/Makefile
-index 0749d73..f4d49ec 100644
+index 743804d..e06dde0 100644
 --- a/doc/Makefile
 +++ b/doc/Makefile
-@@ -62,7 +62,7 @@ help:
- 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+@@ -25,7 +25,7 @@ deps: UnicodeData.txt
+ 	$(JLCHECKSUM) UnicodeData.txt
  
  clean:
--	-rm -rf _build/*
+-	-rm -rf _build/* deps/* docbuild.log UnicodeData.txt
 +	@echo "Do not clean doc/_build/html. Just use it..."
  
  cleanall: clean
  
 diff --git a/src/Makefile b/src/Makefile
-index d7ec864..61d2470 100644
+index f71f53d..7cdd23f 100644
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -66,20 +66,8 @@ HEADERS := $(addprefix $(SRCDIR)/,julia.h julia_threads.h julia_internal.h optio
+@@ -85,20 +85,8 @@ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLI
  
  # 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.

diff --git a/dev-lang/julia/julia-0.6.0.ebuild b/dev-lang/julia/julia-0.6.0.ebuild
new file mode 100644
index 00000000000..9fc210dd85b
--- /dev/null
+++ b/dev-lang/julia/julia-0.6.0.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit 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"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="
+	dev-lang/R:0=
+	dev-libs/double-conversion:0=
+	dev-libs/gmp:0=
+	<dev-libs/libgit2-0.25: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=
+	>=dev-libs/libpcre2-10.23:0=[jit]
+	sci-libs/umfpack:0=
+	sci-mathematics/glpk:0=
+	>=sys-devel/llvm-3.9:0=
+	>=sys-libs/libunwind-1.1:7=
+	sys-libs/readline:0=
+	sys-libs/zlib:0=
+	>=virtual/blas-3.6
+	virtual/lapack"
+
+DEPEND="${RDEPEND}
+	dev-util/patchelf
+	virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix_build_system.patch
+)
+
+src_prepare() {
+	mv "${WORKDIR}"/bundled/UnicodeData.txt doc || die
+	mkdir deps/srccache || die
+	mv "${WORKDIR}"/bundled/* deps/srccache || die
+	rmdir "${WORKDIR}"/bundled || die
+
+	default
+
+	# 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,
+	# and utf8proc
+
+	# USE_SYSTEM_LIBM=0 implies using external openlibm
+	cat <<-EOF > Make.user
+		USE_SYSTEM_DSFMT=0
+		USE_SYSTEM_LIBUV=0
+		USE_SYSTEM_PCRE=1
+		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=0
+		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
+		libdir="${EROOT}/usr/$(get_libdir)"
+	EOF
+
+}
+
+src_compile() {
+
+	# Julia accesses /proc/self/mem on Linux
+	addpredict /proc/self/mem
+
+	emake cleanall
+	emake VERBOSE=1 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
+}
+
+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
+
+	dodoc README.md
+
+	mv "${ED}"/usr/etc/julia "${ED}"/etc || die
+	rmdir "${ED}"/usr/etc || die
+	mv "${ED}"/usr/share/doc/julia/{examples,html} \
+		"${ED}"/usr/share/doc/${PF} || 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
+}


             reply	other threads:[~2017-07-18 19:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 19:39 Matthias Maier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-17 21:45 [gentoo-commits] repo/gentoo:master commit in: dev-lang/julia/, dev-lang/julia/files/ Maciej Barć
2023-05-02  0:39 Maciej Barć
2022-10-28 10:43 Sam James
2022-06-06  5:17 Matthias Maier
2022-04-24 14:41 Michał Górny
2022-01-05 11:00 Matthias Maier
2022-01-05 11:00 Matthias Maier
2022-01-05 11:00 Matthias Maier
2022-01-03 21:37 Matthias Maier
2021-04-08  2:31 Matthias Maier
2021-04-05  9:05 罗百科
2019-01-07 21:38 Matthias Maier
2019-01-07 21:38 Matthias Maier
2019-01-07 21:38 Matthias Maier
2018-09-04  1:20 Matthias Maier
2018-07-01  4:49 Matthias Maier
2018-07-01  4:49 Matthias Maier
2017-09-16  5:01 Matthias Maier
2016-09-24 21:25 Matthias Maier
2016-09-20  6:36 Matthias Maier
2016-09-09  5:46 Matthias Maier
2016-01-16 11:39 Matthias Maier
2016-01-16 11:39 Matthias Maier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500406737.f3506fdb14a41519aef6905d992d2f1dde53ef10.tamiko@gentoo \
    --to=tamiko@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox