From 24e28b69eb9cf5f57ab884970da245ebf614d096 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 Jan 2013 19:16:58 +0000 Subject: Set up environment for src_test to run properly #450530 by Michael Palimaka. (Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key FB7C4156) --- media-libs/netpbm/ChangeLog | 5 ++++- media-libs/netpbm/netpbm-10.61.00.ebuild | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'media-libs/netpbm') diff --git a/media-libs/netpbm/ChangeLog b/media-libs/netpbm/ChangeLog index b544140def50..1bed17d1a41b 100644 --- a/media-libs/netpbm/ChangeLog +++ b/media-libs/netpbm/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for media-libs/netpbm # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.266 2013/01/06 02:00:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.267 2013/01/06 19:16:58 vapier Exp $ + + 06 Jan 2013; Mike Frysinger netpbm-10.61.00.ebuild: + Set up environment for src_test to run properly #450530 by Michael Palimaka. *netpbm-10.61.00 (06 Jan 2013) diff --git a/media-libs/netpbm/netpbm-10.61.00.ebuild b/media-libs/netpbm/netpbm-10.61.00.ebuild index 1ef0d6e9d903..3eac8e0b7f9e 100644 --- a/media-libs/netpbm/netpbm-10.61.00.ebuild +++ b/media-libs/netpbm/netpbm-10.61.00.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.61.00.ebuild,v 1.1 2013/01/06 02:00:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.61.00.ebuild,v 1.2 2013/01/06 19:16:58 vapier Exp $ EAPI="4" @@ -60,6 +60,21 @@ src_prepare() { sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die rm -rf urt + # disable certain tests based on active USE flags + local del=( + $(usex rle '' utahrle-roundtrip) + ) + if [[ ${#del[@]} -gt 0 ]] ; then + sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die + fi + del=( + pnmtofiasco # We always disable fiasco + $(usex rle '' 'pnmtorle rletopnm') + ) + if [[ ${#del[@]} -gt 0 ]] ; then + sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die + fi + # take care of the importinc stuff ourselves by only doing it once # at the top level and having all subdirs use that one set #149843 sed -i \ @@ -80,6 +95,10 @@ src_configure() { BUILD_FIASCO = N SYMLINK = ln -sf + # These vars let src_test work by default + PKGDIR_DEFAULT = ${T}/netpbm + RESULTDIR_DEFAULT = ${T}/netpbm-test + # Toolchain options CC = $(tc-getCC) -Wall LD = \$(CC) @@ -127,6 +146,12 @@ src_compile() { emake } +src_test() { + # The code wants to install everything first and then test the result. + emake install.bin + emake check +} + src_install() { # Subdir make targets like to use `mkdir` all over the place # without any actual dependencies, thus the -j1. -- cgit v1.2.3-65-gdbad