ports/98996: [PATCH] finance/pfpro, finance/p5-PFProAPI: obey hier(7) and take maintainership

Alexandr Kovalenko never at nevermind.kiev.ua
Thu Jun 15 23:30:19 UTC 2006


>Number:         98996
>Category:       ports
>Synopsis:       [PATCH] finance/pfpro, finance/p5-PFProAPI: obey hier(7) and take maintainership
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 15 23:30:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Alexandr Kovalenko
>Release:        FreeBSD 6.1-RELEASE-p1 i386
>Organization:
PortaOne, Inc., http://portaone.com/
>Environment:
System: FreeBSD mile.zukabuka.com 6.1-RELEASE-p1 FreeBSD 6.1-RELEASE-p1 #0: Mon Jun 12 19:58:45 EEST 2006     root at mile.zukabuka.com:/usr/obj/usr/src/sys/mile  i386
>Description:
	finance/pfpro and finance/p5-PFProAPI do not obey hier(7). Fix this and
	take maintainership of finance/pfpro.
>How-To-Repeat:
	N/A
>Fix:
Two patches follow:

finance/pfpro patch:

diff -ruN pfpro.orig/Makefile pfpro/Makefile
--- pfpro.orig/Makefile	Thu Jun 15 21:16:43 2006
+++ pfpro/Makefile	Fri Jun 16 01:16:19 2006
@@ -7,12 +7,12 @@
 
 PORTNAME=	pfpro
 PORTVERSION=	3.0.8
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	finance
 MASTER_SITES=	#https://manager.verisign.com/
 DISTNAME=	pfpro_freebsd
 
-MAINTAINER=	durian at shadetreesoftware.com
+MAINTAINER=	never at nevermind.kiev.ua
 COMMENT=	SDK for VeriSign's PayFlow Pro
 
 ONLY_FOR_ARCHS=	i386
@@ -24,8 +24,9 @@
 PKGMESSAGE=	${WRKDIR}/pkg-message
 LATEST_LINK=	verisign-pfpro
 
-CERTDIR=	${PREFIX}/certs
+CERTDIR=	${PREFIX}/etc/pfpro/certs
 FBSDDIR=	${WRKSRC}/verisign/payflowpro/freebsd
+PATCH_WRKSRC=	${WRKSRC}/verisign/payflowpro/freebsd/bin
 PFCFLAGS=	-DUSE_SSLEAY -fPIC -DFREEBSD_OS -DGENERIC_SEED  -D_REENTRANT -pthread -DPTHREADS -I. -L.
 
 # XXX nees to be the same as DISTFILES
@@ -44,6 +45,9 @@
 some terms and conditions.  After downing the SDK, place ${PFP_BUNDLE}\n\
 in ${DISTDIR}.\n
 .endif
+
+post-patch:
+	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${FBSDDIR}/bin/pfpro.c
 
 do-build:
 	(cd ${FBSDDIR}/lib && ${CC} ${PFCFLAGS} ${CFLAGS} -c ../bin/${PORTNAME}.c -o ${PORTNAME}.o && ${CC} ${PFCFLAGS} ${CFLAGS} -lpfpro ${PORTNAME}.o -o ${PORTNAME})
diff -ruN pfpro.orig/files/patch-pfpro.c pfpro/files/patch-pfpro.c
--- pfpro.orig/files/patch-pfpro.c	Thu Jan  1 03:00:00 1970
+++ pfpro/files/patch-pfpro.c	Fri Jun 16 01:12:32 2006
@@ -0,0 +1,12 @@
+--- pfpro.c.orig	Fri Jun 16 00:37:48 2006
++++ pfpro.c	Fri Jun 16 01:01:27 2006
+@@ -65,6 +65,9 @@
+ 	int     parmLen;
+ 
+ 
++	/* Set default value of PFPRO_CERT_PATH */
++	setenv("PFPRO_CERT_PATH","%%PREFIX%%/etc/pfpro/certs",0);
++
+     if ((argc == 2) && (!strcmp(argv[1],"-i"))) {
+         /* read input from stdin */
+         if (!fgets(ibuf,sizeof(ibuf),stdin)) {
diff -ruN pfpro.orig/files/pkg-message.in pfpro/files/pkg-message.in
--- pfpro.orig/files/pkg-message.in	Wed Nov 30 23:48:29 2005
+++ pfpro/files/pkg-message.in	Fri Jun 16 00:30:40 2006
@@ -1,3 +1,6 @@
+======================================================================
 You must set the environment variable PFPRO_CERT_PATH to point to
-the directory that contains the file f73e89fd.0.  The default location
-is: %%PREFIX%%/certs
+the directory that contains the file f73e89fd.0.
+
+The default location is: %%PREFIX%%/etc/pfpro/certs
+======================================================================
diff -ruN pfpro.orig/pkg-plist pfpro/pkg-plist
--- pfpro.orig/pkg-plist	Thu Jun 15 21:16:43 2006
+++ pfpro/pkg-plist	Fri Jun 16 01:18:21 2006
@@ -1,5 +1,6 @@
 bin/pfpro
-certs/f73e89fd.0
+etc/pfpro/certs/f73e89fd.0
 include/pfpro.h
 lib/libpfpro.so
- at dirrmtry certs
+ at dirrmtry etc/pfpro/certs
+ at dirrmtry etc/pfpro

finance/p5-PFProAPI patch:

diff -ruN p5-PFProAPI.orig/Makefile p5-PFProAPI/Makefile
--- p5-PFProAPI.orig/Makefile	Wed Jun 14 06:04:24 2006
+++ p5-PFProAPI/Makefile	Fri Jun 16 01:40:56 2006
@@ -7,6 +7,7 @@
 
 PORTNAME=	PFProAPI
 PORTVERSION=	0.03
+PORTREVISION=	1
 CATEGORIES=	finance perl5
 MASTER_SITES=	#https://manager.verisign.com/
 PKGNAMEPREFIX=	p5-
@@ -22,5 +23,8 @@
 PERL_CONFIGURE=	yes
 
 MAN3=		PFProAPI.3
+
+post-patch:
+	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/PFProAPI.pm
 
 .include <bsd.port.mk>
diff -ruN p5-PFProAPI.orig/files/patch-PFProAPI.pm p5-PFProAPI/files/patch-PFProAPI.pm
--- p5-PFProAPI.orig/files/patch-PFProAPI.pm	Thu Jan  1 03:00:00 1970
+++ p5-PFProAPI/files/patch-PFProAPI.pm	Fri Jun 16 01:38:47 2006
@@ -0,0 +1,14 @@
+--- PFProAPI.pm.orig	Fri Jun 16 01:37:04 2006
++++ PFProAPI.pm	Fri Jun 16 01:37:13 2006
+@@ -76,6 +76,11 @@
+   my $parmlist;
+   my ($name, $value);
+ 
++  # If no PFPRO_CERT_PATH set, we will set default one
++  if ($ENV{'PFPRO_CERT_PATH'} eq '') {
++    $ENV{'PFPRO_CERT_PATH'} = '%%PREFIX%%/etc/pfpro/certs';
++  }
++
+   if (! $data)   {
+     # If no data was passed, we will build a test transaction
+     $data->{ACCT}    = "5105105105105100";
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list