summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2020-06-18 14:35:46 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-06-18 14:36:48 +0100
commitf04316e3f0395e746b3047344d398ea281e0880e (patch)
tree4aa1a33b2dd87d47d63c8b3564561476ab69418c
parentfbd3bc626216694a1eb43bbe0462692c56b5b82e (diff)
meson: add Solaris support
Summary: Add Solaris support for meson Test Plan: test on OpenIndiana Reviewers: raster, bu5hm4n, stefan_schmidt Reviewed By: raster, stefan_schmidt Subscribers: alarcher, stefan_schmidt, bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11973
-rw-r--r--header_checks/meson.build7
-rw-r--r--meson.build9
-rw-r--r--src/bin/elementary/meson.build9
-rw-r--r--src/lib/ecore/meson.build4
-rw-r--r--src/lib/eina/meson.build4
5 files changed, 28 insertions, 5 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build
index 955c0082f2..c71fdbf216 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -88,7 +88,6 @@ function_checks = [
88 ['getxattr', ['sys/types.h', 'sys/xattr.h']], 88 ['getxattr', ['sys/types.h', 'sys/xattr.h']],
89 ['iconv', ['iconv.h']], 89 ['iconv', ['iconv.h']],
90 ['listxattr', ['sys/types.h', 'sys/xattr.h']], 90 ['listxattr', ['sys/types.h', 'sys/xattr.h']],
91 ['mallinfo', ['malloc.h']],
92 ['malloc_info', ['malloc.h']], 91 ['malloc_info', ['malloc.h']],
93 ['malloc_usable_size', ['malloc.h']], 92 ['malloc_usable_size', ['malloc.h']],
94 ['mkdirat', ['sys/stat.h']], 93 ['mkdirat', ['sys/stat.h']],
@@ -114,6 +113,7 @@ function_checks = [
114 ['dlopen', ['dlfcn.h'], ['dl']], 113 ['dlopen', ['dlfcn.h'], ['dl']],
115 ['dlsym', ['dlfcn.h'], ['dl']], 114 ['dlsym', ['dlfcn.h'], ['dl']],
116 ['lround', ['math.h'], ['m']], 115 ['lround', ['math.h'], ['m']],
116 ['mallinfo', ['malloc.h'], ['malloc']],
117 ['shm_open', ['sys/mman.h', 'sys/stat.h', 'fcntl.h'], ['rt']], 117 ['shm_open', ['sys/mman.h', 'sys/stat.h', 'fcntl.h'], ['rt']],
118#from here on we specify arguments 118#from here on we specify arguments
119 ['splice', ['fcntl.h'], [], '-D_GNU_SOURCE=1'], 119 ['splice', ['fcntl.h'], [], '-D_GNU_SOURCE=1'],
@@ -157,6 +157,11 @@ m = cc.find_library('m')
157dl = cc.find_library('dl', required: false) 157dl = cc.find_library('dl', required: false)
158rt = cc.find_library('rt', required: false) 158rt = cc.find_library('rt', required: false)
159 159
160if sys_sun == true
161 malloc = cc.find_library('malloc', required: true)
162 socket = cc.find_library('socket', required: true)
163endif
164
160thread_dep = dependency('threads') 165thread_dep = dependency('threads')
161 166
162#check for the headers 167#check for the headers
diff --git a/meson.build b/meson.build
index af9e8b031e..b2c2d7ff5d 100644
--- a/meson.build
+++ b/meson.build
@@ -48,11 +48,13 @@ windows = ['windows', 'cygwin']
48bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd'] 48bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd']
49linux = ['linux'] 49linux = ['linux']
50osx = ['darwin'] 50osx = ['darwin']
51sun = ['sunos']
51 52
52sys_linux = linux.contains(host_machine.system()) 53sys_linux = linux.contains(host_machine.system())
53sys_bsd = bsd.contains(host_machine.system()) 54sys_bsd = bsd.contains(host_machine.system())
54sys_windows = windows.contains(host_machine.system()) 55sys_windows = windows.contains(host_machine.system())
55sys_osx = osx.contains(host_machine.system()) 56sys_osx = osx.contains(host_machine.system())
57sys_sun = sun.contains(host_machine.system())
56 58
57module_files = [] 59module_files = []
58evas_loader_map = [] 60evas_loader_map = []
@@ -126,6 +128,11 @@ foreach lang : ['c', 'objc', 'cpp']
126 endif 128 endif
127endforeach 129endforeach
128 130
131if sys_sun == true
132# for getpwuid_r()
133 add_global_arguments('-D_POSIX_PTHREAD_SEMANTICS', language: 'c')
134endif
135
129config_h = configuration_data() 136config_h = configuration_data()
130config_h.set_quoted('MODULE_ARCH', version_name) 137config_h.set_quoted('MODULE_ARCH', version_name)
131config_h.set_quoted('PACKAGE', meson.project_name()) 138config_h.set_quoted('PACKAGE', meson.project_name())
@@ -200,7 +207,7 @@ endif
200config_dir = [include_directories('.')] 207config_dir = [include_directories('.')]
201eolian_include_directories = [] 208eolian_include_directories = []
202 209
203if sys_linux == true or sys_bsd == true 210if sys_linux == true or sys_bsd == true or sys_sun == true
204 sys_lib_extension = 'so' 211 sys_lib_extension = 'so'
205 sys_exe_extension = '' 212 sys_exe_extension = ''
206 sys_mod_extension = 'so' 213 sys_mod_extension = 'so'
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 1bad71570c..f31ed793e3 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -167,12 +167,15 @@ elementary_test_src = [
167 'test.h' 167 'test.h'
168] 168]
169 169
170link_args = []
170if sys_windows == false 171if sys_windows == false
171 link_args = ['-rdynamic', '-fPIC', '-pie'] 172 link_args += ['-rdynamic', '-fPIC']
172 package_c_args = package_c_args + ['-fPIC'] 173 package_c_args = package_c_args + ['-fPIC']
173else
174 link_args = []
175endif 174endif
175if sys_windows == false and sys_sun == false
176 link_args += ['-pie']
177endif
178
176elementary_test = executable('elementary_test', 179elementary_test = executable('elementary_test',
177 elementary_test_src, 180 elementary_test_src,
178 dependencies: [elementary, intl] + elementary_deps + elementary_pub_deps, 181 dependencies: [elementary, intl] + elementary_deps + elementary_pub_deps,
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 0f72f4ba28..dfc2dece55 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -2,6 +2,10 @@ ecore_deps = []
2ecore_pub_deps = [eina, eo, efl] 2ecore_pub_deps = [eina, eo, efl]
3ecore_ext_deps = [intl, m, buildsystem] 3ecore_ext_deps = [intl, m, buildsystem]
4 4
5if sys_sun == true
6 ecore_deps += [malloc]
7endif
8
5pub_legacy_eo_files = [ 9pub_legacy_eo_files = [
6 'ecore_event_message.eo', 10 'ecore_event_message.eo',
7 'ecore_event_message_handler.eo', 11 'ecore_event_message_handler.eo',
diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build
index 7aa1afa7ba..272c8fda82 100644
--- a/src/lib/eina/meson.build
+++ b/src/lib/eina/meson.build
@@ -7,6 +7,10 @@ if sys_windows == true
7 eina_pub_deps += [evil] 7 eina_pub_deps += [evil]
8endif 8endif
9 9
10if sys_sun == true
11 eina_deps += [socket]
12endif
13
10public_sub_headers = [ 14public_sub_headers = [
11'eina_promise.h', 15'eina_promise.h',
12'eina_safety_checks.h', 16'eina_safety_checks.h',