1 |
commit: 416069e9e51e93debcb00d792c1c078cfcba38d5 |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Wed Dec 29 11:37:59 2021 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 11:38:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=416069e9 |
7 |
|
8 |
app-crypt/pgp: initial import |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
app-crypt/pgp/Manifest | 1 + |
13 |
app-crypt/pgp/files/pgp-2.6.3a-alpha.patch | 14 +++++++ |
14 |
app-crypt/pgp/files/pgp-2.6.3a-getline.patch | 47 +++++++++++++++++++++ |
15 |
app-crypt/pgp/files/pgp-2.6.3a-includes.patch | 25 +++++++++++ |
16 |
app-crypt/pgp/files/pgp-2.6.3a-sparc.patch | 23 ++++++++++ |
17 |
app-crypt/pgp/metadata.xml | 17 ++++++++ |
18 |
app-crypt/pgp/pgp-2.6.3a.ebuild | 60 +++++++++++++++++++++++++++ |
19 |
profiles/package.use.mask | 4 ++ |
20 |
8 files changed, 191 insertions(+) |
21 |
|
22 |
diff --git a/app-crypt/pgp/Manifest b/app-crypt/pgp/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000..bc4dc3f51 |
25 |
--- /dev/null |
26 |
+++ b/app-crypt/pgp/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST pgp263is.tar.gz 607982 BLAKE2B 956afb5e4cdb61716b1aee5c02461410ee2d4fb3c5958af8d2f329cd9974115dfb2944bb80194059b5daf61eab277b130c24677f2845c8f9adf942cd1246d609 SHA512 ced42d884f8dbbc7afc2dfbe485716333df5fa04a5727dc63fa3c7504e53447a7561d7406a057fba18e6239836e40cc13de4b30f2223552c6dc3dae0664a4374 |
29 |
|
30 |
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch b/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch |
31 |
new file mode 100644 |
32 |
index 000000000..c0eb4a0be |
33 |
--- /dev/null |
34 |
+++ b/app-crypt/pgp/files/pgp-2.6.3a-alpha.patch |
35 |
@@ -0,0 +1,14 @@ |
36 |
+--- a/src/md5.h |
37 |
++++ b/src/md5.h |
38 |
+@@ -1,11 +1,7 @@ |
39 |
+ #ifndef MD5_H |
40 |
+ #define MD5_H |
41 |
+ |
42 |
+-#ifdef __alpha |
43 |
+ typedef unsigned int uint32; |
44 |
+-#else |
45 |
+-typedef unsigned long uint32; |
46 |
+-#endif |
47 |
+ |
48 |
+ struct MD5Context { |
49 |
+ uint32 buf[4]; |
50 |
|
51 |
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-getline.patch b/app-crypt/pgp/files/pgp-2.6.3a-getline.patch |
52 |
new file mode 100644 |
53 |
index 000000000..84f87c6bc |
54 |
--- /dev/null |
55 |
+++ b/app-crypt/pgp/files/pgp-2.6.3a-getline.patch |
56 |
@@ -0,0 +1,47 @@ |
57 |
+--- a/src/armor.c |
58 |
++++ b/src/armor.c |
59 |
+@@ -343,7 +343,7 @@ copyline(FILE * in, FILE * out) |
60 |
+ * idea. |
61 |
+ */ |
62 |
+ static int |
63 |
+-getline(char *buf, int n, FILE * f) |
64 |
++get_line(char *buf, int n, FILE * f) |
65 |
+ { |
66 |
+ int state; |
67 |
+ char *p; |
68 |
+@@ -376,7 +376,7 @@ getline(char *buf, int n, FILE * f) |
69 |
+ return 0; /* Out of buffer space */ |
70 |
+ } |
71 |
+ } /* for (;;) */ |
72 |
+-} /* getline */ |
73 |
++} /* get_line */ |
74 |
+ |
75 |
+ #if 1 |
76 |
+ /* This limit is advisory only; longer lines are handled properly. |
77 |
+@@ -547,7 +547,7 @@ armor_file(char *infilename, char *outfi |
78 |
+ return 1; |
79 |
+ } |
80 |
+ fprintf(outFile, "-----BEGIN PGP SIGNED MESSAGE-----\n\n"); |
81 |
+- while ((i = getline(buffer, sizeof buffer, clearFile)) >= 0) { |
82 |
++ while ((i = get_line(buffer, sizeof buffer, clearFile)) >= 0) { |
83 |
+ /* Quote lines beginning with '-' as per RFC1113; |
84 |
+ * Also quote lines beginning with "From "; this is |
85 |
+ * for Unix mailers which add ">" to such lines. |
86 |
+@@ -1231,7 +1231,7 @@ LANG("\n\007Unable to write ciphertext o |
87 |
+ for (;;) { |
88 |
+ ++infile_line; |
89 |
+ nline = status; |
90 |
+- status = getline(buf, sizeof buf, in); |
91 |
++ status = get_line(buf, sizeof buf, in); |
92 |
+ if (status < 0) { |
93 |
+ fprintf(pgpout, |
94 |
+ LANG("ERROR: ASCII armor decode input ended unexpectedly!\n")); |
95 |
+@@ -1249,7 +1249,7 @@ LANG("ERROR: ASCII armor decode input en |
96 |
+ /* Copy trailing part of line, if any. */ |
97 |
+ if (!status) |
98 |
+ status = copyline(in, litout); |
99 |
+- /* Ignore error; getline will discover it again */ |
100 |
++ /* Ignore error; get_line will discover it again */ |
101 |
+ } |
102 |
+ fflush(litout); |
103 |
+ if (ferror(litout)) { |
104 |
|
105 |
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-includes.patch b/app-crypt/pgp/files/pgp-2.6.3a-includes.patch |
106 |
new file mode 100644 |
107 |
index 000000000..8e6cfd82c |
108 |
--- /dev/null |
109 |
+++ b/app-crypt/pgp/files/pgp-2.6.3a-includes.patch |
110 |
@@ -0,0 +1,25 @@ |
111 |
+--- a/src/md5.c |
112 |
++++ b/src/md5.c |
113 |
+@@ -15,6 +15,7 @@ |
114 |
+ * will fill a supplied 16-byte array with the digest. |
115 |
+ */ |
116 |
+ #include <string.h> /* for memcpy() */ |
117 |
++#include "usuals.h" |
118 |
+ #include "md5.h" |
119 |
+ |
120 |
+ #ifndef HIGHFIRST |
121 |
+ |
122 |
+--- a/src/rsaglue2.c |
123 |
++++ b/src/rsaglue2.c |
124 |
+@@ -52,9 +52,8 @@ char signon_legalese[] = _LANG("\ |
125 |
+ Uses the RSAREF(tm) Toolkit, which is copyright RSA Data Security, Inc.\n\ |
126 |
+ Distributed by the Massachusetts Institute of Technology.\n"); |
127 |
+ |
128 |
+-#include <global.h> |
129 |
+-#include <rsaref.h> |
130 |
+-#include <rsa.h> |
131 |
++#include <rsaref/rsaref.h> |
132 |
++#include <rsaref/rsa.h> |
133 |
+ /* |
134 |
+ * The functions we call in rsa.h are: |
135 |
+ * |
136 |
|
137 |
diff --git a/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch b/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch |
138 |
new file mode 100644 |
139 |
index 000000000..404b96c95 |
140 |
--- /dev/null |
141 |
+++ b/app-crypt/pgp/files/pgp-2.6.3a-sparc.patch |
142 |
@@ -0,0 +1,23 @@ |
143 |
+--- a/src/sparc.S |
144 |
++++ b/src/sparc.S |
145 |
+@@ -7,7 +7,7 @@ |
146 |
+ ! |
147 |
+ ! other sources must be compiled with UNIT32 and HIGHFIRST defined |
148 |
+ ! |
149 |
+-#ifndef SYSV |
150 |
++#if !defined(SYSV) && !defined(__ELF__) |
151 |
+ #ifdef __STDC__ |
152 |
+ #define ENTRY(name) _##name ; _##name##: |
153 |
+ #else |
154 |
+ |
155 |
+--- a/src/platform.h |
156 |
++++ b/src/platform.h |
157 |
+@@ -179,7 +179,7 @@ |
158 |
+ #define PLATFORM_SPECIFIED |
159 |
+ #endif /* i386 */ |
160 |
+ |
161 |
+-#ifdef sparc |
162 |
++#if defined(sparc) || defined(__sparc__) |
163 |
+ /* |
164 |
+ * Needs sparc.s |
165 |
+ */ |
166 |
|
167 |
diff --git a/app-crypt/pgp/metadata.xml b/app-crypt/pgp/metadata.xml |
168 |
new file mode 100644 |
169 |
index 000000000..0b8cdf7ed |
170 |
--- /dev/null |
171 |
+++ b/app-crypt/pgp/metadata.xml |
172 |
@@ -0,0 +1,17 @@ |
173 |
+<?xml version="1.0" encoding="UTF-8"?> |
174 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
175 |
+<pkgmetadata> |
176 |
+<maintainer type="person"> |
177 |
+ <email>cyber+gentoo@×××××.in</email> |
178 |
+ <name>Anna</name> |
179 |
+</maintainer> |
180 |
+<longdescription> |
181 |
+PGP (Pretty Good Privacy) is a public key encryption package to protect |
182 |
+E-mail and data files. It lets you communicate securely with people |
183 |
+you've never met, with no secure channels needed for prior exchange of |
184 |
+keys. It's well featured and fast, with sophisticated key management, |
185 |
+digital signatures, data compression, and good ergonomic design. |
186 |
+ |
187 |
+This is PGP version 2.x which understands only RSA keys. |
188 |
+</longdescription> |
189 |
+</pkgmetadata> |
190 |
|
191 |
diff --git a/app-crypt/pgp/pgp-2.6.3a.ebuild b/app-crypt/pgp/pgp-2.6.3a.ebuild |
192 |
new file mode 100644 |
193 |
index 000000000..1a3127530 |
194 |
--- /dev/null |
195 |
+++ b/app-crypt/pgp/pgp-2.6.3a.ebuild |
196 |
@@ -0,0 +1,60 @@ |
197 |
+# Copyright 2021 Gentoo Authors |
198 |
+# Distributed under the terms of the GNU General Public License v2 |
199 |
+ |
200 |
+EAPI=8 |
201 |
+ |
202 |
+inherit flag-o-matic toolchain-funcs |
203 |
+ |
204 |
+DESCRIPTION="Public-key encryption and digital signature utility" |
205 |
+HOMEPAGE="https://web.archive.org/web/20170319101112/http://www.pgpi.org/" |
206 |
+SRC_URI="https://archive.netbsd.org/pub/pkgsrc-archive/distfiles/2021Q3/pgp263is.tar.gz" |
207 |
+S="${WORKDIR}" |
208 |
+ |
209 |
+LICENSE="PGP-2" |
210 |
+SLOT="0/2" |
211 |
+KEYWORDS="~amd64" |
212 |
+IUSE="bindist debug" |
213 |
+ |
214 |
+RDEPEND="bindist? ( dev-libs/rsaref )" |
215 |
+DEPEND="${RDEPEND}" |
216 |
+ |
217 |
+PATCHES=( |
218 |
+ "${FILESDIR}"/${P}-sparc.patch |
219 |
+ "${FILESDIR}"/${P}-alpha.patch |
220 |
+ "${FILESDIR}"/${P}-includes.patch |
221 |
+ "${FILESDIR}"/${P}-getline.patch |
222 |
+) |
223 |
+ |
224 |
+DOCS=( |
225 |
+ readme.1st readme.usa setup.doc |
226 |
+ {de,en,es,fr,pgp}.hlp |
227 |
+ doc/{appnote,changes,keyserv,pgformat,politic}.doc |
228 |
+ doc/{blurb,faq,mitlicen}.txt |
229 |
+) |
230 |
+ |
231 |
+src_unpack() { |
232 |
+ default |
233 |
+ unpack "${WORKDIR}"/pgp263ii.tar |
234 |
+} |
235 |
+ |
236 |
+src_configure() { |
237 |
+ append-cflags -ansi |
238 |
+ append-cppflags -DUNIX -DIDEA32 -DMAX_NAMELEN=255 -DPORTABLE -DMPORTABLE |
239 |
+ use bindist && append-cppflags -DUSA |
240 |
+ use debug && append-cppflags -DDEBUG |
241 |
+ use x86 && append-cppflags -DASM |
242 |
+} |
243 |
+ |
244 |
+src_compile() { |
245 |
+ emake -C src all \ |
246 |
+ CC=$(tc-getCC) LD=$(tc-getCC) CFLAGS="${CFLAGS}" \ |
247 |
+ OBJS_EXT=$(usex x86 "_80386.o _zmatch.o" "") \ |
248 |
+ RSALIBS=$(usex bindist "-lrsaref" "") \ |
249 |
+ RSAOBJS=rsaglue$(usex bindist "2" "1").o |
250 |
+} |
251 |
+ |
252 |
+src_install() { |
253 |
+ dobin src/pgp |
254 |
+ doman doc/pgp.1 |
255 |
+ einstalldocs |
256 |
+} |
257 |
|
258 |
diff --git a/profiles/package.use.mask b/profiles/package.use.mask |
259 |
index 6f3615542..7f4476d49 100644 |
260 |
--- a/profiles/package.use.mask |
261 |
+++ b/profiles/package.use.mask |
262 |
@@ -52,3 +52,7 @@ sci-physics/mbdyn superlu |
263 |
# build failure with metis |
264 |
# https://public.gitlab.polimi.it/DAER/mbdyn/-/issues/101 |
265 |
sci-physics/mbdyn metis |
266 |
+ |
267 |
+# Anna Vyalkova <cyber+gentoo@×××××.in> (2021-12-29) |
268 |
+# build failure, needs patching |
269 |
+app-crypt/pgp bindist |