aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-02 15:59:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-02 15:59:14 +0000
commit96813504f80856d8d85b390207621e5cbba64a85 (patch)
treebe336c26f16f7fd1e5c5454738c9332da34fb2d1
parent7d8c4e4bd5d5210290c06168ff835072a0639d01 (diff)
downloadalpine_aports-96813504f80856d8d85b390207621e5cbba64a85.tar.bz2
alpine_aports-96813504f80856d8d85b390207621e5cbba64a85.tar.xz
alpine_aports-96813504f80856d8d85b390207621e5cbba64a85.zip
main/per-mail-spamassassin: build fixv1.10-branch
-rw-r--r--main/perl-mail-spamassassin/APKBUILD17
-rw-r--r--main/perl-mail-spamassassin/spamassassin-3.2.5-DESTDIR.patch273
2 files changed, 285 insertions, 5 deletions
diff --git a/main/perl-mail-spamassassin/APKBUILD b/main/perl-mail-spamassassin/APKBUILD
index 6a3c884616..a86c014fde 100644
--- a/main/perl-mail-spamassassin/APKBUILD
+++ b/main/perl-mail-spamassassin/APKBUILD
@@ -3,7 +3,7 @@
3pkgname=perl-mail-spamassassin 3pkgname=perl-mail-spamassassin
4_realname=Mail-SpamAssassin 4_realname=Mail-SpamAssassin
5pkgver=3.2.5 5pkgver=3.2.5
6pkgrel=0 6pkgrel=1
7pkgdesc="Spam detector and markup engine" 7pkgdesc="Spam detector and markup engine"
8url="http://search.cpan.org/~jmason/Mail-SpamAssassin-3.2.5/" 8url="http://search.cpan.org/~jmason/Mail-SpamAssassin-3.2.5/"
9license="unknown" 9license="unknown"
@@ -12,14 +12,21 @@ perl-mail-spf razor"
12makedepends="perl-dev zlib-dev" 12makedepends="perl-dev zlib-dev"
13install= 13install=
14subpackages="$pkgname-doc" 14subpackages="$pkgname-doc"
15source="http://search.cpan.org/CPAN/authors/id/J/JM/JMASON/$_realname-$pkgver.tar.gz" 15source="http://search.cpan.org/CPAN/authors/id/J/JM/JMASON/$_realname-$pkgver.tar.gz
16 spamassassin-3.2.5-DESTDIR.patch
17 "
16 18
17build() { 19build() {
18 cd "$srcdir/$_realname-$pkgver" 20 cd "$srcdir/$_realname-$pkgver"
19 21 patch -p1 -i ../spamassassin-3.2.5-DESTDIR.patch || return 1
20 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 22 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
21 make || return 1 23 make
24}
25
26package() {
27 cd "$srcdir/$_realname-$pkgver"
22 make DESTDIR="$pkgdir" install 28 make DESTDIR="$pkgdir" install
23} 29}
24 30
25md5sums="7fdc1651d0371c4a7f95ac9ae6f828a6 Mail-SpamAssassin-3.2.5.tar.gz" 31md5sums="7fdc1651d0371c4a7f95ac9ae6f828a6 Mail-SpamAssassin-3.2.5.tar.gz
3245885134199c9427add4d9bcb46311cf spamassassin-3.2.5-DESTDIR.patch"
diff --git a/main/perl-mail-spamassassin/spamassassin-3.2.5-DESTDIR.patch b/main/perl-mail-spamassassin/spamassassin-3.2.5-DESTDIR.patch
new file mode 100644
index 0000000000..a9765fc55d
--- /dev/null
+++ b/main/perl-mail-spamassassin/spamassassin-3.2.5-DESTDIR.patch
@@ -0,0 +1,273 @@
1--- Mail-SpamAssassin-3.2.5/Makefile.PL.old 2009-10-21 23:25:18.000000000 +0200
2+++ Mail-SpamAssassin-3.2.5/Makefile.PL 2009-10-21 23:31:28.000000000 +0200
3@@ -12,12 +12,12 @@
4
5 # avoid stupid 'Argument "6.30_01" isn't numeric in numeric ge (>=)' warnings;
6 # strip off the beta subversion noise that causes the trouble.
7 $mm_version =~ s/_\S+$//; # "6.30_01" => "6.30"
8
9-if ($mm_version+0 < 5.45) {
10- die "SpamAssassin Makefile.PL requires at least ExtUtils::MakeMaker v5.45";
11+if ($mm_version < 6.17) {
12+ die "SpamAssassin Makefile.PL requires at least ExtUtils::MakeMaker v6.17";
13 }
14
15 use constant RUNNING_ON_WINDOWS => ($^O =~ /^(mswin|dos|os2)/oi);
16 use constant HAS_DBI => eval { require DBI; };
17
18@@ -82,11 +82,10 @@
19 );
20
21
22 sub parse_arg {
23 my($val, $name) = (@_);
24-
25 if ($val =~ /^($name)=["']?(.*?)["']?$/) {
26 return $2;
27 } else {
28 return undef;
29 }
30@@ -107,53 +106,27 @@
31 return 'yes' if bool($val, $def);
32 return 'no';
33 }
34
35
36-
37 my %opt = (
38- 'build_spamc' => undef,
39+ 'build_spamc' => undef,
40 'enable_ssl' => undef,
41 'contact_address' => undef,
42 'destdir' => undef,
43 );
44 ARGV: foreach (@ARGV) {
45 foreach my $key (keys %opt) {
46- my $val;
47-
48- $val = parse_arg($_, uc($key));
49+ my $val = parse_arg($_, uc($key));
50 if (defined $val) {
51 $opt{$key} = $val;
52 next ARGV;
53 }
54 }
55 }
56
57
58-# Gather some information about what EU::MM offers and/or needs
59-my(
60- $mm_knows_destdir,
61- $mm_has_destdir,
62- $mm_has_good_destdir,
63- $mm_needs_destdir,
64-);
65-
66-# MakeMaker prior to 6.11 doesn't support DESTDIR which is needed for
67-# packaging with builddir!=destdir. See bug 2388.
68-$mm_knows_destdir = $ExtUtils::MakeMaker::Recognized_Att_Keys{DESTDIR};
69-$mm_has_good_destdir = $mm_version >= 6.11;
70-# Add DESTDIR hack only if it's requested (and necessary)
71-$mm_needs_destdir = $opt{'destdir'} && !$mm_has_good_destdir;
72-$mm_has_destdir = $mm_knows_destdir || $mm_needs_destdir;
73-push(@ATT_KEYS, 'DESTDIR') if $mm_needs_destdir;
74-
75-# Now make EU::MM understand our extended vars
76-foreach my $key (@ATT_KEYS) {
77- $ExtUtils::MakeMaker::Recognized_Att_Keys{$key} = 1;
78-}
79-
80-
81 # Gather the rules files in the range 00-69; we do this in perl because
82 # it's more portable. Also, plugin .pm files.
83 my @datafiles = map { s,^rules/,,; $_ }
84 grep { -f $_ } (<rules/*.cf>, <rules/*.pm>);
85 my $datafiles = join(' ', (grep
86@@ -270,75 +243,27 @@
87
88 # We have only this Makefile.PL and this option keeps MakeMaker from
89 # asking all questions twice after a 'make dist*'.
90 'NORECURS' => 1,
91
92- # bug 5074: perl 5.6.1 (with ExtUtils::MakeMaker 5.45) attempts to
93- # recurse anyway unless this is explicitly specified
94- 'DIR' => [ ],
95-
96 # Don't add META.yml to the MANIFEST for god's sake!
97 'NO_META' => 1,
98 );
99
100 # rules/72_active.cf is built from "rulesrc", but *must* exist before
101 # WriteMakefile() is called due to shortcomings in MakeMaker.
102 my @FILES_THAT_MUST_EXIST = qw(
103 rules/72_active.cf
104 );
105
106-# That META.yml stuff was introduced with Perl 6.06_03, see
107-# <http://archive.develooper.com/makemaker@perl.org/msg00922.html>
108-# <http://archive.develooper.com/makemaker@perl.org/msg00984.html>
109-delete $makefile{'NO_META'} if $mm_version < 6.06_03;
110-
111 # make sure certain optional modules are up-to-date if they are installed
112 # also see PREREQ_PM above
113 my %CURRENT_PM = (
114 'Net::DNS' => (RUNNING_ON_WINDOWS ? 0.46 : 0.34),
115 'Razor2::Client::Agent' => 2.40,
116 );
117
118-if ($mm_needs_destdir) {
119- my $error = <<DESTDIR_HACK;
120-
121- ***********************************************************************
122- ExtUtils::MakeMaker ${mm_version} doesn't include support for DESTDIR,
123- so if you want to be on the safe side, you might want to upgrade your
124- ExtUtils::MakeMaker to version 6.11 or later. It is available via CPAN.
125-
126- You can use either the CPAN shell or go to
127- <http://search.cpan.org/search?module=ExtUtils::MakeMaker>
128- to get an up-to-date version.
129-
130- This should only be necessary if you are creating binary packages.
131- ***********************************************************************
132-
133-DESTDIR_HACK
134- $error =~ s/^ {4}//gm;
135- warn $error;
136-}
137-elsif ($opt{'destdir'} and !$mm_has_good_destdir) {
138- my $error = <<DESTDIR_BUG;
139-
140- ***********************************************************************
141- ExtUtils::MakeMaker ${mm_version} contains bugs that may cause problems
142- in the \"make\" process. It is recommended that you upgrade
143- ExtUtils::MakeMaker to version 6.11 or later. It is available via CPAN.
144-
145- You can use either the CPAN shell or go to
146- <http://search.cpan.org/search?module=ExtUtils::MakeMaker>
147- to get an up-to-date version.
148-
149- This should only be necessary if you are creating binary packages.
150- ***********************************************************************
151-
152-DESTDIR_BUG
153- $error =~ s/^ {4}//gm;
154- warn $error;
155-}
156-
157
158 # All the $(*MAN1*) stuff is empty/zero if Perl was Configured with -Dman1dir=none;
159 # however, support site/vendor man1 dirs (bug 5338)
160 unless($Config{installman1dir}
161 || $Config{installsiteman1dir}
162@@ -405,22 +330,19 @@
163
164 # Now finish the meta hash and dump the Makefile
165 $makefile{EXE_FILES} = [ values %{$makefile{EXE_FILES}} ];
166 $makefile{AUTHOR} =~ s/(<.+) at (.+>)/$1\@$2/;
167 WriteMakefile(%makefile);
168-print "Makefile written by ExtUtils::MakeMaker ${mm_version}\n";
169+print "Makefile written by ExtUtils::MakeMaker $mm_version\n";
170
171 #######################################################################
172
173 package MY;
174
175-
176 use vars qw(
177 $MY_GLOBALS_ARE_SANE
178-
179 $RUNNING_ON_WINDOWS
180-
181 @REPOSITORIES
182
183 $MACRO_RE
184 $EQ_RE
185 $EQ
186@@ -906,19 +828,10 @@
187 init_MY_globals($self);
188
189 foreach (@code) {
190 # Add our install targets as a dependency to all top-level install targets
191 s/^(install(?:_[a-z]+)?\s*::?\s*.*)$/$1 conf__install data__install/;
192-
193- # Now do the DESTDIR hack, if necessary.
194- next if !$mm_needs_destdir;
195- # Write the correct path to perllocal.pod
196- next if /installed into/;
197-
198- # Replace all other $(INSTALL*) vars (except $(INSTALLDIRS) of course)
199- # with their $(DESTINSTALL*) counterparts
200- s/\Q$(\E(INSTALL(?!DIRS)${MACRO_RE})\Q)\E/\$(DEST$1)/g;
201 }
202
203 clean_MY_globals($self);
204 return join("\n", @code);
205 }
206@@ -956,32 +869,10 @@
207 set_macro($rprefix, macro_ref('PREFIX'));
208 $line .= "\n" . macro_def($rprefix);
209 }
210 }
211 }
212-
213- if (line_has_macro_def($line, 'MM_VERSION')) {
214- # These macros are just for debugging purposes.
215- $line = join("\n", $line,
216- macro_def(MM_HAS_DESTDIR => ::yesno($mm_has_destdir)),
217- macro_def(MM_HAS_GOOD_DESTDIR => ::yesno($mm_has_good_destdir)),
218- macro_def(MM_KNOWS_DESTDIR => ::yesno($mm_knows_destdir)),
219- macro_def(MM_NEEDS_DESTDIR => ::yesno($mm_needs_destdir)),
220- );
221- }
222-
223- # Add DESTDIR support if necessary
224- if ($mm_needs_destdir) {
225- if (line_has_macro_def($line, 'INSTALLDIRS')) {
226- $line .= "\n" . macro_def('DESTDIR');
227- }
228- elsif (line_has_macro_def($line, qr/INSTALL${MACRO_RE}/)) {
229- my $macro = get_macro_name_from_line($line);
230- $line .= "\n" . macro_def('DEST' . $macro,
231- macro_ref('DESTDIR') . macro_ref($macro));
232- }
233- }
234 }
235 push(@code, qq{});
236
237 # Add some additional target dirs
238 {
239@@ -1015,13 +906,11 @@
240 foreach my $r (@REPOSITORIES) {
241 my $macro = 'INSTALL' . repository($r) . $m;
242 # The INSTALL* macros.
243 push(@code, macro_def($macro));
244 # The DESTINSTALL* macros.
245- push(@code, macro_def('DEST' . $macro,
246- macro_ref('DESTDIR') . macro_ref($macro)))
247- if $mm_has_destdir;
248+ push(@code, macro_def('DEST' . $macro, macro_ref('DESTDIR') . macro_ref($macro)));
249 }
250 }
251 }
252
253 # Set the PERL_* stuff
254@@ -1068,17 +957,12 @@
255 # SCRIPT macro is the same for all repositories.
256 foreach my $macro (qw(SCRIPT DATA CONF LIB)) {
257 push(@code, macro_def('I_' . $macro . 'DIR',
258 macro_ref('INSTALL' . repository($repository, $macro eq 'SCRIPT') . $macro)));
259
260- if ($mm_has_destdir) {
261- push(@code, macro_def('B_' . $macro . 'DIR',
262- macro_ref('DESTINSTALL' . repository($repository, $macro eq 'SCRIPT') . $macro)));
263- } else {
264- push(@code, macro_def('B_' . $macro . 'DIR',
265- macro_ref('I_' . $macro . 'DIR')));
266- }
267+ push(@code, macro_def('B_' . $macro . 'DIR',
268+ macro_ref('DESTINSTALL' . repository($repository, $macro eq 'SCRIPT') . $macro)));
269 }
270 }
271
272 clean_MY_globals($self);
273 return join("\n", @code);