summaryrefslogtreecommitdiff
path: root/irc/hexchat/files/patch-meson.build
blob: f953c239872b579763f9c284ec20489a44ed7b96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- meson.build.orig	2021-10-01 21:52:09.000000000 +0200
+++ meson.build	2021-10-07 10:35:49.739120000 +0200
@@ -15,7 +15,7 @@
 
 libgio_dep = dependency('gio-2.0', version: '>= 2.34.0')
 libgmodule_dep = dependency('gmodule-2.0')
-
+libssl_dep_found = false
 libcanberra_dep = dependency('libcanberra', version: '>= 0.22',
                              required: get_option('libcanberra'))
 dbus_glib_dep = dependency('dbus-glib-1', required: get_option('dbus'))
@@ -25,7 +25,16 @@
   libssl_dep = cc.find_library('libssl')
 else
   libssl_dep = dependency('openssl', version: '>= 0.9.8',
-                          required: get_option('tls'))
+                          required: false)
+  if not libssl_dep.found()
+    libssl_dep = [
+        cc.find_library('ssl', required: get_option('tls')),
+        cc.find_library('crypto', required: get_option('tls'))
+    ]
+    libssl_dep_found = libssl_dep[0].found()
+  else
+    libssl_dep_found = libssl_dep.found()
+  endif
 endif
 
 config_h = configuration_data()
@@ -37,7 +46,7 @@
 config_h.set10('ENABLE_NLS', true)
 
 # Optional features
-config_h.set('USE_OPENSSL', libssl_dep.found())
+config_h.set('USE_OPENSSL', libssl_dep_found)
 config_h.set('USE_LIBCANBERRA', libcanberra_dep.found())
 config_h.set('USE_DBUS', dbus_glib_dep.found())
 config_h.set('USE_PLUGIN', get_option('plugin'))
@@ -57,7 +66,7 @@
   join_paths(get_option('prefix'), get_option('libdir'), 'hexchat/plugins')
 )
 
-if libssl_dep.found()
+if libssl_dep_found
   config_h.set('HAVE_X509_GET_SIGNATURE_NID',
     cc.has_function('X509_get_signature_nid', dependencies: libssl_dep)
   )
@@ -178,7 +187,7 @@
   }, section: 'Directories')
 
   summary({
-    'TLS (openssl)': libssl_dep.found(),
+    'TLS (openssl)': libssl_dep_found,
     'Plugin Support': get_option('plugin'),
     'DBus Support': dbus_glib_dep.found(),
     'libcanberra': libcanberra_dep.found(),