summaryrefslogtreecommitdiff
blob: 6d744ae5ef3a841c75bbe0ab041711ee3b5e2a72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DIST_AUTHOR=MLEHMANN
DIST_VERSION=2.01
DIST_EXAMPLES=("eg/*")
inherit perl-module

DESCRIPTION="Deliantra suppport module to read/write archetypes, maps etc"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="
	>=dev-perl/AnyEvent-4.0.0
	>=dev-perl/Compress-LZF-3.110.0
	>=virtual/perl-Digest-SHA-5.0.0
	>=dev-perl/JSON-XS-2.10.0
	dev-perl/common-sense
"
DEPEND="${RDEPEND}
	virtual/perl-ExtUtils-MakeMaker
"
src_test() {
	local MODULES=(
		"Deliantra ${DIST_VERSION}"
		"Deliantra::Protocol::Base 1.31"
		"Deliantra::Protocol::Constants 0.1"
		"Deliantra::Data"
		"Deliantra::Map 0.1"
		"Deliantra::MoveType"
		"Deliantra::Util"
	)
	perl_has_module "Gtk2" && MODULES+=( "Deliantra::MapWidget" )
	local failed=()
	for dep in "${MODULES[@]}"; do
		ebegin "Compile testing ${dep}"
			perl -Mblib="${S}/blib" -M"${dep} ()" -e1
		eend $? || failed+=( "$dep" )
	done
	if [[ ${failed[@]} ]]; then
		echo
		eerror "One or more modules failed compile:";
		for dep in "${failed[@]}"; do
			eerror "  ${dep}"
		done
		die "Failing due to module compilation errors";
	fi
	perl-module_src_test
}