summaryrefslogtreecommitdiff
blob: ceb1838ad0af1d0b2d74cdf0bde71f26e34628e4 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DIST_NAME=AcePerl
DIST_AUTHOR=LDS
DIST_VERSION=1.92
DIST_EXAMPLES=("examples/*")
inherit perl-module toolchain-funcs

DESCRIPTION="Object-Oriented Access to ACEDB Databases"

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test ) mirror"
# License note: Indemnification and Attribution-if-Used bug #718936
RDEPEND="
	virtual/perl-Digest-MD5
	dev-perl/Cache-Cache
	dev-perl/GD
"
DEPEND="
	elibc_glibc? (  net-libs/libtirpc net-libs/rpcsvc-proto )
	elibc_musl? (   net-libs/libtirpc net-libs/rpcsvc-proto )
	elibc_uclibc? ( net-libs/libtirpc net-libs/rpcsvc-proto )
"
BDEPEND="
	${RDEPEND}
	${DEPEND}
"
mydoc="DISCLAIMER.txt"
src_prepare() {
	eapply "${FILESDIR}/${PN}-1.92-rpcxs.patch"
	eapply "${FILESDIR}/${PN}-1.92-gcc-nonvoid.patch"

	cat > "${S}/acelib/wmake/DARWIN_DEF" <<EOF
NAME = DARWIN
COMPILER = $(tc-getCC) -fwritable-strings -DACEDB4 -DPOSIX
LINKER = $(tc-getLD)

LIBS = -lm

EOF

	if use elibc_glibc || use elibc_musl || use elibc_uclibc ; then
		# Confusing name, should have been not specific to glibc
		eapply "${FILESDIR}/${PN}-1.92-glibc26.patch"
		export LIBS="-ltirpc"
	fi

	export MAKEOPTS="-j1"
	perl-module_src_prepare
}

src_test() {
	local MODULES=(
		"Ace ${DIST_VERSION}"
		"Ace::Freesubs 1.00"
		"Ace::Graphics::Fk" # NO VERSION
		"Ace::Graphics::Glyph"
		"Ace::Graphics::Glyph::anchored_arrow"
		"Ace::Graphics::Glyph::arrow"
		"Ace::Graphics::Glyph::box"
		"Ace::Graphics::Glyph::crossbox"
		"Ace::Graphics::Glyph::dot"
		"Ace::Graphics::Glyph::ex"
		"Ace::Graphics::Glyph::graded_segments"
		"Ace::Graphics::Glyph::group"
		"Ace::Graphics::Glyph::line"
		"Ace::Graphics::Glyph::primers"
		"Ace::Graphics::Glyph::segments"
		"Ace::Graphics::Glyph::span"
		"Ace::Graphics::Glyph::toomany"
		"Ace::Graphics::Glyph::transcript"
		"Ace::Graphics::Glyph::triangle"
		"Ace::Graphics::GlyphFactory"
		"Ace::Graphics::Panel"
		"Ace::Graphics::Track"
		"Ace::Iterator 1.51"
		"Ace::Local 1.05"
		"Ace::Model 1.51"
		"Ace::Object 1.66"
		"Ace::Object::Wormbase"
		"Ace::RPC 1.00"
		"Ace::Sequence 1.51"
		"Ace::Sequence::Feature"
		"Ace::Sequence::FeatureList"
		"Ace::Sequence::GappedAlignment 1.20"
		"Ace::Sequence::Gene"
		"Ace::Sequence::Homol"
		"Ace::Sequence::Multi"
		"Ace::Sequence::Transcript"
		"Ace::SocketServer 1.01"
		"GFF::Filehandle"
# Need Ace::Browser
# 		"Ace::Browser::AceSubs ${DIST_VERSION}"
#		"Ace::Browser::GeneSubs ${DIST_VERSION}"
#		"Ace::Browser::SearchSubs ${DIST_VERSION}"
#		"Ace::Browser::SiteDefs ${DIST_VERSION}"
#		"Ace::Browser::TreeSubs ${DIST_VERSION}"
	)
	local failed=()
	for dep in "${MODULES[@]}"; do
		ebegin "Compile testing ${dep}"
			perl -Mblib="${S}" -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
	if ! has "network" "${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}"; then
		ewarn "This package needs network access to run its full test suite"
		ewarn "For details, see:"
		ewarn "https://wiki.gentoo.org/wiki/Project:Perl/maint-nodes/dev-perl/Ace"
		ewarn ""
	else
		perl-module_src_test
	fi
}

pkg_postinst() {
	ewarn "This package requests that publications that made use of this software"
	ewarn "in the process of their research attribute it."
	ewarn ""
	ewarn "This package's licensing terms also include indemnification clauses"
	ewarn "which may apply to you, and are currently under decision in"
	ewarn " Bug: https://bugs.gentoo.org/718936"
	ewarn ""
	ewarn "Please read ${EROOT}/usr/share/doc/${PF}/DISCLAIMER.*"
}