1 |
commit: 589994af5895f33871c58b02ceceaef139907e53 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 28 21:29:59 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 28 21:43:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=589994af |
7 |
|
8 |
sys-devel/sparse: install into /usr, not $HOME, bug #676626 |
9 |
|
10 |
Daniel noticed sparse-9999 installs into /tmp due to |
11 |
upstream switch to 'PREFIX ?= $(HOME)'. |
12 |
|
13 |
Cleaned up live ebuild to stop mangling MAKEOPTS. |
14 |
|
15 |
Reported-by: Daniel M. Weeks |
16 |
Closes: https://bugs.gentoo.org/676626 |
17 |
Package-Manager: Portage-2.3.58, Repoman-2.3.12 |
18 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
19 |
|
20 |
sys-devel/sparse/sparse-9999.ebuild | 44 +++++++++++++++++++++++++++---------- |
21 |
1 file changed, 33 insertions(+), 11 deletions(-) |
22 |
|
23 |
diff --git a/sys-devel/sparse/sparse-9999.ebuild b/sys-devel/sparse/sparse-9999.ebuild |
24 |
index 8850a866452..41c95d2e55f 100644 |
25 |
--- a/sys-devel/sparse/sparse-9999.ebuild |
26 |
+++ b/sys-devel/sparse/sparse-9999.ebuild |
27 |
@@ -1,7 +1,7 @@ |
28 |
# Copyright 1999-2019 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
-EAPI=6 |
32 |
+EAPI=7 |
33 |
|
34 |
inherit eutils multilib toolchain-funcs |
35 |
|
36 |
@@ -28,14 +28,36 @@ DEPEND="${RDEPEND} |
37 |
gtk? ( virtual/pkgconfig ) |
38 |
xml? ( virtual/pkgconfig )" |
39 |
|
40 |
-src_prepare() { |
41 |
- tc-export AR CC PKG_CONFIG |
42 |
- sed -i \ |
43 |
- -e '/^PREFIX=/s:=.*:=/usr:' \ |
44 |
- -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \ |
45 |
- -e '/^COMMON_CFLAGS =/{s:=:= $(CPPFLAGS):;s:-O2 -finline-functions -fno-strict-aliasing -g:-fno-strict-aliasing:}' \ |
46 |
- -e "s:pkg-config:${PKG_CONFIG}:" \ |
47 |
- Makefile || die |
48 |
- export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LLVM=$(usex llvm) HAVE_LIBXML=$(usex xml)" |
49 |
- default |
50 |
+_emake() { |
51 |
+ # Makefile does not allow for an easy override of flags. |
52 |
+ # Collect them here and override default phases. |
53 |
+ emake \ |
54 |
+ CC="$(tc-getCC)" \ |
55 |
+ LD="$(tc-getCC)" \ |
56 |
+ AR="$(tc-getAR)" \ |
57 |
+ CFLAGS="${CFLAGS}" \ |
58 |
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
59 |
+ \ |
60 |
+ HAVE_GTK=$(usex gtk) \ |
61 |
+ HAVE_LLVM=$(usex llvm) \ |
62 |
+ HAVE_LIBXML=$(usex xml) \ |
63 |
+ \ |
64 |
+ V=1 \ |
65 |
+ PREFIX="${EPREFIX}/usr" \ |
66 |
+ \ |
67 |
+ "$@" |
68 |
+} |
69 |
+ |
70 |
+src_compile() { |
71 |
+ _emake |
72 |
+} |
73 |
+ |
74 |
+src_test() { |
75 |
+ _emake check |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ _emake DESTDIR="${D}" install |
80 |
+ |
81 |
+ dodoc FAQ README |
82 |
} |