Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/virtualgl/files/
Date: Mon, 23 Dec 2019 10:16:25
Message-Id: 1577096120.6156592b3249381c17ae4d55f2804376f0ce4dff.soap@gentoo
1 commit: 6156592b3249381c17ae4d55f2804376f0ce4dff
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Mon Dec 23 06:47:09 2019 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 23 10:15:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6156592b
7
8 x11-misc/virtualgl: remove unused patch
9
10 Closes: https://github.com/gentoo/gentoo/pull/14098
11 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 ...-a974c22141d0ded9ff60a0b903f81e6b484d6ba4.patch | 168 ---------------------
15 1 file changed, 168 deletions(-)
16
17 diff --git a/x11-misc/virtualgl/files/virtualgl-2.5.2-openssl-1.1-compat-a974c22141d0ded9ff60a0b903f81e6b484d6ba4.patch b/x11-misc/virtualgl/files/virtualgl-2.5.2-openssl-1.1-compat-a974c22141d0ded9ff60a0b903f81e6b484d6ba4.patch
18 deleted file mode 100644
19 index d5d923f89d1..00000000000
20 --- a/x11-misc/virtualgl/files/virtualgl-2.5.2-openssl-1.1-compat-a974c22141d0ded9ff60a0b903f81e6b484d6ba4.patch
21 +++ /dev/null
22 @@ -1,168 +0,0 @@
23 -Patch modified to apply to VirtualGL 2.5.2, before
24 -1b82bceb3723b24ea5dc32edffbe019a8a37ab39 reformatted whitespace
25 -
26 -
27 -From a974c22141d0ded9ff60a0b903f81e6b484d6ba4 Mon Sep 17 00:00:00 2001
28 -From: DRC <information@×××××××××.org>
29 -Date: Mon, 16 Apr 2018 15:06:07 -0500
30 -Subject: [PATCH] OpenSSL improvements
31 -
32 -- Fix build issues with OpenSSL 1.1 (OpenSSL 1.1 and later no longer
33 - provides CRYPTO_set_locking_callback(), since locking is now performed
34 - internally.)
35 -- Detect whether the platform has /dev/urandom at compile time, rather
36 - than assuming that all Sun and SGI machines don't have it (Solaris 10
37 - and later supports /dev/urandom.)
38 ----
39 - ChangeLog.md | 2 ++
40 - include/Socket.h | 8 ++++++--
41 - util/CMakeLists.txt | 5 +++++
42 - util/Socket.cpp | 25 ++++++++++++++++---------
43 - 4 files changed, 29 insertions(+), 11 deletions(-)
44 -
45 -diff --git a/ChangeLog.md b/ChangeLog.md
46 -index 3632c1d8..5c9bff84 100644
47 ---- a/ChangeLog.md
48 -+++ b/ChangeLog.md
49 -@@ -52,6 +52,8 @@ a subsequent segfault when VTK tried to call `glBlendFuncSeparate()`.
50 - VirtualGL's implementation of `glXGetVisualFromFBConfig()` now returns NULL
51 - unless the FB config has a corresponding visual on the 3D X server.
52 -
53 -+6. VirtualGL can now be built and run with OpenSSL 1.1.
54 -+
55 -
56 - 2.5.2
57 - =====
58 -diff --git a/include/Socket.h b/include/Socket.h
59 -index dfe45e3a..f7409956 100644
60 ---- a/include/Socket.h
61 -+++ b/include/Socket.h
62 -@@ -1,6 +1,6 @@
63 - /* Copyright (C)2004 Landmark Graphics Corporation
64 - * Copyright (C)2005 Sun Microsystems, Inc.
65 -- * Copyright (C)2014, 2016 D. R. Commander
66 -+ * Copyright (C)2014, 2016, 2018 D. R. Commander
67 - *
68 - * This library is free software and may be redistributed and/or modified under
69 - * the terms of the wxWindows Library License, Version 3.1 or (at your option)
70 -@@ -23,7 +23,7 @@
71 - #endif
72 - #include <openssl/ssl.h>
73 - #include <openssl/err.h>
74 --#if defined(sun) || defined(sgi)
75 -+#if !defined(HAVE_DEVURANDOM) && !defined(_WIN32)
76 - #include <openssl/rand.h>
77 - #endif
78 - #endif
79 -@@ -161,15 +161,19 @@ namespace vglutil
80 -
81 - #ifdef USESSL
82 -
83 -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
84 - static void lockingCallback(int mode, int type, const char *file,
85 - int line)
86 - {
87 - if(mode&CRYPTO_LOCK) cryptoLock[type].lock();
88 - else cryptoLock[type].unlock();
89 - }
90 -+ #endif
91 -
92 - static bool sslInit;
93 -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
94 - static CriticalSection cryptoLock[CRYPTO_NUM_LOCKS];
95 -+ #endif
96 - bool doSSL; SSL_CTX *sslctx; SSL *ssl;
97 -
98 - #endif
99 -diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
100 -index 65ef59e7..ed1dfb39 100644
101 ---- a/util/CMakeLists.txt
102 -+++ b/util/CMakeLists.txt
103 -@@ -13,6 +13,11 @@ target_link_libraries(bmptest vglutil)
104 - add_executable(pftest pftest.c)
105 - target_link_libraries(pftest vglutil)
106 -
107 -+if(EXISTS /dev/urandom)
108 -+ message(STATUS "Using /dev/urandom for random number generation")
109 -+ add_definitions(-DHAVE_DEVURANDOM)
110 -+endif()
111 -+
112 - add_library(vglsocket STATIC Socket.cpp)
113 - target_link_libraries(vglsocket vglutil)
114 - if(WIN32)
115 -diff --git a/util/Socket.cpp b/util/Socket.cpp
116 -index 0d230841..b41c25e9 100644
117 ---- a/util/Socket.cpp
118 -+++ b/util/Socket.cpp
119 -@@ -1,6 +1,6 @@
120 - /* Copyright (C)2004 Landmark Graphics Corporation
121 - * Copyright (C)2005 Sun Microsystems, Inc.
122 -- * Copyright (C)2014, 2016 D. R. Commander
123 -+ * Copyright (C)2014, 2016, 2018 D. R. Commander
124 - *
125 - * This library is free software and may be redistributed and/or modified under
126 - * the terms of the wxWindows Library License, Version 3.1 or (at your option)
127 -@@ -43,32 +43,37 @@ typedef socklen_t SOCKLEN_T;
128 -
129 - #ifdef USESSL
130 - bool Socket::sslInit=false;
131 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L
132 - CriticalSection Socket::cryptoLock[CRYPTO_NUM_LOCKS];
133 - #endif
134 -+#endif
135 - CriticalSection Socket::mutex;
136 - int Socket::instanceCount=0;
137 -
138 -
139 - #ifdef USESSL
140 -
141 --static void progressCallback(int p, int n, void *arg)
142 --{
143 --}
144 --
145 --
146 - static EVP_PKEY *newPrivateKey(int bits)
147 - {
148 -+ BIGNUM *bn = NULL;
149 -+ RSA *rsa = NULL;
150 - EVP_PKEY *pk=NULL;
151 -
152 - try
153 - {
154 -+ if(!(bn = BN_new())) _throwssl();
155 -+ if(!BN_set_word(bn, RSA_F4)) _throwssl();
156 -+ if(!(rsa = RSA_new())) _throwssl();
157 -+ if(!RSA_generate_key_ex(rsa, bits, bn, NULL)) _throwssl();
158 - if(!(pk=EVP_PKEY_new())) _throwssl();
159 -- if(!EVP_PKEY_assign_RSA(pk, RSA_generate_key(bits, 0x10001,
160 -- progressCallback, NULL))) _throwssl();
161 -+ if(!EVP_PKEY_assign_RSA(pk, rsa)) _throwssl();
162 -+ BN_free(bn);
163 - return pk;
164 - }
165 - catch (...)
166 - {
167 -+ if(bn) BN_free(bn);
168 -+ if(rsa) RSA_free(rsa);
169 - if(pk) EVP_PKEY_free(pk);
170 - throw;
171 - }
172 -@@ -147,7 +152,7 @@ Socket::Socket(bool doSSL_)
173 - #ifdef USESSL
174 - if(!sslInit && doSSL)
175 - {
176 -- #if defined(sun) || defined(sgi)
177 -+ #if !defined(HAVE_DEVURANDOM) && !defined(_WIN32)
178 - char buf[128]; int i;
179 - srandom(getpid());
180 - for(i = 0; i < 128; i++)
181 -@@ -158,7 +163,9 @@ Socket::Socket(bool doSSL_)
182 - SSL_load_error_strings();
183 - ERR_load_crypto_strings();
184 - CRYPTO_set_id_callback(Thread::threadID);
185 -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
186 - CRYPTO_set_locking_callback(lockingCallback);
187 -+ #endif
188 - SSL_library_init();
189 - sslInit = true;
190 - char *env = NULL;