diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-01-28 21:29:59 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-01-28 21:43:53 +0000 |
commit | 589994af5895f33871c58b02ceceaef139907e53 (patch) | |
tree | 432edaa4d6b12ad0c6dcd69fdc37ef4e4fba0870 /sys-devel/sparse | |
parent | app-admin/ansible-lint: add py37 support (diff) | |
download | gentoo-589994af5895f33871c58b02ceceaef139907e53.tar.gz gentoo-589994af5895f33871c58b02ceceaef139907e53.tar.bz2 gentoo-589994af5895f33871c58b02ceceaef139907e53.zip |
sys-devel/sparse: install into /usr, not $HOME, bug #676626
Daniel noticed sparse-9999 installs into /tmp due to
upstream switch to 'PREFIX ?= $(HOME)'.
Cleaned up live ebuild to stop mangling MAKEOPTS.
Reported-by: Daniel M. Weeks
Closes: https://bugs.gentoo.org/676626
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-devel/sparse')
-rw-r--r-- | sys-devel/sparse/sparse-9999.ebuild | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/sys-devel/sparse/sparse-9999.ebuild b/sys-devel/sparse/sparse-9999.ebuild index 8850a866452c..41c95d2e55fe 100644 --- a/sys-devel/sparse/sparse-9999.ebuild +++ b/sys-devel/sparse/sparse-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 inherit eutils multilib toolchain-funcs @@ -28,14 +28,36 @@ DEPEND="${RDEPEND} gtk? ( virtual/pkgconfig ) xml? ( virtual/pkgconfig )" -src_prepare() { - tc-export AR CC PKG_CONFIG - sed -i \ - -e '/^PREFIX=/s:=.*:=/usr:' \ - -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \ - -e '/^COMMON_CFLAGS =/{s:=:= $(CPPFLAGS):;s:-O2 -finline-functions -fno-strict-aliasing -g:-fno-strict-aliasing:}' \ - -e "s:pkg-config:${PKG_CONFIG}:" \ - Makefile || die - export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LLVM=$(usex llvm) HAVE_LIBXML=$(usex xml)" - default +_emake() { + # Makefile does not allow for an easy override of flags. + # Collect them here and override default phases. + emake \ + CC="$(tc-getCC)" \ + LD="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + CFLAGS="${CFLAGS}" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + \ + HAVE_GTK=$(usex gtk) \ + HAVE_LLVM=$(usex llvm) \ + HAVE_LIBXML=$(usex xml) \ + \ + V=1 \ + PREFIX="${EPREFIX}/usr" \ + \ + "$@" +} + +src_compile() { + _emake +} + +src_test() { + _emake check +} + +src_install() { + _emake DESTDIR="${D}" install + + dodoc FAQ README } |