aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2021-12-29 16:37:59 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2021-12-29 16:38:07 +0500
commit416069e9e51e93debcb00d792c1c078cfcba38d5 (patch)
treeba0fa37dde603d23cddc69ee458977aca36ab6f3
parentlicenses: add PGP-2 (diff)
downloadguru-416069e9.tar.gz
guru-416069e9.tar.bz2
guru-416069e9.zip
app-crypt/pgp: initial import
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
-rw-r--r--app-crypt/pgp/Manifest1
-rw-r--r--app-crypt/pgp/files/pgp-2.6.3a-alpha.patch14
-rw-r--r--app-crypt/pgp/files/pgp-2.6.3a-getline.patch47
-rw-r--r--app-crypt/pgp/files/pgp-2.6.3a-includes.patch25
-rw-r--r--app-crypt/pgp/files/pgp-2.6.3a-sparc.patch23
-rw-r--r--app-crypt/pgp/metadata.xml17
-rw-r--r--app-crypt/pgp/pgp-2.6.3a.ebuild60
-rw-r--r--profiles/package.use.mask4
8 files changed, 191 insertions, 0 deletions
diff --git a/app-crypt/pgp/Manifest b/app-crypt/pgp/Manifest
new file mode 100644
index 000000000..bc4dc3f51
--- /dev/null
+++ b/app-crypt/pgp/Manifest
@@ -0,0 +1 @@
+DIST pgp263is.tar.gz 607982 BLAKE2B 956afb5e4cdb61716b1aee5c02461410ee2d4fb3c5958af8d2f329cd9974115dfb2944bb80194059b5daf61eab277b130c24677f2845c8f9adf942cd1246d609 SHA512 ced42d884f8dbbc7afc2dfbe485716333df5fa04a5727dc63fa3c7504e53447a7561d7406a057fba18e6239836e40cc13de4b30f2223552c6dc3dae0664a4374
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch b/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch
new file mode 100644
index 000000000..c0eb4a0be
--- /dev/null
+++ b/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch
@@ -0,0 +1,14 @@
+--- a/src/md5.h
++++ b/src/md5.h
+@@ -1,11 +1,7 @@
+ #ifndef MD5_H
+ #define MD5_H
+
+-#ifdef __alpha
+ typedef unsigned int uint32;
+-#else
+-typedef unsigned long uint32;
+-#endif
+
+ struct MD5Context {
+ uint32 buf[4];
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-getline.patch b/app-crypt/pgp/files/pgp-2.6.3a-getline.patch
new file mode 100644
index 000000000..84f87c6bc
--- /dev/null
+++ b/app-crypt/pgp/files/pgp-2.6.3a-getline.patch
@@ -0,0 +1,47 @@
+--- a/src/armor.c
++++ b/src/armor.c
+@@ -343,7 +343,7 @@ copyline(FILE * in, FILE * out)
+ * idea.
+ */
+ static int
+-getline(char *buf, int n, FILE * f)
++get_line(char *buf, int n, FILE * f)
+ {
+ int state;
+ char *p;
+@@ -376,7 +376,7 @@ getline(char *buf, int n, FILE * f)
+ return 0; /* Out of buffer space */
+ }
+ } /* for (;;) */
+-} /* getline */
++} /* get_line */
+
+ #if 1
+ /* This limit is advisory only; longer lines are handled properly.
+@@ -547,7 +547,7 @@ armor_file(char *infilename, char *outfi
+ return 1;
+ }
+ fprintf(outFile, "-----BEGIN PGP SIGNED MESSAGE-----\n\n");
+- while ((i = getline(buffer, sizeof buffer, clearFile)) >= 0) {
++ while ((i = get_line(buffer, sizeof buffer, clearFile)) >= 0) {
+ /* Quote lines beginning with '-' as per RFC1113;
+ * Also quote lines beginning with "From "; this is
+ * for Unix mailers which add ">" to such lines.
+@@ -1231,7 +1231,7 @@ LANG("\n\007Unable to write ciphertext o
+ for (;;) {
+ ++infile_line;
+ nline = status;
+- status = getline(buf, sizeof buf, in);
++ status = get_line(buf, sizeof buf, in);
+ if (status < 0) {
+ fprintf(pgpout,
+ LANG("ERROR: ASCII armor decode input ended unexpectedly!\n"));
+@@ -1249,7 +1249,7 @@ LANG("ERROR: ASCII armor decode input en
+ /* Copy trailing part of line, if any. */
+ if (!status)
+ status = copyline(in, litout);
+- /* Ignore error; getline will discover it again */
++ /* Ignore error; get_line will discover it again */
+ }
+ fflush(litout);
+ if (ferror(litout)) {
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-includes.patch b/app-crypt/pgp/files/pgp-2.6.3a-includes.patch
new file mode 100644
index 000000000..8e6cfd82c
--- /dev/null
+++ b/app-crypt/pgp/files/pgp-2.6.3a-includes.patch
@@ -0,0 +1,25 @@
+--- a/src/md5.c
++++ b/src/md5.c
+@@ -15,6 +15,7 @@
+ * will fill a supplied 16-byte array with the digest.
+ */
+ #include <string.h> /* for memcpy() */
++#include "usuals.h"
+ #include "md5.h"
+
+ #ifndef HIGHFIRST
+
+--- a/src/rsaglue2.c
++++ b/src/rsaglue2.c
+@@ -52,9 +52,8 @@ char signon_legalese[] = _LANG("\
+ Uses the RSAREF(tm) Toolkit, which is copyright RSA Data Security, Inc.\n\
+ Distributed by the Massachusetts Institute of Technology.\n");
+
+-#include <global.h>
+-#include <rsaref.h>
+-#include <rsa.h>
++#include <rsaref/rsaref.h>
++#include <rsaref/rsa.h>
+ /*
+ * The functions we call in rsa.h are:
+ *
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch b/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch
new file mode 100644
index 000000000..404b96c95
--- /dev/null
+++ b/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch
@@ -0,0 +1,23 @@
+--- a/src/sparc.S
++++ b/src/sparc.S
+@@ -7,7 +7,7 @@
+ !
+ ! other sources must be compiled with UNIT32 and HIGHFIRST defined
+ !
+-#ifndef SYSV
++#if !defined(SYSV) && !defined(__ELF__)
+ #ifdef __STDC__
+ #define ENTRY(name) _##name ; _##name##:
+ #else
+
+--- a/src/platform.h
++++ b/src/platform.h
+@@ -179,7 +179,7 @@
+ #define PLATFORM_SPECIFIED
+ #endif /* i386 */
+
+-#ifdef sparc
++#if defined(sparc) || defined(__sparc__)
+ /*
+ * Needs sparc.s
+ */
diff --git a/app-crypt/pgp/metadata.xml b/app-crypt/pgp/metadata.xml
new file mode 100644
index 000000000..0b8cdf7ed
--- /dev/null
+++ b/app-crypt/pgp/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>cyber+gentoo@sysrq.in</email>
+ <name>Anna</name>
+</maintainer>
+<longdescription>
+PGP (Pretty Good Privacy) is a public key encryption package to protect
+E-mail and data files. It lets you communicate securely with people
+you've never met, with no secure channels needed for prior exchange of
+keys. It's well featured and fast, with sophisticated key management,
+digital signatures, data compression, and good ergonomic design.
+
+This is PGP version 2.x which understands only RSA keys.
+</longdescription>
+</pkgmetadata>
diff --git a/app-crypt/pgp/pgp-2.6.3a.ebuild b/app-crypt/pgp/pgp-2.6.3a.ebuild
new file mode 100644
index 000000000..1a3127530
--- /dev/null
+++ b/app-crypt/pgp/pgp-2.6.3a.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Public-key encryption and digital signature utility"
+HOMEPAGE="https://web.archive.org/web/20170319101112/http://www.pgpi.org/"
+SRC_URI="https://archive.netbsd.org/pub/pkgsrc-archive/distfiles/2021Q3/pgp263is.tar.gz"
+S="${WORKDIR}"
+
+LICENSE="PGP-2"
+SLOT="0/2"
+KEYWORDS="~amd64"
+IUSE="bindist debug"
+
+RDEPEND="bindist? ( dev-libs/rsaref )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-sparc.patch
+ "${FILESDIR}"/${P}-alpha.patch
+ "${FILESDIR}"/${P}-includes.patch
+ "${FILESDIR}"/${P}-getline.patch
+)
+
+DOCS=(
+ readme.1st readme.usa setup.doc
+ {de,en,es,fr,pgp}.hlp
+ doc/{appnote,changes,keyserv,pgformat,politic}.doc
+ doc/{blurb,faq,mitlicen}.txt
+)
+
+src_unpack() {
+ default
+ unpack "${WORKDIR}"/pgp263ii.tar
+}
+
+src_configure() {
+ append-cflags -ansi
+ append-cppflags -DUNIX -DIDEA32 -DMAX_NAMELEN=255 -DPORTABLE -DMPORTABLE
+ use bindist && append-cppflags -DUSA
+ use debug && append-cppflags -DDEBUG
+ use x86 && append-cppflags -DASM
+}
+
+src_compile() {
+ emake -C src all \
+ CC=$(tc-getCC) LD=$(tc-getCC) CFLAGS="${CFLAGS}" \
+ OBJS_EXT=$(usex x86 "_80386.o _zmatch.o" "") \
+ RSALIBS=$(usex bindist "-lrsaref" "") \
+ RSAOBJS=rsaglue$(usex bindist "2" "1").o
+}
+
+src_install() {
+ dobin src/pgp
+ doman doc/pgp.1
+ einstalldocs
+}
diff --git a/profiles/package.use.mask b/profiles/package.use.mask
index 6f3615542..7f4476d49 100644
--- a/profiles/package.use.mask
+++ b/profiles/package.use.mask
@@ -52,3 +52,7 @@ sci-physics/mbdyn superlu
# build failure with metis
# https://public.gitlab.polimi.it/DAER/mbdyn/-/issues/101
sci-physics/mbdyn metis
+
+# Anna Vyalkova <cyber+gentoo@sysrq.in> (2021-12-29)
+# build failure, needs patching
+app-crypt/pgp bindist