From 6b605d422bb99dd96fc65f0b29eceebe8329f899 Mon Sep 17 00:00:00 2001
From: Joe Marcus Clarke <marcus@FreeBSD.org>
Date: Thu, 14 Oct 2004 00:37:47 +0000
Subject: Fix build with Perl < 5.6.1.

---
 mail/thunderbird-devel/Makefile                              |  4 ++++
 mail/thunderbird-devel/files/extra-patch-config_make-jars.pl | 10 ++++++++++
 mail/thunderbird-esr/Makefile                                |  4 ++++
 mail/thunderbird-esr/files/extra-patch-config_make-jars.pl   | 10 ++++++++++
 mail/thunderbird/Makefile                                    |  4 ++++
 mail/thunderbird/files/extra-patch-config_make-jars.pl       | 10 ++++++++++
 mail/thunderbird3/Makefile                                   |  4 ++++
 mail/thunderbird3/files/extra-patch-config_make-jars.pl      | 10 ++++++++++
 8 files changed, 56 insertions(+)
 create mode 100644 mail/thunderbird-devel/files/extra-patch-config_make-jars.pl
 create mode 100644 mail/thunderbird-esr/files/extra-patch-config_make-jars.pl
 create mode 100644 mail/thunderbird/files/extra-patch-config_make-jars.pl
 create mode 100644 mail/thunderbird3/files/extra-patch-config_make-jars.pl

diff --git a/mail/thunderbird-devel/Makefile b/mail/thunderbird-devel/Makefile
index c9208c79a91d..d8771737fe86 100644
--- a/mail/thunderbird-devel/Makefile
+++ b/mail/thunderbird-devel/Makefile
@@ -57,6 +57,10 @@ OPTIONS=	DEBUG "Build a debugging image" off \
 IGNORE=	"core dumps at runtime"
 .endif # ${ARCH} == "alpha" && ${OSVERSION} < 500035
 
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config_make-jars.pl
+.endif # ${PERL_LEVEL} < 500600
+
 .if defined(WITH_DEBUG)
 WITH_LOGGING=		yes
 CONFIGURE_ENV+=		WITH_DEBUG=yes
diff --git a/mail/thunderbird-devel/files/extra-patch-config_make-jars.pl b/mail/thunderbird-devel/files/extra-patch-config_make-jars.pl
new file mode 100644
index 000000000000..a558607ca459
--- /dev/null
+++ b/mail/thunderbird-devel/files/extra-patch-config_make-jars.pl
@@ -0,0 +1,10 @@
+--- config/make-jars.pl.orig	Wed Oct 13 16:17:11 2004
++++ config/make-jars.pl	Wed Oct 13 16:17:07 2004
+@@ -40,6 +40,7 @@
+   last if ($arg eq "--");
+ }
+ my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]);
++splice @ARGV, $ddindex, $#ARGV;
+ 
+ getopts("d:s:t:f:avlD:o:p:xz:");
+ 
diff --git a/mail/thunderbird-esr/Makefile b/mail/thunderbird-esr/Makefile
index c9208c79a91d..d8771737fe86 100644
--- a/mail/thunderbird-esr/Makefile
+++ b/mail/thunderbird-esr/Makefile
@@ -57,6 +57,10 @@ OPTIONS=	DEBUG "Build a debugging image" off \
 IGNORE=	"core dumps at runtime"
 .endif # ${ARCH} == "alpha" && ${OSVERSION} < 500035
 
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config_make-jars.pl
+.endif # ${PERL_LEVEL} < 500600
+
 .if defined(WITH_DEBUG)
 WITH_LOGGING=		yes
 CONFIGURE_ENV+=		WITH_DEBUG=yes
diff --git a/mail/thunderbird-esr/files/extra-patch-config_make-jars.pl b/mail/thunderbird-esr/files/extra-patch-config_make-jars.pl
new file mode 100644
index 000000000000..a558607ca459
--- /dev/null
+++ b/mail/thunderbird-esr/files/extra-patch-config_make-jars.pl
@@ -0,0 +1,10 @@
+--- config/make-jars.pl.orig	Wed Oct 13 16:17:11 2004
++++ config/make-jars.pl	Wed Oct 13 16:17:07 2004
+@@ -40,6 +40,7 @@
+   last if ($arg eq "--");
+ }
+ my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]);
++splice @ARGV, $ddindex, $#ARGV;
+ 
+ getopts("d:s:t:f:avlD:o:p:xz:");
+ 
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index c9208c79a91d..d8771737fe86 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -57,6 +57,10 @@ OPTIONS=	DEBUG "Build a debugging image" off \
 IGNORE=	"core dumps at runtime"
 .endif # ${ARCH} == "alpha" && ${OSVERSION} < 500035
 
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config_make-jars.pl
+.endif # ${PERL_LEVEL} < 500600
+
 .if defined(WITH_DEBUG)
 WITH_LOGGING=		yes
 CONFIGURE_ENV+=		WITH_DEBUG=yes
diff --git a/mail/thunderbird/files/extra-patch-config_make-jars.pl b/mail/thunderbird/files/extra-patch-config_make-jars.pl
new file mode 100644
index 000000000000..a558607ca459
--- /dev/null
+++ b/mail/thunderbird/files/extra-patch-config_make-jars.pl
@@ -0,0 +1,10 @@
+--- config/make-jars.pl.orig	Wed Oct 13 16:17:11 2004
++++ config/make-jars.pl	Wed Oct 13 16:17:07 2004
+@@ -40,6 +40,7 @@
+   last if ($arg eq "--");
+ }
+ my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]);
++splice @ARGV, $ddindex, $#ARGV;
+ 
+ getopts("d:s:t:f:avlD:o:p:xz:");
+ 
diff --git a/mail/thunderbird3/Makefile b/mail/thunderbird3/Makefile
index c9208c79a91d..d8771737fe86 100644
--- a/mail/thunderbird3/Makefile
+++ b/mail/thunderbird3/Makefile
@@ -57,6 +57,10 @@ OPTIONS=	DEBUG "Build a debugging image" off \
 IGNORE=	"core dumps at runtime"
 .endif # ${ARCH} == "alpha" && ${OSVERSION} < 500035
 
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-config_make-jars.pl
+.endif # ${PERL_LEVEL} < 500600
+
 .if defined(WITH_DEBUG)
 WITH_LOGGING=		yes
 CONFIGURE_ENV+=		WITH_DEBUG=yes
diff --git a/mail/thunderbird3/files/extra-patch-config_make-jars.pl b/mail/thunderbird3/files/extra-patch-config_make-jars.pl
new file mode 100644
index 000000000000..a558607ca459
--- /dev/null
+++ b/mail/thunderbird3/files/extra-patch-config_make-jars.pl
@@ -0,0 +1,10 @@
+--- config/make-jars.pl.orig	Wed Oct 13 16:17:11 2004
++++ config/make-jars.pl	Wed Oct 13 16:17:07 2004
+@@ -40,6 +40,7 @@
+   last if ($arg eq "--");
+ }
+ my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]);
++splice @ARGV, $ddindex, $#ARGV;
+ 
+ getopts("d:s:t:f:avlD:o:p:xz:");
+ 
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0