aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-mail-clamav
diff options
context:
space:
mode:
authorMike Sullivan <mksully22@gmail.com>2018-05-08 20:08:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-05-09 06:19:11 +0000
commitd7a05202a4d9faf0d8c4a890069df26eb27f11aa (patch)
tree0a0b432af954ca3993562532173c380639817784 /main/perl-mail-clamav
parent5e642b2b7757cb5001d30fa6ada60d375f0cf4eb (diff)
downloadaports-d7a05202a4d9faf0d8c4a890069df26eb27f11aa.tar.bz2
aports-d7a05202a4d9faf0d8c4a890069df26eb27f11aa.tar.xz
main/perl-mail-clamav: fix version comparison that causes build break in Makefile.PL
Diffstat (limited to 'main/perl-mail-clamav')
-rw-r--r--main/perl-mail-clamav/0001.patch27
-rw-r--r--main/perl-mail-clamav/APKBUILD13
2 files changed, 37 insertions, 3 deletions
diff --git a/main/perl-mail-clamav/0001.patch b/main/perl-mail-clamav/0001.patch
new file mode 100644
index 0000000000..17910bd6d8
--- /dev/null
+++ b/main/perl-mail-clamav/0001.patch
@@ -0,0 +1,27 @@
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -51,7 +51,23 @@
+ }
+
+ my $clver = get_cl_version();
+- return warn_cl_version_bad() if $clver lt $minclversion;
++ my @m_clver = split /\./, $clver;
++ my @m_minclversion = split /\./, $minclversion;
++ if ($m_clver[0] < $m_minclversion[0]) {
++ return warn_cl_version_bad() if $m_clver[0] lt $m_minclversion[0];
++ } else {
++ if ($m_clver[0] = $m_minclversion[0]) {
++ if ($m_clver[1] < $m_minclversion[1]) {
++ return warn_cl_version_bad() if $m_clver[1] lt $m_minclversion[1];
++ } else {
++ if ($m_clver[1] = $m_minclversion[1]) {
++ if ($m_clver[2] < $m_minclversion[2]) {
++ return warn_cl_version_bad() if $m_clver[2] lt $m_minclversion[2];
++ }
++ }
++ }
++ }
++ }
+
+ my $inc = get_cl_inc_paths();
+ my $libs = get_cl_libs();
diff --git a/main/perl-mail-clamav/APKBUILD b/main/perl-mail-clamav/APKBUILD
index f2a4539ad7..cc30ec1870 100644
--- a/main/perl-mail-clamav/APKBUILD
+++ b/main/perl-mail-clamav/APKBUILD
@@ -3,7 +3,7 @@
pkgname=perl-mail-clamav
_realname=Mail-ClamAV
pkgver=0.29
-pkgrel=13
+pkgrel=14
pkgdesc="Perl extension for the clamav virus scanner"
url="http://search.cpan.org/~converter/Mail-ClamAV-0.29/"
arch="all"
@@ -14,13 +14,19 @@ makedepends="bzip2-dev clamav-dev zlib-dev
"
install=
subpackages="$pkgname-doc"
-source="http://search.cpan.org/CPAN/authors/id/C/CO/CONVERTER/$_realname-$pkgver.tar.gz"
+source="http://search.cpan.org/CPAN/authors/id/C/CO/CONVERTER/$_realname-$pkgver.tar.gz
+ 0001.patch"
_builddir="$srcdir/$_realname-$pkgver"
prepare() {
cd "$_builddir"
sed -i -e 's%\(clamav-config --version\)%sh /usr/bin/\1%' Makefile.PL || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
}
@@ -37,4 +43,5 @@ package() {
}
-sha512sums="e58d846600a3764d4b55eae545754bf187bf77cb0125dbbfc71944c095ddfa4fe11e59888840045c1c72708a729aaa57f89ba91ce3e6c7934013b5a2790a7006 Mail-ClamAV-0.29.tar.gz"
+sha512sums="e58d846600a3764d4b55eae545754bf187bf77cb0125dbbfc71944c095ddfa4fe11e59888840045c1c72708a729aaa57f89ba91ce3e6c7934013b5a2790a7006 Mail-ClamAV-0.29.tar.gz
+4d78b6ba5fc9235a8d72161b7271025e5d1c6395730d75067d3c4d1821c99fa400171cdbf98b3a74675f17ecc64e477c42333126536efb5f37990aa57008ba1f 0001.patch"