net-misc/vncsnapshot: EAPI 7, respect tc variables

* EAPI 4->7
* Respect AR, RANLIB
* Don't clobber make (call $(MAKE) so jobserver persists)

Closes: https://bugs.gentoo.org/742149
Closes: https://bugs.gentoo.org/725208
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2020-09-14 22:26:58 +00:00
parent 66ef97d6ff
commit bc7f74e1df
+26 -8
View File
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=4
EAPI=7
inherit eutils toolchain-funcs
inherit toolchain-funcs
DESCRIPTION="A command-line tool for taking JPEG snapshots of VNC servers"
HOMEPAGE="http://vncsnapshot.sourceforge.net/"
@@ -12,32 +12,50 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ppc x86"
IUSE=""
DEPEND="
virtual/jpeg
>=sys-libs/zlib-1.1.4"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${P}-amd64grey.patch"
)
src_prepare() {
epatch "${FILESDIR}/${P}-amd64grey.patch"
default
sed \
-e 's:-I/usr/local/include::g' \
-e 's:-L/usr/local/lib::g' \
-e '/^all:/s|$(SUBDIRS:.dir=.all)||g' \
-e '/^vnc/s|$| $(SUBDIRS:.dir=.all)|g' \
-i Makefile || die
# Preserve make instance
sed -i -e 's/make/$(MAKE)/' Makefile || die
# Respect RANLIB
sed -i -e 's/ranlib/$(RANLIB)/' rdr/Makefile || die
}
src_compile() {
#note: We override CDEBUGFLAGS instead of CFLAGS because otherwise
# we lost the INCLUDES in the makefile.
# Note: We override CDEBUGFLAGS instead of CFLAGS because otherwise
# we lose the INCLUDES in the makefile.
# bug #295741
emake CDEBUGFLAGS="${CXXFLAGS}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
local args=(
AR="$(tc-getAR)"
CDEBUGFLAGS="${CXXFLAGS}"
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
RANLIB="$(tc-getRANLIB)"
)
emake "${args[@]}"
}
src_install() {
dobin vncsnapshot
cp vncsnapshot.man1 vncsnapshot.1
cp vncsnapshot.man1 vncsnapshot.1 || die
doman vncsnapshot.1
}