dev-perl/Business-ISBN: Bump to version 3.5.0
[gentoo.git] / dev-perl / DBD-SQLite / DBD-SQLite-1.580.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 DIST_AUTHOR=ISHIGAKI
7 DIST_VERSION=1.58
8 inherit perl-module
9
10 DESCRIPTION="Self Contained RDBMS in a DBI Driver"
11
12 SLOT="0"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
14 IUSE="test system-sqlite"
15 RESTRICT="!test? ( test )"
16
17 # Please read https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/dev-perl/DBD-SQLite
18 # when bumping versions re: system-sqlite interop
19 RDEPEND="
20         system-sqlite? (
21                 >=dev-db/sqlite-3.21.0[extensions(+)]
22         )
23         >=dev-perl/DBI-1.570.0
24         !<dev-perl/DBD-SQLite-1
25         virtual/perl-Scalar-List-Utils
26 "
27 DEPEND="${RDEPEND}
28         >=virtual/perl-ExtUtils-MakeMaker-6.480.0
29         test? (
30                 >=virtual/perl-File-Spec-0.820.0
31                 >=virtual/perl-Test-Simple-0.420.0
32         )
33 "
34
35 src_prepare() {
36         perl-module_src_prepare
37         if use system-sqlite; then
38                 einfo "Removing bundled SQLite"
39                 # Flip Makefile into system mode.
40                 sed -i 's/^if ( 0 )/if ( 1 )/' "${S}"/Makefile.PL || die
41                 # remove bundled sqlite (rt.cpan#61361)
42                 for i in sqlite3{.c,.h,ext.h} ; do
43                         rm ${i} || die
44                         sed -i -e "/^${i}\$/d" MANIFEST || die
45                 done
46                 myconf="SQLITE_LOCATION=${EPREFIX}/usr"
47         fi
48 }