1 |
commit: 590f14b4730f928ab7773f8d7ad5d8bf1a12817c |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 04:32:31 2018 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 04:49:04 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=590f14b4 |
7 |
|
8 |
dev-lang/julia: fix library installation path |
9 |
|
10 |
Closes: https://bugs.gentoo.org/655072 |
11 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
12 |
|
13 |
.../julia/files/julia-0.6.3-fix_build_system.patch | 96 ++++++++++++++++++++++ |
14 |
.../{julia-0.6.3.ebuild => julia-0.6.3-r1.ebuild} | 12 +-- |
15 |
2 files changed, 98 insertions(+), 10 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch b/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..41e64672adf |
20 |
--- /dev/null |
21 |
+++ b/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch |
22 |
@@ -0,0 +1,96 @@ |
23 |
+diff --git a/Make.inc b/Make.inc |
24 |
+index 7f3a37c..3560d93 100644 |
25 |
+--- a/Make.inc |
26 |
++++ b/Make.inc |
27 |
+@@ -180,7 +180,7 @@ USE_GPL_LIBS ?= 1 |
28 |
+ # Directories where said libraries get installed to |
29 |
+ prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT) |
30 |
+ bindir := $(prefix)/bin |
31 |
+-libdir := $(prefix)/lib |
32 |
++libdir := $(prefix)/GENTOOLIBDIR |
33 |
+ libexecdir := $(prefix)/libexec |
34 |
+ datarootdir := $(prefix)/share |
35 |
+ docdir := $(datarootdir)/doc/julia |
36 |
+@@ -400,7 +400,7 @@ ifneq ($(OS), WINNT) |
37 |
+ JCXXFLAGS += -pedantic |
38 |
+ endif |
39 |
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all |
40 |
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions |
41 |
++SHIPFLAGS := GENTOOCFLAGS |
42 |
+ endif |
43 |
+ |
44 |
+ ifeq ($(USECLANG),1) |
45 |
+@@ -411,7 +411,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 |
46 |
+ JCPPFLAGS := -fasynchronous-unwind-tables |
47 |
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic |
48 |
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all |
49 |
+-SHIPFLAGS := -O3 -g |
50 |
++SHIPFLAGS := GENTOOCFLAGS |
51 |
+ ifeq ($(OS), Darwin) |
52 |
+ ifeq ($(USE_LIBCPP), 1) |
53 |
+ MACOSX_VERSION_MIN := 10.8 |
54 |
+@@ -440,7 +440,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 |
55 |
+ JCPPFLAGS := |
56 |
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti |
57 |
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all |
58 |
+-SHIPFLAGS := -O3 -g -falign-functions |
59 |
++SHIPFLAGS := GENTOOCFLAGS |
60 |
+ endif |
61 |
+ |
62 |
+ ifeq ($(USECCACHE), 1) |
63 |
+diff --git a/deps/tools/jldownload b/deps/tools/jldownload |
64 |
+index ab4fd69..e2c2408 100755 |
65 |
+--- a/deps/tools/jldownload |
66 |
++++ b/deps/tools/jldownload |
67 |
+@@ -5,9 +5,9 @@ |
68 |
+ |
69 |
+ CACHE_HOST=https://cache.julialang.org |
70 |
+ |
71 |
+-WGET=$(which wget 2>/dev/null) |
72 |
+-CURL=$(which curl 2>/dev/null) |
73 |
+-FETCH=$(which fetch 2>/dev/null) |
74 |
++WGET=/bin/true |
75 |
++CURL=/bin/true |
76 |
++FETCH=/bin/true |
77 |
+ |
78 |
+ TIMEOUT=15 # seconds |
79 |
+ WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT" |
80 |
+diff --git a/doc/Makefile b/doc/Makefile |
81 |
+index 743804d..e06dde0 100644 |
82 |
+--- a/doc/Makefile |
83 |
++++ b/doc/Makefile |
84 |
+@@ -25,7 +25,7 @@ deps: UnicodeData.txt |
85 |
+ $(JLCHECKSUM) UnicodeData.txt |
86 |
+ |
87 |
+ clean: |
88 |
+- -rm -rf _build/* deps/* docbuild.log UnicodeData.txt |
89 |
++ @echo "Do not clean doc/_build/html. Just use it..." |
90 |
+ |
91 |
+ cleanall: clean |
92 |
+ |
93 |
+diff --git a/src/Makefile b/src/Makefile |
94 |
+index 9fde74d..e01ab2e 100644 |
95 |
+--- a/src/Makefile |
96 |
++++ b/src/Makefile |
97 |
+@@ -85,20 +85,8 @@ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLI |
98 |
+ |
99 |
+ # In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs |
100 |
+ # In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries. |
101 |
+-ifneq ($(USE_LLVM_SHLIB),1) |
102 |
+-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) |
103 |
+-else |
104 |
+-ifeq ($(LLVM_USE_CMAKE),1) |
105 |
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM |
106 |
+-else |
107 |
+-ifeq ($(OS),WINNT) |
108 |
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT) |
109 |
+-else |
110 |
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version) |
111 |
+-endif # OS == WINNT |
112 |
+-endif # LLVM_USE_CMAKE == 1 |
113 |
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs) |
114 |
+ FLAGS += -DLLVM_SHLIB |
115 |
+-endif # USE_LLVM_SHLIB == 1 |
116 |
+ |
117 |
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS) |
118 |
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS) |
119 |
|
120 |
diff --git a/dev-lang/julia/julia-0.6.3.ebuild b/dev-lang/julia/julia-0.6.3-r1.ebuild |
121 |
similarity index 89% |
122 |
rename from dev-lang/julia/julia-0.6.3.ebuild |
123 |
rename to dev-lang/julia/julia-0.6.3-r1.ebuild |
124 |
index ba814f62191..163fa629a20 100644 |
125 |
--- a/dev-lang/julia/julia-0.6.3.ebuild |
126 |
+++ b/dev-lang/julia/julia-0.6.3-r1.ebuild |
127 |
@@ -54,7 +54,7 @@ DEPEND="${RDEPEND} |
128 |
virtual/pkgconfig" |
129 |
|
130 |
PATCHES=( |
131 |
- "${FILESDIR}"/${PN}-0.6.0-fix_build_system.patch |
132 |
+ "${FILESDIR}"/${PN}-0.6.3-fix_build_system.patch |
133 |
) |
134 |
|
135 |
src_prepare() { |
136 |
@@ -85,12 +85,8 @@ src_prepare() { |
137 |
liblapack="lib${liblapack#-l}" |
138 |
|
139 |
sed -i \ |
140 |
- -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \ |
141 |
-e "s|GENTOOCFLAGS|${CFLAGS}|g" \ |
142 |
- -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \ |
143 |
- -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \ |
144 |
- -e "s|/usr/include|${EPREFIX}/usr/include|" \ |
145 |
- -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \ |
146 |
+ -e "s|GENTOOLIBDIR|$(get_libdir)|" \ |
147 |
-e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \ |
148 |
-e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \ |
149 |
-e "s|= libblas|= ${libblas}|" \ |
150 |
@@ -187,8 +183,4 @@ src_install() { |
151 |
mv "${ED}"/usr/share/doc/julia/{examples,html} \ |
152 |
"${ED}"/usr/share/doc/${PF} || die |
153 |
rmdir "${ED}"/usr/share/doc/julia || die |
154 |
- if [[ $(get_libdir) != lib ]]; then |
155 |
- mkdir -p "${ED}"/usr/$(get_libdir) || die |
156 |
- mv "${ED}"/usr/lib/julia "${ED}"/usr/$(get_libdir)/julia || die |
157 |
- fi |
158 |
} |