meson build - do a little tidying of the main meson.build in root

this will need further work. i want to try and trim this down as much
as i can and make it easy to read/follow and see mistakes (thus the
aligning or afgs in many places)
This commit is contained in:
Carsten Haitzler 2017-07-30 17:35:24 +09:00
parent 6ab9c576df
commit c87d70eb9a
1 changed files with 294 additions and 291 deletions

View File

@ -1,28 +1,32 @@
##### project
project('enlightenment', 'c', project('enlightenment', 'c',
version: '0.21.99', version : '0.21.99',
license: 'BSD 2 clause', license : 'BSD 2 clause',
default_options: [ 'c_std=gnu99', 'warning_level=2' ], default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version: '>= 0.40.0') meson_version : '>= 0.40.0')
##### convenience variables for later
proj = meson.project_name() proj = meson.project_name()
ver = meson.project_version() ver = meson.project_version()
chmod = join_paths(meson.source_root(), 'meson-chmod.sh') chmod = join_paths(meson.source_root(), 'meson-chmod.sh')
#### check for mixed autofoo and meson build tree mess
clean_check = run_command('meson/clean_check.sh') clean_check = run_command('meson/clean_check.sh')
if clean_check.returncode() == 0 if clean_check.returncode() == 0
error('Meson build requires a clean source tree') error('Meson build requires a clean source tree')
endif endif
e_version = meson.project_version().split('.') e_version = ver.split('.')
git_version = '0' git_version = '0'
git = find_program('git') git = find_program('git')
if git.found() == true if git.found() == true
git_cmd = run_command(git.path(), 'rev-list', '--count', 'HEAD') git_cmd = run_command(git.path(), 'rev-list', '--count', 'HEAD')
if git_cmd.returncode() == 0 if git_cmd.returncode() == 0
git_version = git_cmd.stdout().strip() git_version = git_cmd.stdout().strip()
endif endif
endif endif
e_version_rev = '.'.join([meson.project_version(), git_version])
e_version_rev = '.'.join([ver, git_version])
#e_version_rev = e_version #e_version_rev = e_version
efl_version = '>= 1.19.99' efl_version = '>= 1.19.99'
@ -32,16 +36,16 @@ release = 'ver-0.22'
#release = '@0@.@1@.@2@'.format(e_version[0], e_version[1], e_version[2]) #release = '@0@.@1@.@2@'.format(e_version[0], e_version[1], e_version[2])
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c') add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
dir_prefix = get_option('prefix') dir_prefix = get_option('prefix')
dir_bin = join_paths(dir_prefix, get_option('bindir')) dir_bin = join_paths(dir_prefix, get_option('bindir'))
dir_sysconf = get_option('sysconfdir') dir_sysconf = get_option('sysconfdir')
dir_data = join_paths(dir_prefix, get_option('datadir')) dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_include = join_paths(dir_prefix, get_option('includedir')) dir_include = join_paths(dir_prefix, get_option('includedir'))
dir_include_e = join_paths(dir_include, proj) dir_include_e = join_paths(dir_include, proj)
dir_lib = join_paths(dir_prefix, get_option('libdir')) dir_lib = join_paths(dir_prefix, get_option('libdir'))
dir_module_e = join_paths(dir_lib, proj, 'modules') dir_module_e = join_paths(dir_lib, proj, 'modules')
dir_util_e = join_paths(dir_lib, proj, 'utils') dir_util_e = join_paths(dir_lib, proj, 'utils')
dir_pc = join_paths(dir_data, 'pkgconfig') dir_pc = join_paths(dir_data, 'pkgconfig')
suid_exes = [] suid_exes = []
@ -51,340 +55,334 @@ dev_cflags = []
# disable for release builds # disable for release builds
dev_cflags_try = [ dev_cflags_try = [
'-Wall', '-Wall',
'-W', '-W',
'-Wpointer-arith', '-Wpointer-arith',
'-Wshadow', '-Wshadow',
'-Wno-missing-field-initializers', '-Wno-missing-field-initializers',
'-Wfloat-equal', '-Wfloat-equal',
'-Wuninitialized', '-Wuninitialized',
'-Wundef', '-Wundef',
'-Wcast-align', '-Wcast-align',
'-Wformat=2', '-Wformat=2',
'-Wno-format-y2k', '-Wno-format-y2k',
] ]
foreach cf: dev_cflags_try foreach cf: dev_cflags_try
if cc.has_argument(cf) == true if cc.has_argument(cf) == true
dev_cflags += cf dev_cflags += cf
endif endif
endforeach endforeach
add_global_arguments(dev_cflags, language: 'c') add_global_arguments(dev_cflags, language: 'c')
config_h = configuration_data() config_h = configuration_data()
config_h.set('E_INTERNAL', '1') config_h.set('E_INTERNAL' , '1')
config_h.set('_GNU_SOURCE', '1') config_h.set('_GNU_SOURCE' , '1')
config_h.set('_ALL_SOURCE', '1') config_h.set('_ALL_SOURCE' , '1')
config_h.set('_POSIX_PTHREAD_SEMANTICS', '1') config_h.set('_POSIX_PTHREAD_SEMANTICS', '1')
config_h.set('_TANDEM_SOURCE', '1') config_h.set('_TANDEM_SOURCE' , '1')
config_h.set('__EXTENSIONS__', '1') config_h.set('__EXTENSIONS__' , '1')
#config_h.set('E_RELEASE_BUILD', '1') #config_h.set('E_RELEASE_BUILD', '1')
if get_option('nls') == true if get_option('nls') == true
subdir('po') subdir('po')
endif endif
darwin = host_machine.system().startswith('darwin') darwin = host_machine.system().startswith('darwin')
if darwin == true if darwin == true
code=''' code='''
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#include <unistd.h> #include <unistd.h>
extern char **environ; extern char **environ;
''' '''
if cc.links(code, name: 'environ test') if cc.links(code, name: 'environ test')
config_h.set('HAVE_ENVIRON', '1') config_h.set('HAVE_ENVIRON', '1')
endif endif
endif endif
openbsd = host_machine.system().startswith('openbsd')
netbsd = host_machine.system().startswith('netbsd') openbsd = host_machine.system().startswith('openbsd')
freebsd = host_machine.system().startswith('freebsd') netbsd = host_machine.system().startswith('netbsd')
suid_cflags = [] freebsd = host_machine.system().startswith('freebsd')
suid_cflags = []
suid_ldflags = [] suid_ldflags = []
dep_crypt = [] dep_crypt = []
if freebsd == true or host_machine.system().startswith('pcbsd') if freebsd == true or host_machine.system().startswith('pcbsd')
dep_crypt = cc.find_library('crypt', required: true) dep_crypt = cc.find_library('crypt', required: true)
if cc.links('', args: '-fPIE', link_args: '-pie') == true if cc.links('', args: '-fPIE', link_args: '-pie') == true
suid_cflags = '-fPIE' suid_cflags = '-fPIE'
suid_ldflags = '-pie' suid_ldflags = '-pie'
endif endif
endif endif
dragonfly = host_machine.system().startswith('dragonfly') dragonfly = host_machine.system().startswith('dragonfly')
#FIXME: other variants... #FIXME: other variants...
host_os = host_machine.system() host_os = host_machine.system()
if host_os == 'linux' if host_os == 'linux'
if cc.has_header_symbol('features.h', '__UCLIBC__') if cc.has_header_symbol('features.h', '__UCLIBC__')
host_os = 'linux-uclibc' host_os = 'linux-uclibc'
elif cc.has_header_symbol('features.h', '__dietlibc__') elif cc.has_header_symbol('features.h', '__dietlibc__')
host_os = 'linux-dietlibc' host_os = 'linux-dietlibc'
else else
host_os = 'linux-gnu' host_os = 'linux-gnu'
endif endif
endif endif
module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release) module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
config_h.set_quoted('MODULE_ARCH', module_arch)
config_h.set_quoted('PACKAGE', proj) config_h.set_quoted('MODULE_ARCH' , module_arch)
config_h.set_quoted('PACKAGE_VERSION', e_version_rev) config_h.set_quoted('PACKAGE' , proj)
config_h.set_quoted('VERSION', e_version_rev) config_h.set_quoted('PACKAGE_VERSION' , e_version_rev)
config_h.set_quoted('VERSION' , e_version_rev)
config_h.set_quoted('LOCALE_DIR' , join_paths([dir_prefix, 'share/locale']))
config_h.set_quoted('PACKAGE_URL' , 'https://www.enlightenment.org')
config_h.set_quoted('PACKAGE_TARNAME' , proj)
config_h.set_quoted('PACKAGE_BUGREPORT', 'enlightenment-devel@lists.sourceforge.net')
config_h.set_quoted('PACKAGE_STRING' , proj + ' ' + e_version_rev)
config_h.set_quoted('PACKAGE_NAME' , proj)
config_h.set_quoted('BINDIR' , dir_bin)
config_h.set_quoted('DATADIR' , dir_data)
if cc.has_function('setenv') == true
config_h.set('HAVE_SETENV' , '1')
endif
if cc.has_function('unsetenv') == true
config_h.set('HAVE_UNSETENV' , '1')
endif
if cc.has_function('clearenv') == true
config_h.set('HAVE_CLEARENV' , '1')
endif
if cc.has_header('features.h') == true
config_h.set('HAVE_FEATURES_H' , '1')
endif
if cc.has_header('sys/ptrace.h') == true
config_h.set('HAVE_SYS_PTRACE_H' , '1')
endif
if cc.has_header('arpa/inet.h') == true
config_h.set('HAVE_ARPA_INET_H' , '1')
endif
if cc.has_header('netinet/in.h') == true
config_h.set('HAVE_NETINET_IN_H' , '1')
endif
if cc.has_header('execinfo.h') == true
config_h.set('HAVE_EXECINFO_H' , '1')
elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false
execinfo_dep = dependency('execinfo', required: false)
endif
if cc.has_header('fnmatch.h') == false
error('fnmatch.h not found')
endif
if cc.has_function('fnmatch') == false
dep_fnmatch = dependency('fnmatch', required: true)
endif
add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c') add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c')
add_global_arguments('-DPACKAGE_LIB_DIR="@0@"'.format(dir_lib), language: 'c') add_global_arguments('-DPACKAGE_LIB_DIR="@0@"'.format(dir_lib), language: 'c')
add_global_arguments('-DPACKAGE_DATA_DIR="@0@"'.format(join_paths(dir_data, proj)), language: 'c') add_global_arguments('-DPACKAGE_DATA_DIR="@0@"'.format(join_paths(dir_data, proj)), language: 'c')
add_global_arguments('-DPACKAGE_SYSCONF_DIR="@0@"'.format(dir_sysconf), language: 'c') add_global_arguments('-DPACKAGE_SYSCONF_DIR="@0@"'.format(dir_sysconf), language: 'c')
config_h.set_quoted('LOCALE_DIR', join_paths([dir_prefix, 'share/locale']))
config_h.set_quoted('PACKAGE_URL', 'https://www.enlightenment.org')
config_h.set_quoted('PACKAGE_TARNAME', proj)
config_h.set_quoted('PACKAGE_BUGREPORT', 'enlightenment-devel@lists.sourceforge.net')
config_h.set_quoted('PACKAGE_STRING', proj + ' ' + e_version_rev)
config_h.set_quoted('PACKAGE_NAME', proj)
config_h.set_quoted('BINDIR', dir_bin)
config_h.set_quoted('DATADIR', dir_data)
if cc.has_function('setenv') == true
config_h.set('HAVE_SETENV', '1')
endif
if cc.has_function('unsetenv') == true
config_h.set('HAVE_UNSETENV', '1')
endif
if cc.has_function('clearenv') == true
config_h.set('HAVE_CLEARENV', '1')
endif
if cc.has_header('features.h') == true
config_h.set('HAVE_FEATURES_H', '1')
endif
if cc.has_header('sys/ptrace.h') == true
config_h.set('HAVE_SYS_PTRACE_H', '1')
endif
if cc.has_header('arpa/inet.h') == true
config_h.set('HAVE_ARPA_INET_H', '1')
endif
if cc.has_header('netinet/in.h') == true
config_h.set('HAVE_NETINET_IN_H', '1')
endif
if cc.has_header('execinfo.h') == true
config_h.set('HAVE_EXECINFO_H', '1')
else
if cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false
execinfo_dep = dependency('execinfo', required: false)
endif
endif
if cc.has_header('fnmatch.h') == false
error('fnmatch.h not found')
endif
if cc.has_function('fnmatch') == false
dep_fnmatch = dependency('fnmatch', required: true)
endif
if cc.has_header('CFBase.h', if cc.has_header('CFBase.h',
args: '-I/System/Library/Frameworks/CoreFoundation.framework/Headers') == true args: '-I/System/Library/Frameworks/CoreFoundation.framework/Headers') == true
add_global_arguments('-I/System/Library/Frameworks/CoreFoundation.framework/Headers', language: 'c') add_global_arguments('-I/System/Library/Frameworks/CoreFoundation.framework/Headers', language: 'c')
add_global_arguments('-I /System/Library/Frameworks/IOKit.framework/Headers', language: 'c') add_global_arguments('-I /System/Library/Frameworks/IOKit.framework/Headers', language: 'c')
add_global_link_arguments('-framework CoreFoundation', '-framework IOKit') add_global_link_arguments('-framework CoreFoundation', '-framework IOKit')
endif endif
if get_option('pam') == true if get_option('pam') == true
if cc.has_header('security/pam_appl.h') if cc.has_header('security/pam_appl.h')
config_h.set('HAVE_PAM', '1') config_h.set('HAVE_PAM', '1')
dep_pam = cc.find_library('pam', required: true) dep_pam = cc.find_library('pam', required: true)
endif endif
endif endif
dep_m = cc.find_library('m', required: false) dep_m = cc.find_library('m', required: false)
dep_dl = cc.find_library('dl', required: false) dep_dl = cc.find_library('dl', required: false)
dep_bluez = dependency('bluez', required: false) dep_bluez = dependency('bluez', required: false)
if dep_bluez.found() == true if dep_bluez.found() == true
config_h.set('HAVE_BLUETOOTH', '1') config_h.set('HAVE_BLUETOOTH', '1')
endif endif
systemd_unitdir = '' systemd_unitdir = ''
if get_option('systemd') == true if get_option('systemd') == true
systemd_unitdir = get_option('systemdunitdir') systemd_unitdir = get_option('systemdunitdir')
if systemd_unitdir == '' if systemd_unitdir == ''
dep_systemd = dependency('systemd', required: true) dep_systemd = dependency('systemd', required: true)
systemd_unitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir') systemd_unitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir')
endif endif
endif endif
HALT = '/sbin/shutdown -h now' HALT = '/sbin/shutdown -h now'
REBOOT = '/sbin/shutdown -r now' REBOOT = '/sbin/shutdown -r now'
SUSPEND = '' SUSPEND = ''
HIBERNATE = '' HIBERNATE = ''
MOUNT = '/bin/mount' MOUNT = '/bin/mount'
UMOUNT = '/bin/umount' UMOUNT = '/bin/umount'
EJECT = '/usr/bin/eject' EJECT = '/usr/bin/eject'
if host_machine.system().contains('bsd') == true if host_machine.system().contains('bsd') == true
#SUSPEND = 'acpiconf -s3' #SUSPEND = 'acpiconf -s3'
SUSPEND = '/usr/sbin/zzz' SUSPEND = '/usr/sbin/zzz'
HIBERNATE = 'acpiconf -s4' HIBERNATE = 'acpiconf -s4'
HALT = '/sbin/shutdown -p now' HALT = '/sbin/shutdown -p now'
MOUNT = '/sbin/mount' MOUNT = '/sbin/mount'
UMOUNT = '/sbin/umount' UMOUNT = '/sbin/umount'
EJECT = '/usr/sbin/cdcontrol eject' EJECT = '/usr/sbin/cdcontrol eject'
else else
if systemd_unitdir != '' if systemd_unitdir != ''
HALT = '/usr/bin/systemctl poweroff' HALT = '/usr/bin/systemctl poweroff'
REBOOT = '/usr/bin/systemctl reboot' REBOOT = '/usr/bin/systemctl reboot'
SUSPEND = '/usr/bin/systemctl suspend' SUSPEND = '/usr/bin/systemctl suspend'
HIBERNATE = '/usr/bin/systemctl hibernate' HIBERNATE = '/usr/bin/systemctl hibernate'
else else
sleep = find_program('sleep.sh', '/etc/acpi/sleep.sh', '/sbin/sleep.sh', '/usr/sbin/sleep.sh') sleep = find_program('sleep.sh', '/etc/acpi/sleep.sh', '/sbin/sleep.sh', '/usr/sbin/sleep.sh')
if sleep.found() == true if sleep.found() == true
SUSPEND = sleep.path() SUSPEND = sleep.path()
if sleep.path() == '/etc/acpi/sleep.sh' if sleep.path() == '/etc/acpi/sleep.sh'
SUSPEND = '/etc/acpi/sleep.sh force' SUSPEND = '/etc/acpi/sleep.sh force'
endif endif
else else
suspend = find_program('pm-suspend', '/etc/acpi/pm-suspend', '/sbin/pm-suspend', '/usr/sbin/pm-suspend') suspend = find_program('pm-suspend', '/etc/acpi/pm-suspend', '/sbin/pm-suspend', '/usr/sbin/pm-suspend')
if suspend.found() if suspend.found()
SUSPEND = suspend.path() SUSPEND = suspend.path()
endif endif
endif endif
hibernate_sh = find_program('hibernate.sh', '/etc/acpi/hibernate.sh', '/sbin/hibernate.sh', '/usr/sbin/hibernate.sh') hibernate_sh = find_program('hibernate.sh', '/etc/acpi/hibernate.sh', '/sbin/hibernate.sh', '/usr/sbin/hibernate.sh')
if hibernate_sh.found() == true if hibernate_sh.found() == true
HIBERNATE = hibernate_sh.path() HIBERNATE = hibernate_sh.path()
if hibernate_sh.path() == '/etc/acpi/hibernate.sh' if hibernate_sh.path() == '/etc/acpi/hibernate.sh'
SUSPEND = '/etc/acpi/hibernate.sh force' SUSPEND = '/etc/acpi/hibernate.sh force'
endif endif
else else
hibernate = find_program('pm-hibernate', '/etc/acpi/pm-hibernate', '/sbin/pm-hibernate', '/usr/sbin/pm-hibernate') hibernate = find_program('pm-hibernate', '/etc/acpi/pm-hibernate', '/sbin/pm-hibernate', '/usr/sbin/pm-hibernate')
if hibernate.found() if hibernate.found()
HIBERNATE = hibernate.path() HIBERNATE = hibernate.path()
endif endif
endif endif
endif endif
endif endif
sysactions = configuration_data() sysactions = configuration_data()
sysactions.set('HALT', HALT) sysactions.set('HALT' , HALT)
sysactions.set('REBOOT', REBOOT) sysactions.set('REBOOT' , REBOOT)
sysactions.set('SUSPEND', SUSPEND) sysactions.set('SUSPEND' , SUSPEND)
sysactions.set('HIBERNATE', HIBERNATE) sysactions.set('HIBERNATE', HIBERNATE)
sysactions.set('MOUNT', MOUNT) sysactions.set('MOUNT' , MOUNT)
sysactions.set('UMOUNT', UMOUNT) sysactions.set('UMOUNT' , UMOUNT)
sysactions.set('EJECT', EJECT) sysactions.set('EJECT' , EJECT)
if cc.has_function('eeze_disk_function', dependencies: dependency('eeze')) == true if cc.has_function('eeze_disk_function', dependencies: dependency('eeze')) == true
config_h.set('HAVE_EEZE_MOUNT', '1') config_h.set('HAVE_EEZE_MOUNT', '1')
eeze_mount = true eeze_mount = true
endif endif
if get_option('files') == true if get_option('files') == true
config_h.set('ENABLE_FILES', '1') config_h.set('ENABLE_FILES', '1')
endif endif
dep_eeze = [] dep_eeze = []
requires_eeze = '' requires_eeze = ''
if get_option('device-udev') == true if get_option('device-udev') == true
dep_eeze = dependency('eeze', required: true) dep_eeze = dependency('eeze', required: true)
config_h.set('HAVE_EEZE', '1') config_h.set('HAVE_EEZE', '1')
requires_eeze = 'eeze' requires_eeze = 'eeze'
endif endif
if get_option('mount-udisks') == true if get_option('mount-udisks') == true
config_h.set('HAVE_UDISKS_MOUNT', '1') config_h.set('HAVE_UDISKS_MOUNT', '1')
endif endif
if get_option('mount-eeze') == true if get_option('mount-eeze') == true
if config_h.has('HAVE_EEZE_MOUNT') == false if config_h.has('HAVE_EEZE_MOUNT') == false
error('eeze not compiled with mount support') error('eeze not compiled with mount support')
endif endif
if get_option('device-udev') == false if get_option('device-udev') == false
dep_eeze = dependency('eeze', required: true) dep_eeze = dependency('eeze', required: true)
requires_eeze = 'eeze' requires_eeze = 'eeze'
endif endif
endif endif
dep_rt = cc.find_library('rt', required: false) dep_rt = cc.find_library('rt', required: false)
dep_eina = dependency('eina', version: efl_version, required: true) dep_eina = dependency('eina' , required: true, version: efl_version)
dep_eet = dependency('eet', required: true) dep_eet = dependency('eet' , required: true)
dep_ecore = dependency('ecore', required: true) dep_ecore = dependency('ecore' , required: true)
dep_ecore_ipc = dependency('ecore-ipc', required: true) dep_ecore_ipc = dependency('ecore-ipc' , required: true)
dep_ecore_file = dependency('ecore-file', required: true) dep_ecore_file = dependency('ecore-file' , required: true)
dep_ecore_con = dependency('ecore-con', required: true) dep_ecore_con = dependency('ecore-con' , required: true)
dep_ecore_input = dependency('ecore-input', required: true) dep_ecore_input = dependency('ecore-input' , required: true)
dep_ecore_input_evas = dependency('ecore-input-evas', required: true) dep_ecore_input_evas = dependency('ecore-input-evas', required: true)
dep_ecore_evas = dependency('ecore-evas', required: true) dep_ecore_evas = dependency('ecore-evas' , required: true)
dep_evas = dependency('evas', required: true) dep_evas = dependency('evas' , required: true)
dep_edje = dependency('edje', required: true) dep_edje = dependency('edje' , required: true)
dep_efreet = dependency('efreet', required: true) dep_efreet = dependency('efreet' , required: true)
dep_efreet_mime = dependency('efreet-mime', required: true) dep_efreet_mime = dependency('efreet-mime' , required: true)
dep_efreet_trash = dependency('efreet-trash', required: true) dep_efreet_trash = dependency('efreet-trash' , required: true)
dep_eio = dependency('eio', required: true) dep_eio = dependency('eio' , required: true)
dep_eo = dependency('eo', required: true) dep_eo = dependency('eo' , required: true)
dep_eldbus = dependency('eldbus', required: true) dep_eldbus = dependency('eldbus' , required: true)
dep_emotion = dependency('emotion', required: true) dep_emotion = dependency('emotion' , required: true)
dep_elementary = dependency('elementary', required: true) dep_elementary = dependency('elementary' , required: true)
dep_wayland = [] dep_wayland = []
if get_option('wayland') == true if get_option('wayland') == true
wayland_protocols = dependency('wayland-protocols', version: '>= 1.7') wayland_protocols = dependency('wayland-protocols', version: '>= 1.7')
dir_wayland_protocols = wayland_protocols.get_pkgconfig_variable('pkgdatadir') dir_wayland_protocols = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
wayland_version = '>= 1.11.0' wayland_version = '>= 1.11.0'
dep_wayland = [ dep_wayland = [ dependency('ecore-wl2'),
dependency('ecore-wl2'), dependency('wayland-server' , version: wayland_version),
dependency('wayland-server', version: wayland_version), dependency('wayland-client' , version: wayland_version),
dependency('wayland-client', version: wayland_version), wayland_protocols,
wayland_protocols, dependency('wayland-scanner', version: wayland_version),
dependency('wayland-scanner', version: wayland_version), dependency('xkbcommon'),
dependency('xkbcommon'), dependency('uuid')
dependency('uuid') ]
] dep_ecore_drm2 = dependency('ecore-drm2', required: get_option('wl-drm'))
dep_ecore_drm2 = dependency('ecore-drm2', required: get_option('wl-drm')) requires_drm = ''
requires_drm = '' if get_option('wl-drm') == true
if get_option('wl-drm') == true requires_drm = 'ecore-drm2'
requires_drm = 'ecore-drm2' dep_wayland += dep_ecore_drm2
dep_wayland += dep_ecore_drm2 endif
endif requires_wayland = ' '.join([ 'wayland-protocols >= 1.7',
requires_wayland = ' '.join([ 'ecore-wl2',
'wayland-protocols >= 1.7', requires_drm,
'ecore-wl2', ' '.join(['wayland-server' , wayland_version]),
requires_drm, ' '.join(['wayland-client' , wayland_version]),
' '.join(['wayland-server', wayland_version]), ' '.join(['wayland-scanner', wayland_version]),
' '.join(['wayland-client', wayland_version]), 'xkbcommon',
' '.join(['wayland-scanner', wayland_version]), 'uuid'
'xkbcommon', ])
'uuid' wayland_scanner = find_program('wayland-scanner')
]) gen_scanner_client = generator(wayland_scanner,
wayland_scanner = find_program('wayland-scanner') output: '@BASENAME@-client-protocol.h',
gen_scanner_client = generator(wayland_scanner, arguments: ['client-header', '@INPUT@', '@OUTPUT@'])
output: '@BASENAME@-client-protocol.h', gen_scanner_server = generator(wayland_scanner,
arguments: ['client-header', '@INPUT@', '@OUTPUT@']) output: '@BASENAME@-server-protocol.h',
gen_scanner_server = generator(wayland_scanner, arguments: ['server-header', '@INPUT@', '@OUTPUT@'])
output: '@BASENAME@-server-protocol.h', gen_scanner_impl = generator(wayland_scanner,
arguments: ['server-header', '@INPUT@', '@OUTPUT@']) output: '@BASENAME@-protocol.c',
gen_scanner_impl = generator(wayland_scanner, arguments: ['code', '@INPUT@', '@OUTPUT@'])
output: '@BASENAME@-protocol.c', config_h.set('HAVE_WAYLAND', '1')
arguments: ['code', '@INPUT@', '@OUTPUT@'])
config_h.set('HAVE_WAYLAND', '1')
endif endif
dep_ecore_x = [] dep_ecore_x = []
if get_option('wayland') == true and get_option('wl-x11') == false and get_option('xwayland') if get_option('wayland') == true and get_option('wl-x11') == false and get_option('xwayland')
config_h.set('HAVE_WAYLAND_ONLY', '1') config_h.set('HAVE_WAYLAND_ONLY', '1')
else else
dep_ecore_x = dependency('ecore-x') dep_ecore_x = dependency('ecore-x')
endif endif
dep_xkeyboard_config = dependency('xkeyboard-config', required: false) dep_xkeyboard_config = dependency('xkeyboard-config', required: false)
if dep_xkeyboard_config.found() == true if dep_xkeyboard_config.found() == true
config_h.set_quoted('XKB_BASE', dep_xkeyboard_config.get_pkgconfig_variable('xkb_base')) config_h.set_quoted('XKB_BASE', dep_xkeyboard_config.get_pkgconfig_variable('xkb_base'))
endif endif
eet = find_program('eet') eet = find_program('eet')
gen_eet = generator(eet, gen_eet = generator(eet,
output: '@BASENAME@.cfg', output: '@BASENAME@.cfg',
arguments: ['-e', '@OUTPUT@', 'config', '@INPUT@', '1']) arguments: ['-e', '@OUTPUT@', 'config', '@INPUT@', '1'])
eldbus_codegen = find_program('eldbus-codegen') eldbus_codegen = find_program('eldbus-codegen')
@ -392,16 +390,16 @@ requires_e = []
dir_pkgconfig = join_paths(dir_lib, 'pkgconfig') dir_pkgconfig = join_paths(dir_lib, 'pkgconfig')
if freebsd == true if freebsd == true
dir_pkgconfig = join_paths(dir_lib, 'data/pkgconfig') dir_pkgconfig = join_paths(dir_lib, 'data/pkgconfig')
endif endif
subdir('src/bin') subdir('src/bin')
module_files = [] module_files = []
module_ldflags = '-module -avoid-version' module_ldflags = '-module -avoid-version'
module_includes = ['../../..', '../../bin', '../../bin/efx'] module_includes = [ '../../..', '../../bin', '../../bin/efx' ]
module_includes2 = [ '../..', '../bin', '../bin/efx' ] module_includes2 = [ '../..' , '../bin' , '../bin/efx' ]
module_deps = [deps_e, dep_dl] module_deps = [ deps_e, dep_dl ]
subdir('src/modules') subdir('src/modules')
@ -421,29 +419,34 @@ subdir('data/xsession')
subdir('doc') subdir('doc')
meson.add_install_script('meson/meson_inst.sh', suid_exes) meson.add_install_script('meson/meson_inst.sh' , suid_exes)
meson.add_install_script('meson/meson_modules.sh', module_files) meson.add_install_script('meson/meson_modules.sh', module_files)
configure_file(output: 'config.h', install: false, configuration: config_h)
pkgconfig.generate(
name: proj,
description: 'Enlightenment Window Manager',
filebase: proj,
subdirs: proj,
#requires: deps_e,
requires: requires_e,
version: e_version_rev,
libraries_private: '-lm',
install_dir: dir_pkgconfig,
variables: [
'exec_prefix=${prefix}',
'datarootdir=@0@'.format(dir_data),
'datadir=${datarootdir}',
'modules=@0@/enlightenment/modules'.format(dir_lib),
'pkgdatadir=${datarootdir}/'+ proj + '/data',
'themes=${pkgdatadir}/themes',
'backgrounds=${pkgdatadir}/backgrounds',
'release=@0@'.format(release)
]
)
install_data(['AUTHORS', 'COPYING'], install_dir: join_paths(dir_data, 'enlightenment')) configure_file(output : 'config.h',
install : false,
configuration: config_h)
pkgconfig.generate(name : proj,
description : 'Enlightenment Window Manager',
filebase : proj,
subdirs : proj,
#requires: deps_e,
requires : requires_e,
version : e_version_rev,
libraries_private: '-lm',
install_dir : dir_pkgconfig,
variables : [ 'exec_prefix=${prefix}',
'datarootdir=@0@'.format(dir_data),
'datadir=${datarootdir}',
'modules=@0@/enlightenment/modules'.format(dir_lib),
'pkgdatadir=${datarootdir}/' + proj + '/data',
'themes=${pkgdatadir}/themes',
'backgrounds=${pkgdatadir}/backgrounds',
'release=@0@'.format(release)
]
)
install_data([ 'AUTHORS',
'COPYING'
],
install_dir: join_paths(dir_data, 'enlightenment'))