ports/166031: [PATCH] news/inn: Perl 5.12 deprecated $[
Joe Horn
joehorn at gmail.com
Tue Mar 13 18:10:07 UTC 2012
>Number: 166031
>Category: ports
>Synopsis: [PATCH] news/inn: Perl 5.12 deprecated $[
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 13 18:10:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Joe Horn
>Release: FreeBSD 9.0-RELEASE amd64
>Organization:
Taiwanese User
>Environment:
System: FreeBSD joehorn.idv.tw 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Mon Jan 9 22:14:09 CST
>Description:
- Supress these warning messages while running innreport with perl version >= 5.12 :
Use of assignment to $[ is deprecated at /usr/local/news/bin/innreport line 562.
Use of assignment to $[ is deprecated at /usr/local/news/bin/innreport line 675.
- Bump PORTREVISION
Added file(s):
- files/extra-patch-scripts_innreport.in
- files/extra-patch-scripts_innreport_inn.pm
Port maintainer (fluffy at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_4 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:
--- inn-2.4.6_4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/news/inn/Makefile ./Makefile
--- /usr/ports/news/inn/Makefile 2012-02-26 03:33:24.000000000 +0800
+++ ./Makefile 2012-03-14 01:50:41.000000000 +0800
@@ -7,7 +7,7 @@
PORTNAME?= inn
PORTVERSION?= 2.4.6
-PORTREVISION?= 3
+PORTREVISION?= 4
CATEGORIES= news ipv6
# Master distribution broken
#MASTER_SITES?= ${MASTER_SITE_ISC}
@@ -186,6 +186,14 @@
SUB_LIST+= EGDIR="${EXAMPLESDIR:C,^${PREFIX},\\$\\${PREFIX},}"
PLIST_SUB+= ETCFILES="${CONFIG_FILES}"
+.include <bsd.port.pre.mk>
+
+# Perl 5.12 deprecated $[
+.if ${PERL_LEVEL} >= 501200
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-scripts_innreport.in \
+ ${PATCHDIR}/extra-patch-scripts_innreport_inn.pm
+.endif
+
post-patch:
@${REINPLACE_CMD} -E 's!\$$[{(]PATHETC[})]!${EXAMPLESDIR}!g' \
${WRKSRC}/site/Makefile
@@ -247,4 +255,4 @@
fi)
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL PORTMODE
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/news/inn/files/extra-patch-scripts_innreport.in ./files/extra-patch-scripts_innreport.in
--- /usr/ports/news/inn/files/extra-patch-scripts_innreport.in 1970-01-01 08:00:00.000000000 +0800
+++ ./files/extra-patch-scripts_innreport.in 2012-03-14 01:35:05.000000000 +0800
@@ -0,0 +1,19 @@
+--- scripts/innreport.in.orig 2012-03-14 01:02:54.000000000 +0800
++++ scripts/innreport.in 2012-03-14 01:21:13.000000000 +0800
+@@ -559,7 +559,7 @@
+ # Compare 2 dates (+hour)
+ sub DateCompare {
+ # ex: "May 12 06" for May 12, 6:00am
+- local $[ = 0;
++
+ # The 2 dates are near. The range is less than a few days that's why we
+ # can cheat to determine the order. It is only important if one date
+ # is in January and the other in December.
+@@ -672,7 +672,6 @@
+
+ # Compare 2 filenames
+ sub filenamecmp {
+- local $[ = 0;
+ my ($la, $lb) = ($a, $b);
+ my ($ya) = $la =~ m/news-notice\.(\d+)\./o;
+ $ya += 100 if $ya < 90; # Try to pacify the year 2000 !
diff -ruN --exclude=CVS /usr/ports/news/inn/files/extra-patch-scripts_innreport_inn.pm ./files/extra-patch-scripts_innreport_inn.pm
--- /usr/ports/news/inn/files/extra-patch-scripts_innreport_inn.pm 1970-01-01 08:00:00.000000000 +0800
+++ ./files/extra-patch-scripts_innreport_inn.pm 2012-03-14 01:35:38.000000000 +0800
@@ -0,0 +1,11 @@
+--- scripts/innreport_inn.pm.orig 2012-03-14 01:09:58.000000000 +0800
++++ scripts/innreport_inn.pm 2012-03-14 01:17:41.000000000 +0800
+@@ -2197,7 +2197,7 @@
+ # Compare 2 dates (+hour)
+ sub datecmp {
+ # ex: "May 12 06" for May 12, 6:00am
+- local($[) = 0;
++
+ # The 2 dates are near. The range is less than a few days that's why we
+ # can cheat to determine the order. It is only important if one date
+ # is in January and the other in December.
--- inn-2.4.6_4.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list