dev-perl/Term-ReadLine-Gnu: add ~ppc64 keyword
[gentoo.git] / dev-perl / Ace / Ace-1.920.0-r4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 DIST_NAME=AcePerl
7 DIST_AUTHOR=LDS
8 DIST_VERSION=1.92
9 DIST_EXAMPLES=("examples/*")
10 inherit perl-module toolchain-funcs
11
12 DESCRIPTION="Object-Oriented Access to ACEDB Databases"
13
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="test"
17 RESTRICT="!test? ( test ) mirror"
18 # License note: Indemnification and Attribution-if-Used bug #718936
19 RDEPEND="
20         virtual/perl-Digest-MD5
21         dev-perl/Cache-Cache
22         dev-perl/GD
23 "
24 DEPEND="
25         elibc_glibc? (  net-libs/libtirpc net-libs/rpcsvc-proto )
26         elibc_musl? (   net-libs/libtirpc net-libs/rpcsvc-proto )
27         elibc_uclibc? ( net-libs/libtirpc net-libs/rpcsvc-proto )
28 "
29 BDEPEND="
30         ${RDEPEND}
31         ${DEPEND}
32 "
33 mydoc="DISCLAIMER.txt"
34 src_prepare() {
35         eapply "${FILESDIR}/${PN}-1.92-rpcxs.patch"
36         eapply "${FILESDIR}/${PN}-1.92-gcc-nonvoid.patch"
37
38         cat > "${S}/acelib/wmake/DARWIN_DEF" <<EOF
39 NAME = DARWIN
40 COMPILER = $(tc-getCC) -fwritable-strings -DACEDB4 -DPOSIX
41 LINKER = $(tc-getLD)
42
43 LIBS = -lm
44
45 EOF
46
47         if use elibc_glibc || use elibc_musl || use elibc_uclibc ; then
48                 # Confusing name, should have been not specific to glibc
49                 eapply "${FILESDIR}/${PN}-1.92-glibc26.patch"
50                 export LIBS="-ltirpc"
51         fi
52
53         export MAKEOPTS="-j1"
54         perl-module_src_prepare
55 }
56
57 src_test() {
58         local MODULES=(
59                 "Ace ${DIST_VERSION}"
60                 "Ace::Freesubs 1.00"
61                 "Ace::Graphics::Fk" # NO VERSION
62                 "Ace::Graphics::Glyph"
63                 "Ace::Graphics::Glyph::anchored_arrow"
64                 "Ace::Graphics::Glyph::arrow"
65                 "Ace::Graphics::Glyph::box"
66                 "Ace::Graphics::Glyph::crossbox"
67                 "Ace::Graphics::Glyph::dot"
68                 "Ace::Graphics::Glyph::ex"
69                 "Ace::Graphics::Glyph::graded_segments"
70                 "Ace::Graphics::Glyph::group"
71                 "Ace::Graphics::Glyph::line"
72                 "Ace::Graphics::Glyph::primers"
73                 "Ace::Graphics::Glyph::segments"
74                 "Ace::Graphics::Glyph::span"
75                 "Ace::Graphics::Glyph::toomany"
76                 "Ace::Graphics::Glyph::transcript"
77                 "Ace::Graphics::Glyph::triangle"
78                 "Ace::Graphics::GlyphFactory"
79                 "Ace::Graphics::Panel"
80                 "Ace::Graphics::Track"
81                 "Ace::Iterator 1.51"
82                 "Ace::Local 1.05"
83                 "Ace::Model 1.51"
84                 "Ace::Object 1.66"
85                 "Ace::Object::Wormbase"
86                 "Ace::RPC 1.00"
87                 "Ace::Sequence 1.51"
88                 "Ace::Sequence::Feature"
89                 "Ace::Sequence::FeatureList"
90                 "Ace::Sequence::GappedAlignment 1.20"
91                 "Ace::Sequence::Gene"
92                 "Ace::Sequence::Homol"
93                 "Ace::Sequence::Multi"
94                 "Ace::Sequence::Transcript"
95                 "Ace::SocketServer 1.01"
96                 "GFF::Filehandle"
97 # Need Ace::Browser
98 #               "Ace::Browser::AceSubs ${DIST_VERSION}"
99 #               "Ace::Browser::GeneSubs ${DIST_VERSION}"
100 #               "Ace::Browser::SearchSubs ${DIST_VERSION}"
101 #               "Ace::Browser::SiteDefs ${DIST_VERSION}"
102 #               "Ace::Browser::TreeSubs ${DIST_VERSION}"
103         )
104         local failed=()
105         for dep in "${MODULES[@]}"; do
106                 ebegin "Compile testing ${dep}"
107                         perl -Mblib="${S}" -M"${dep} ()" -e1
108                 eend $? || failed+=( "$dep" )
109         done
110         if [[ ${failed[@]} ]]; then
111                 echo
112                 eerror "One or more modules failed compile:";
113                 for dep in "${failed[@]}"; do
114                         eerror "  ${dep}"
115                 done
116                 die "Failing due to module compilation errors";
117         fi
118         if ! has "network" "${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}"; then
119                 ewarn "This package needs network access to run its full test suite"
120                 ewarn "For details, see:"
121                 ewarn "https://wiki.gentoo.org/wiki/Project:Perl/maint-nodes/dev-perl/Ace"
122                 ewarn ""
123         else
124                 perl-module_src_test
125         fi
126 }
127
128 pkg_postinst() {
129         ewarn "This package requests that publications that made use of this software"
130         ewarn "in the process of their research attribute it."
131         ewarn ""
132         ewarn "This package's licensing terms also include indemnification clauses"
133         ewarn "which may apply to you, and are currently under decision in"
134         ewarn " Bug: https://bugs.gentoo.org/718936"
135         ewarn ""
136         ewarn "Please read ${EROOT}/usr/share/doc/${PF}/DISCLAIMER.*"
137 }