aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 02:35:33 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 02:35:33 +0200
commita2230e848bc85e484ef14163ac90fdb7045855f7 (patch)
tree2a1cc4158e5aeca3b6022efec7cc11ee405b7757 /patches
parent1618010c141571c4d9a3fa9d340d009620c4520f (diff)
downloadNix-a2230e848bc85e484ef14163ac90fdb7045855f7.tar.gz
Nix-a2230e848bc85e484ef14163ac90fdb7045855f7.tar.zst
Nix-a2230e848bc85e484ef14163ac90fdb7045855f7.zip
Move more packages to separate files
Diffstat (limited to 'patches')
-rw-r--r--patches/muttprint_0.73-4.diff.gzbin16525 -> 0 bytes
-rw-r--r--patches/muttprint_regex.patch11
-rw-r--r--patches/muttprint_two_edge.patch19
-rw-r--r--patches/telegram-cli.patch90
4 files changed, 0 insertions, 120 deletions
diff --git a/patches/muttprint_0.73-4.diff.gz b/patches/muttprint_0.73-4.diff.gz
deleted file mode 100644
index c4f3cef..0000000
--- a/patches/muttprint_0.73-4.diff.gz
+++ /dev/null
Binary files differ
diff --git a/patches/muttprint_regex.patch b/patches/muttprint_regex.patch
deleted file mode 100644
index e99c4a2..0000000
--- a/patches/muttprint_regex.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- a/muttprint 2015-07-21 11:18:04.219578426 +1200
2+++ b/muttprint 2015-07-21 11:18:53.906243779 +1200
3@@ -1635,7 +1635,7 @@
4 open (AUX, "$auxfile") or fatalError "Could not open $auxfile:\n$!";
5
6 while (<AUX>) {
7- ($numberOfPages) = /\\newlabel{LastPage}{{}{(\d+)}}/;
8+ ($numberOfPages) = /\\newlabel\{LastPage}\{\{}\{(\d+)}}/;
9 }
10
11 close AUX or fatalError "Could not close $auxfile:\n$!";
diff --git a/patches/muttprint_two_edge.patch b/patches/muttprint_two_edge.patch
deleted file mode 100644
index 4a7290d..0000000
--- a/patches/muttprint_two_edge.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1--- a/muttprint 2016-05-05 13:48:50.515950744 +1200
2+++ b/muttprint 2016-05-05 13:52:10.722623902 +1200
3@@ -643,14 +643,14 @@
4 if ($Config{PAPERSAVE} eq "on") {
5 if ($useCups) {
6 $Config{PRINT_COMMAND} =~
7- s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/;
8+ s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/;
9 } else { # no cups
10 modifyPS("landscape");
11 }
12 } else { # no papersave
13 if ($useCups) {
14 $Config{PRINT_COMMAND} =~
15- s/\$CUPS_OPTIONS/ -o sides=two-sided-short-edge \$CUPS_OPTIONS/;
16+ s/\$CUPS_OPTIONS/ -o sides=two-sided-long-edge \$CUPS_OPTIONS/;
17 } else { # no cups
18 modifyPS("portrait");
19 }
diff --git a/patches/telegram-cli.patch b/patches/telegram-cli.patch
deleted file mode 100644
index 2d2b7b0..0000000
--- a/patches/telegram-cli.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1diff --git a/tgl/crypto/rsa_pem_openssl.c b/tgl/crypto/rsa_pem_openssl.c
2index db653f2..5e6a697 100644
3--- a/tgl/crypto/rsa_pem_openssl.c
4+++ b/tgl/crypto/rsa_pem_openssl.c
5@@ -36,6 +36,12 @@ TGLC_WRAPPER_ASSOC(rsa,RSA)
6 // TODO: Refactor crucial struct-identity into its own header.
7 TGLC_WRAPPER_ASSOC(bn,BIGNUM)
8
9+/*
10+ * Since OpenSSL version 1.1.0 the RSA struct (rsa_st) is opaque,
11+ * see also https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
12+ */
13+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
14+
15 TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {
16 RSA *ret = RSA_new ();
17 ret->e = unwrap_bn (TGLC_bn_new ());
18@@ -47,7 +53,30 @@ TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {
19 #define RSA_GETTER(M) \
20 TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \
21 return wrap_bn (unwrap_rsa (key)->M); \
22- } \
23+ }
24+
25+#else // OPENSSL_VERSION_NUMBER
26+
27+TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {
28+ RSA *ret = RSA_new ();
29+ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ());
30+ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL));
31+ RSA_set0_key (ret, ret_n, ret_e, NULL);
32+ TGLC_bn_set_word (wrap_bn (ret_e), e);
33+ return wrap_rsa (ret);
34+}
35+
36+#define RSA_GETTER(M) \
37+TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \
38+ BIGNUM *rsa_n, *rsa_e, *rsa_d; \
39+ RSA_get0_key(unwrap_rsa (key), \
40+ (const BIGNUM **) &rsa_n, \
41+ (const BIGNUM **) &rsa_e, \
42+ (const BIGNUM **) &rsa_d); \
43+ return wrap_bn (rsa_ ## M); \
44+}
45+
46+#endif // OPENSSL_VERSION_NUMBER
47
48 RSA_GETTER(n);
49 RSA_GETTER(e);
50@@ -60,4 +89,4 @@ TGLC_rsa *TGLC_pem_read_RSAPublicKey (FILE *fp) {
51 return wrap_rsa (PEM_read_RSAPublicKey (fp, NULL, NULL, NULL));
52 }
53
54-#endif
55+#endif // TGL_AVOID_OPENSSL
56diff --git a/tgl/mtproto-utils.c b/tgl/mtproto-utils.c
57index 0948bc8..cfdb216 100644
58--- a/tgl/mtproto-utils.c
59+++ b/tgl/mtproto-utils.c
60@@ -98,7 +98,7 @@ static unsigned long long BN2ull (TGLC_bn *b) {
61 if (sizeof (unsigned long) == 8) {
62 return TGLC_bn_get_word (b);
63 } else if (sizeof (unsigned long long) == 8) {
64- assert (0); // As long as nobody ever uses this code, assume it is broken.
65+// assert (0); // As long as nobody ever uses this code, assume it is broken.
66 unsigned long long tmp;
67 /* Here be dragons, but it should be okay due to be64toh */
68 TGLC_bn_bn2bin (b, (unsigned char *) &tmp);
69@@ -112,7 +112,7 @@ static void ull2BN (TGLC_bn *b, unsigned long long val) {
70 if (sizeof (unsigned long) == 8 || val < (1ll << 32)) {
71 TGLC_bn_set_word (b, val);
72 } else if (sizeof (unsigned long long) == 8) {
73- assert (0); // As long as nobody ever uses this code, assume it is broken.
74+// assert (0); // As long as nobody ever uses this code, assume it is broken.
75 htobe64(val);
76 /* Here be dragons, but it should be okay due to htobe64 */
77 TGLC_bn_bin2bn ((unsigned char *) &val, 8, b);
78diff --git a/tgl/tl-parser/tl-parser.c b/tgl/tl-parser/tl-parser.c
79index 524b196..aeadbd2 100644
80--- a/tgl/tl-parser/tl-parser.c
81+++ b/tgl/tl-parser/tl-parser.c
82@@ -1903,7 +1903,7 @@ struct tl_combinator_tree *tl_parse_args134 (struct tree *T) {
83 //assert (S->data);
84 char *name = S->data;
85 if (!name) {
86- static char s[20];
87+ static char s[21];
88 sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ());
89 name = s;
90 }