Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/octave/files/, sci-mathematics/octave/
Date: Sat, 24 Sep 2016 12:44:42
Message-Id: 1474721067.430460192fa2d64c196a18b34d386d4f244f5755.soap@gentoo
1 commit: 430460192fa2d64c196a18b34d386d4f244f5755
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 12:43:45 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 24 12:44:27 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43046019
7
8 sci-mathematics/octave: Fix zlib underlinking
9
10 Gentoo-bug: 593670
11 * [QA] Add -Wl,-z,defs to LDFLAGS
12 * Make dependency on sys-libs/zlib unconditional
13
14 Package-Manager: portage-2.3.1
15
16 .../octave/files/octave-4.0.3-zlib-underlinking.patch | 13 +++++++++++++
17 sci-mathematics/octave/octave-4.0.3.ebuild | 14 +++++++++-----
18 2 files changed, 22 insertions(+), 5 deletions(-)
19
20 diff --git a/sci-mathematics/octave/files/octave-4.0.3-zlib-underlinking.patch b/sci-mathematics/octave/files/octave-4.0.3-zlib-underlinking.patch
21 new file mode 100644
22 index 00000000..7bc1187
23 --- /dev/null
24 +++ b/sci-mathematics/octave/files/octave-4.0.3-zlib-underlinking.patch
25 @@ -0,0 +1,13 @@
26 +Fix underlinking caused by missing -lz link.
27 +See also: https://bugs.gentoo.org/show_bug.cgi?id=593670
28 +
29 +--- a/libinterp/corefcn/module.mk
30 ++++ b/libinterp/corefcn/module.mk
31 +@@ -361,6 +361,7 @@
32 + $(HDF5_CPPFLAGS) \
33 + $(LLVM_CPPFLAGS) \
34 + $(Z_CPPFLAGS)
35 ++corefcn_libcorefcn_la_LIBADD = $(Z_LIBS)
36 +
37 + corefcn_libcorefcn_la_CXXFLAGS = $(AM_CXXFLAGS) $(LLVM_CXXFLAGS)
38 +
39
40 diff --git a/sci-mathematics/octave/octave-4.0.3.ebuild b/sci-mathematics/octave/octave-4.0.3.ebuild
41 index 408fc9e..53b5c7e 100644
42 --- a/sci-mathematics/octave/octave-4.0.3.ebuild
43 +++ b/sci-mathematics/octave/octave-4.0.3.ebuild
44 @@ -54,7 +54,7 @@ RDEPEND="
45 sci-libs/cxsparse:0=
46 sci-libs/umfpack:0= )
47 X? ( x11-libs/libX11:0= )
48 - zlib? ( sys-libs/zlib:0= )"
49 + sys-libs/zlib"
50
51 DEPEND="${RDEPEND}
52 qrupdate? ( app-misc/pax-utils )
53 @@ -75,6 +75,7 @@ PATCHES=(
54 "${FILESDIR}"/${PN}-4.0.3-imagemagick.patch
55 "${FILESDIR}"/${PN}-3.8.1-pkgbuilddir.patch
56 "${FILESDIR}"/${PN}-4.0.3-ncurses-pkgconfig.patch
57 + "${FILESDIR}"/${PN}-4.0.3-zlib-underlinking.patch
58 )
59
60 src_prepare() {
61 @@ -98,6 +99,9 @@ src_prepare() {
62 }
63
64 src_configure() {
65 + # [QA] detect underlinking #593670
66 + append-ldflags $(test-flags-CXX -Wl,-z,defs)
67 +
68 # unfortunate dependency on mpi from hdf5 (bug #302621)
69 use hdf5 && has_version sci-libs/hdf5[mpi] && \
70 export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77
71 @@ -118,6 +122,7 @@ src_configure() {
72 --disable-64 \
73 --disable-jit \
74 --enable-shared \
75 + --with-z \
76 $(use_enable static-libs static) \
77 $(use_enable doc docs) \
78 $(use_enable java) \
79 @@ -138,8 +143,7 @@ src_configure() {
80 $(use_with sparse ccolamd) \
81 $(use_with sparse cholmod) \
82 $(use_with sparse cxsparse) \
83 - $(use_with X x) \
84 - $(use_with zlib z)
85 + $(use_with X x)
86 }
87
88 src_compile() {
89 @@ -160,7 +164,7 @@ src_install() {
90 fi
91 [[ -e test/fntests.log ]] && dodoc test/fntests.log
92 use java && \
93 - java-pkg_regjar "${ED}/usr/share/${PN}/${PV}/m/java/octave.jar"
94 - echo "LDPATH=${EROOT}usr/$(get_libdir)/${PN}/${PV}" > 99octave
95 + java-pkg_regjar "${ED%/}/usr/share/${PN}/${PV}/m/java/octave.jar"
96 + echo "LDPATH=${EROOT%/}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die
97 doenvd 99octave
98 }