From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Dec 24 13:40:02 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16E5E16A41F for ; Sat, 24 Dec 2005 13:40:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C6EB43D58 for ; Sat, 24 Dec 2005 13:40:01 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id jBODe14m049696 for ; Sat, 24 Dec 2005 13:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id jBODe1X0049695; Sat, 24 Dec 2005 13:40:01 GMT (envelope-from gnats) Resent-Date: Sat, 24 Dec 2005 13:40:01 GMT Resent-Message-Id: <200512241340.jBODe1X0049695@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yen-Ming Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1AA116A41F; Sat, 24 Dec 2005 13:31:16 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from msr55.hinet.net (msr55.hinet.net [168.95.4.155]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59D0A43D53; Sat, 24 Dec 2005 13:31:15 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from utopia.leeym.com (arcadia.leeym.com [211.21.137.53]) by msr55.hinet.net (8.9.3/8.9.3) with ESMTP id VAA23370; Sat, 24 Dec 2005 21:31:13 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by utopia.leeym.com (Postfix) with ESMTP id 52E8AB29CC8; Sat, 24 Dec 2005 21:31:13 +0800 (CST) Received: from utopia.leeym.com ([127.0.0.1]) by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20697-10; Sat, 24 Dec 2005 21:31:09 +0800 (CST) Received: by utopia.leeym.com (Postfix, from userid 1000) id 63E3EB29CA8; Sat, 24 Dec 2005 21:31:09 +0800 (CST) Message-Id: <20051224133109.63E3EB29CA8@utopia.leeym.com> Date: Sat, 24 Dec 2005 21:31:09 +0800 (CST) From: Yen-Ming Lee To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: skv@FreeBSD.org Subject: ports/90878: [PATCH] security/p5-Digest-SHA2: unbreak on old perl X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2005 13:40:02 -0000 >Number: 90878 >Category: ports >Synopsis: [PATCH] security/p5-Digest-SHA2: unbreak on old perl >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: Sat Dec 24 13:40:00 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 6.0-STABLE i386 >Organization: FreeBSD Taiwan >Environment: System: FreeBSD utopia.leeym.com 6.0-STABLE FreeBSD 6.0-STABLE #0: Thu Nov 17 09:15:19 CST 2005 >Description: - unbreak on old perl (please ignore previous PR, the patch should go to extra patch) Added file(s): - files/extrapatch-SHA2.xs Port maintainer (skv@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- p5-Digest-SHA2-1.1.0.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/p5-Digest-SHA2/Makefile,v retrieving revision 1.3 diff -u -u -r1.3 Makefile --- Makefile 11 Jun 2005 16:13:00 -0000 1.3 +++ Makefile 24 Dec 2005 13:30:02 -0000 @@ -26,7 +26,12 @@ .include .if ${PERL_LEVEL} < 500600 -IGNORE= Perl 5.6 or newer required. Install lang/perl5 or lang/perl5.8 and try again. +EXTRA_PATCHES= ${PATCHDIR}/extrapatch-SHA2.xs + +post-patch: + ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/SHA2.pm + ${PERL} -pi -e '$$_="" if m{warnings}' ${WRKSRC}/SHA2.pm ${WRKSRC}/t/*.t + ${PERL} -pi -e 's/\)/, char **env\)/ if m{int main}' ${WRKSRC}/_sha2.c .endif .include Index: files/extrapatch-SHA2.xs =================================================================== RCS file: files/extrapatch-SHA2.xs diff -N files/extrapatch-SHA2.xs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/extrapatch-SHA2.xs 24 Dec 2005 13:30:02 -0000 @@ -0,0 +1,18 @@ +--- SHA2.xs.orig Sat Dec 24 21:15:29 2005 ++++ SHA2.xs Sat Dec 24 21:16:10 2005 +@@ -4,6 +4,15 @@ + #include "ppport.h" + #include "_sha2.c" + ++/* try to be compatible with older perls */ ++/* SvPV_nolen() macro first defined in 5.005_55 */ ++/* this is slow, not threadsafe, but works */ ++#include "patchlevel.h" ++#if (PATCHLEVEL == 4) || ((PATCHLEVEL == 5) && (SUBVERSION < 55)) ++static STRLEN nolen_na; ++# define SvPV_nolen(sv) SvPV ((sv), nolen_na) ++#endif ++ + typedef struct sha2 { + SHA256_CTX ctx256; + SHA384_CTX ctx384; --- p5-Digest-SHA2-1.1.0.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: