Package-Name: pgp
Homepage: http://www.pgpi.org/
#FIXME: partial version # in directory
Source: ftp://ftp.pgpi.org/pub/pgp/6.5/((\d+).(\d+).(\d+)) $1 $1/pgpsrc$2$3$4unix.tar.gz
More-Source-1: ftp://ftp.pgpi.org/pub/pgp/6.5/docs/english/PGPCmdLineGuide.pdf
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	tar xzvfp pgpsrc*.tar.gz
	mv -f "$(SOURCE1)" pgpsrc/PGPCmdLineGuide.pdf
	cd pgpsrc/clients/pgp/shared && (test -d unix || ln -fs ../cmdline/unix .)
	mv pgpsrc pgp-"$(VERSION)"
Compile:
	mv -f PGPCmdLineGuide.pdf "$(PREFIX)/"
	umask 022 ; mkdir -p "$(PREFIX)"/{bin,man/man1}
	set -e ; TOPDIR=`pwd` ; \
	for module in libs/{pfl,pgpcdk} clients/pgp/{shared,cmdline} ; do \
		cd "$$TOPDIR/$$module" ; \
		$(MAKE) -f "$$TOPDIR/../Makefile" configure ; \
		$(MAKE) headers ; \
		$(MAKE) ; \
		$(MAKE) install ; \
		if test -d unix/ui ; then $(MAKE) -C unix/ui ; fi ; \
	done
	mv -f clients/pgp/cmdline/packaging/pgp-6.0/man/man1/pgp.1 "$(PREFIX)"/man/man1/
Install:
	$(MAKE) instbin BIN=pgp
	$(MAKE) instman SECTION=1 MAN=pgp
Patch: <<EOT
--- libs/pfl/common/file/pgpStdFileIO.c.old	1999-06-04 10:23:45 +0900
+++ libs/pfl/common/file/pgpStdFileIO.c	2002-11-21 21:04:16 +0900
@@ -124,8 +124,12 @@
 	
 	PGPValidatePtr( self->stdioFILE );
 	
-	tempPos	= newPos;
-	result	= fsetpos( self->stdioFILE, &tempPos );
+	result	= fgetpos( self->stdioFILE, &tempPos );
+	if ( result == 0 )
+	{
+		tempPos.__pos	= newPos;
+		result			= fsetpos( self->stdioFILE, &tempPos );
+	}
 	if ( result != 0 )
 	{
 		err	= kPGPError_FileOpFailed;
@@ -221,7 +225,7 @@
 	}
 	
 	
-	*eof	= eofPos;
+	*eof	= eofPos.__pos;
 	return( err );
 }
 
--- libs/pgpcdk/priv/crypto/random/pgpRandomPool.c.old	1999-08-07 05:56:49 +0900
+++ libs/pgpcdk/priv/crypto/random/pgpRandomPool.c	2002-11-21 21:11:00 +0900
@@ -424,7 +424,7 @@
  * #define UMULH_32(r,a,b) (r) = 0
  */
 #ifndef UMULH_32
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && __GNUC__ < 3
 /* Inline asm goodies */
 #define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax")
 #elif HAVE64
--- libs/pgpcdk/unix/ui/PGPKeyServerDialogs.cpp.old	1999-03-10 11:52:17 +0900
+++ libs/pgpcdk/unix/ui/PGPKeyServerDialogs.cpp	2002-11-21 21:19:30 +0900
@@ -4,6 +4,7 @@
 	
 	$Id: PGPKeyServerDialogs.cpp,v 1.2 1999/03/10 02:52:17 heller Exp $
 ____________________________________________________________________________*/
+#include <stdlib.h>
 #include <string.h>
 
 #include "pgpDialogs.h"
--- clients/pgp/shared/Makefile.in.old	1999-06-02 11:09:18 +0900
+++ clients/pgp/shared/Makefile.in	2002-11-21 22:03:11 +0900
@@ -46,7 +46,11 @@
 
 TARGET=libPGPclients.a
 
-all: $(OBJS) 
+all: $(TARGET)
+
+$(TARGET): $(OBJS)
+	ar -rcv $@ $(OBJS)
+	ranlib $@
 
 CC=gcc
 CPP=g++
EOT

/pkg/pgp/
/usr/bin/pgp
/usr/man/man1/pgp.1.gz
