a new shiny buildtool that currently completes in the total of ~ 4 min.. 1 min. conf time 2:30 min. build time Where autotools takes: 1:50 min. conf time 3:40 min. build time. meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read. Further informations can be gathered from the README.meson Right now, bindings & windows support are missing. It is highly recommented to use meson 0.48 due to optimizations in meson that reduced the time the meson call would need. Co-authored-by: Mike Blumenkrantz <zmike@samsung.com> Differential Revision: https://phab.enlightenment.org/D7012 Depends on D7011devs/larrylira/testgen
parent
70ecf1056b
commit
46d464e5bf
258 changed files with 9752 additions and 0 deletions
@ -0,0 +1,51 @@ |
||||
# BUILDING EFL WITH MESON |
||||
|
||||
Building, testing, installing: |
||||
mkdir build |
||||
cd build |
||||
meson .. |
||||
ninja all |
||||
ninja test |
||||
sudo ninja install |
||||
|
||||
In autotools there have been a few flags that are used to disable loaders. In meson the following four disbler arrays are used: |
||||
|
||||
emotion-generic-loaders-disabler |
||||
|
||||
emotion-loaders-disabler |
||||
|
||||
ecore-imf-loaders-disabler |
||||
|
||||
evas-loaders-disabler |
||||
|
||||
Autotools options that are converted are: |
||||
|
||||
--disable-poppler -> Disable pdf loader |
||||
--disable-spectre -> Disable ps loader |
||||
--disable-libraw -> Disable raw loader |
||||
--disable-librsvg -> Disable svg loader |
||||
--disable-xcf -> Disable xcf loader |
||||
--disable-xim -> Disable xim loader |
||||
--disable-scim -> Disable scim loader |
||||
--disable-ibus -> Disable ibus loader |
||||
--enable-xine -> Disable xine loader |
||||
--enable-libvlc -> Disable vlc loader |
||||
--disable-librsvg -> Disable svg loader |
||||
|
||||
The following options are dropped as they did not affect compilation |
||||
--enable-lua-old |
||||
--enable-cancel-ok |
||||
--enable-debug |
||||
--disable-quick-launch |
||||
--enable-tile-rotate |
||||
|
||||
The following options are merged into the pixman option |
||||
--enable-pixman-font |
||||
--enable-pixman-rect |
||||
--enable-pixman-line |
||||
--enable-pixman-poly |
||||
--enable-pixman-image |
||||
--enable-pixman-image-scale-sample |
||||
|
||||
|
||||
--disable-valgrind Is dropped, and handled due to the build profile, this can be handled with --buildtype release or plain. |
@ -0,0 +1,3 @@ |
||||
install_data('edje.inc', |
||||
install_dir : join_paths(dir_data, 'edje', 'include') |
||||
) |
@ -0,0 +1,5 @@ |
||||
subdir('include') |
||||
|
||||
install_data(files('edje.xml'), |
||||
install_dir : join_paths(dir_data, 'mime', 'packages') |
||||
) |
@ -0,0 +1,7 @@ |
||||
custom_target('config_'+config, |
||||
input: config_file, |
||||
output: 'base.cfg', |
||||
command: [eet_bin, '-i', '@OUTPUT@', 'config', '@INPUT@', '0'], |
||||
install: true, |
||||
install_dir: join_paths(dir_data, 'elementary', 'config', config), |
||||
) |
@ -0,0 +1,21 @@ |
||||
configs = ['default', 'mobile', 'standard'] |
||||
|
||||
foreach config : configs |
||||
config_file = join_paths(meson.current_source_dir(), config, 'base.src.in') |
||||
config_icon = join_paths(meson.current_source_dir(), config, 'icon.png') |
||||
config_desktop = join_paths(meson.current_source_dir(), config, 'profile.desktop') |
||||
|
||||
install_data([config_icon, config_desktop], |
||||
install_dir : join_paths(dir_data, 'elementary', 'config', config) |
||||
) |
||||
|
||||
subdir(config) |
||||
endforeach |
||||
|
||||
custom_target('config_profile', |
||||
input: 'profile.src', |
||||
output: 'profile.cfg', |
||||
command: [eet_bin, '-i', '@OUTPUT@', 'config', '@INPUT@', '0'], |
||||
install: true, |
||||
install_dir: join_paths(dir_data, 'elementary', 'config'), |
||||
) |
@ -0,0 +1,7 @@ |
||||
custom_target('config_'+config, |
||||
input: config_file, |
||||
output: 'base.cfg', |
||||
command: [eet_bin, '-i', '@OUTPUT@', 'config', '@INPUT@', '0'], |
||||
install: true, |
||||
install_dir: join_paths(dir_data, 'elementary', 'config', config), |
||||
) |
@ -0,0 +1,7 @@ |
||||
custom_target('config_'+config, |
||||
input: config_file, |
||||
output: 'base.cfg', |
||||
command: [eet_bin, '-i', '@OUTPUT@', 'config', '@INPUT@', '0'], |
||||
install: true, |
||||
install_dir: join_paths(dir_data, 'elementary', 'config', config), |
||||
) |
@ -0,0 +1,10 @@ |
||||
desktop_files = files('elementary_config.desktop', 'elementary_test.desktop') |
||||
elementary_icon = files('elementary.png') |
||||
|
||||
install_data(desktop_files, |
||||
install_dir : join_paths(dir_data, 'applications') |
||||
) |
||||
|
||||
install_data(elementary_icon, |
||||
install_dir : join_paths(dir_data, 'icons', 'hicolor', '128x128', 'apps') |
||||
) |
@ -0,0 +1,11 @@ |
||||
custom_target('edje_cc_edje_externals', |
||||
input : 'icons.edc', |
||||
output : '@BASENAME@.edj', |
||||
command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', edje_cc.full_path(), '-beta', |
||||
'-id', join_paths(meson.current_source_dir()), |
||||
'-id', elm_themes_image_include, |
||||
'@INPUT@', '@OUTPUT@'], |
||||
depends : edje_cc, |
||||
install : true, |
||||
install_dir : join_paths(dir_data, 'elementary', 'edje_externals'), |
||||
) |
@ -0,0 +1,10 @@ |
||||
subdir('config') |
||||
subdir('desktop') |
||||
subdir('themes') |
||||
subdir('objects') |
||||
subdir('edje_externals') |
||||
|
||||
install_subdir('images', |
||||
install_dir : join_paths(dir_data, 'elementary'), |
||||
exclude_files : ['Makefile.am'] |
||||
) |
@ -0,0 +1,42 @@ |
||||
edc_files = [ |
||||
'test.edc', |
||||
'test_external.edc', |
||||
'test_focus_style.edc', |
||||
'test_masking.edc', |
||||
'test_tab_pager.edc', |
||||
'test_tooltip.edc', |
||||
'test_prefs.edc', |
||||
'cursors.edc', |
||||
'font_preview.edc', |
||||
'multibuttonentry.edc', |
||||
'multip.edc', |
||||
'postit_ent.edc' |
||||
] |
||||
|
||||
elm_themes = [] |
||||
|
||||
foreach edc_file : edc_files |
||||
elm_themes += custom_target('edje_cc_elm_' + edc_file, |
||||
input : edc_file, |
||||
output : '@BASENAME@.edj', |
||||
command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', edje_cc.full_path(), '-beta', |
||||
'-sd', join_paths(meson.current_source_dir()), |
||||
'-id', elm_themes_image_include, |
||||
'-id', join_paths(meson.current_source_dir()), |
||||
'-fd', join_paths(meson.current_source_dir()), |
||||
'@INPUT@', '@OUTPUT@'], |
||||
depends : edje_cc, |
||||
install : true, |
||||
install_dir : join_paths(dir_data, 'elementary', 'objects'), |
||||
) |
||||
endforeach |
||||
|
||||
custom_target('prefs_compile', |
||||
input: 'test_prefs.epc', |
||||
output: 'test_prefs.epb', |
||||
command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', elm_prefs_cc.full_path(), |
||||
'@INPUT@', '@OUTPUT@'], |
||||
depends : elm_prefs_cc, |
||||
install : true, |
||||
install_dir : join_paths(dir_data, 'elementary', 'objects'), |
||||
) |
@ -0,0 +1,37 @@ |
||||
edc_files = [ |
||||
'default.edc', |
||||
] |
||||
|
||||
elm_themes = [] |
||||
|
||||
elm_themes_image_include = join_paths(meson.current_source_dir(), 'img') |
||||
|
||||
foreach edc_file : edc_files |
||||
elm_themes += custom_target('edje_cc_' + edc_file, |
||||
input : edc_file, |
||||
output : '@BASENAME@.edj', |
||||
command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', edje_cc.full_path(), '-beta', |
||||
'-sd', join_paths(meson.current_source_dir(), 'snd'), |
||||
'-id', elm_themes_image_include, |
||||
'-id', join_paths(meson.current_source_dir(), 'fdo'), |
||||
'-fd', join_paths(meson.current_source_dir(), 'fnt'), |
||||
'@INPUT@', '@OUTPUT@'], |
||||
depends : edje_cc, |
||||
install : true, |
||||
install_dir : join_paths(dir_data, 'elementary', 'themes'), |
||||
) |
||||
endforeach |
||||
|
||||
install_subdir('fdo', |
||||
install_dir : join_paths(dir_data, 'icons', 'Enlightenment-X'), |
||||
strip_directory : true, |
||||
exclude_directories : [ |
||||
join_paths('status', '128-svg'), |
||||
join_paths('places', '16-svg'), |
||||
join_paths('places', '128-svg'), |
||||
join_paths('emblems', '96-svg'), |
||||
join_paths('devices', '128-svg'), |
||||
join_paths('categories', '128-svg'), |
||||
join_paths('actions', '128-svg'), |
||||
] |
||||
) |
@ -0,0 +1,3 @@ |
||||
install_data('default.inc', |
||||
install_dir : join_paths(dir_data, 'embryo', 'include') |
||||
) |
@ -0,0 +1,13 @@ |
||||
install_data('eo_gdb.py', |
||||
install_dir : join_paths(dir_data, 'eo', 'gdb') |
||||
) |
||||
|
||||
configuration = configuration_data() |
||||
configuration.set('datadir', dir_data) |
||||
|
||||
configure_file( |
||||
input: 'libeo-gdb.py.in', |
||||
output: 'libeo.so.'+meson.project_version()+'-gdb.py', |
||||
configuration: configuration, |
||||
install_dir: join_paths(dir_data, 'gdb', 'autoload', 'usr', 'lib') |
||||
) |
@ -0,0 +1,14 @@ |
||||
ethumb_frame = files('default.edc') |
||||
|
||||
custom_target('edje_cc_ethumb_frame', |
||||
input : ethumb_frame, |
||||
output : '@BASENAME@.edj', |
||||
command : ['/usr/bin/env', 'EFL_RUN_IN_TREE=1', edje_cc.full_path(), '-beta', |
||||
'-sd', join_paths(meson.current_source_dir()), |
||||
'-id', join_paths(meson.current_source_dir()), |
||||
'-fd', join_paths(meson.current_source_dir()), |
||||
'@INPUT@', '@OUTPUT@'], |
||||
depends : edje_cc, |
||||
install : true, |
||||
install_dir : join_paths(dir_data, 'ethumb', 'frames'), |
||||
) |
@ -0,0 +1,12 @@ |
||||
checkme_files = ['ecore', 'ecore_imf', 'ecore_x', 'eeze', 'efreet', 'elua', 'emotion', 'ethumb', 'ethumb_client', 'evas'] |
||||
foreach checkme : checkme_files |
||||
install_data(join_paths(checkme, 'checkme'), |
||||
install_dir : join_paths(dir_data, checkme) |
||||
) |
||||
endforeach |
||||
|
||||
subdir('eo') |
||||
subdir('edje') |
||||
subdir('embryo') |
||||
subdir(join_paths('ethumb', 'frames')) |
||||
subdir('elementary') |
@ -0,0 +1,177 @@ |
||||
header_checks = [ |
||||
'alloca.h', |
||||
'asm/hwcap.h', |
||||
'bsd/string.h', |
||||
'dirent.h', |
||||
'execinfo.h', |
||||
'mcheck.h', |
||||
'netinet/in.h', |
||||
'netinet/ssl.h', |
||||
'netinet/tcp.h', |
||||
'netinet/udp.h', |
||||
'net/if.h', |
||||
'stdlib.h', |
||||
'mman.h', |
||||
'sys/auxv.h', |
||||
'sys/inotify.h', |
||||
'sys/ioctl.h', |
||||
'sys/mman.h', |
||||
'sys/types.h', |
||||
'sys/socket.h', |
||||
'sys/filio.h', |
||||
'arpa/inet.h', |
||||
'sys/epoll.h', |
||||
'sys/un.h', |
||||
'sys/wait.h', |
||||
'sys/resource.h', |
||||
'sys/times.h', |
||||
'dirent.h', |
||||
'longinfo.h', |
||||
'exotic.h', |
||||
'ieeefp.h', |
||||
'node/uv.h', |
||||
'sys/timerfd.h', |
||||
'features.h', |
||||
'langinfo.h', |
||||
'locale.h', |
||||
'uv.h', |
||||
'ws2tcpip.h' |
||||
] |
||||
|
||||
function_checks = [ |
||||
# function name | headers that are needed | libraries to include | Defines that are needed |
||||
['alloca', ['alloca.h']], |
||||
['backtrace', ['execinfo.h']], |
||||
['backtrace_symbols', ['execinfo.h']], |
||||
['clock_gettime', ['time.h']], |
||||
['dirfd', ['dirent.h sys/types.h']], |
||||
['fchmod', ['sys/stat.h']], |
||||
['fcntl', ['fcntl.h']], |
||||
['fork', ['unistd.h']], |
||||
['fpathconf', ['unistd.h']], |
||||
['geteuid', ['unistd.h']], |
||||
['getpagesize', ['unistd.h']], |
||||
['getpwent', ['sys/types.h', 'pwd.h']], |
||||
['getuid', ['unistd.h']], |
||||
['getxattr', ['sys/types.h', 'sys/xattr.h']], |
||||
['iconv', ['iconv.h']], |
||||
['listxattr', ['sys/types.h', 'sys/xattr.h']], |
||||
['mallinfo', ['malloc.h']], |
||||
['malloc_info', ['malloc.h']], |
||||
['malloc_usable_size', ['malloc.h']], |
||||
['mkdirat', ['sys/stat.h']], |
||||
['mmap', ['sys/mman.h']], |
||||
['mtrace', ['mcheck.h']], |
||||
['prctl', ['sys/prctl.h']], |
||||
['realpath', ['stdlib.h']], |
||||
['setxattr', ['sys/types.h', 'sys/xattr.h']], |
||||
['siglongjmp', ['setjmp.h']], |
||||
['strerror_r', ['string.h']], |
||||
['gettimeofday', ['sys/time.h']], |
||||
['execvp', ['unistd.h']], |
||||
['pause', ['unistd.h']], |
||||
['isfinite', ['math.h']], |
||||
#FIXME strlcpy is detected by meson but drops at compilation time |
||||
# ['strlcpy', ['string.h']], |
||||
['siginfo_t', ['signal.h']], |
||||
['strerror_r', ['string.h']], |
||||
['pthread_getcpuclockid', ['pthread.h', 'time.h']], |
||||
['timerfd_create', ['sys/timerfd.h']], |
||||
['kevent', ['sys/types.h', 'sys/event.h', 'sys/time.h']], |
||||
#from here on we specify the dependencies |
||||
['dlopen', ['dlfcn.h'], ['dl']], |
||||
['dlsym', ['dlfcn.h'], ['dl']], |
||||
['lround', ['math.h'], ['m']], |
||||
['shm_open', ['sys/mman.h', 'sys/stat.h', 'fcntl.h'], ['rt']], |
||||
#from here on we specify arguments |
||||
['splice', ['fcntl.h'], [], '-D_GNU_SOURCE=1'], |
||||
['sched_getcpu', ['sched.h'], [], '-D_GNU_SOURCE=1'], |
||||
['dladdr', ['dlfcn.h'], ['dl'], '-D_GNU_SOURCE=1'] |
||||
] |
||||
|
||||
strerror_r_char_p = cc.compiles('''#define _GNU_SOURCE |
||||
#include <string.h> |
||||
int func (void) |
||||
{ |
||||
char error_string[256]; |
||||
char *ptr = strerror_r (-2, error_string, 256); |
||||
char c = *strerror_r (-2, error_string, 256); |
||||
return c != 0 && ptr != (void*) 0L; |
||||
} |
||||
''', |
||||
name : 'strerror_r() returns char *') |
||||
|
||||
if strerror_r_char_p |
||||
config_h.set('STRERROR_R_CHAR_P', '1') |
||||
endif |
||||
|
||||
#for later use, a bunch of librarie findings |
||||
m = cc.find_library('m') |
||||
#just keep this here as required false, if it is not inplace the library rt will just be linked as NOP |
||||
dl = cc.find_library('dl', required: false) |
||||
rt = cc.find_library('rt', required: false) |
||||
|
||||
thread_dep = dependency('threads') |
||||
|
||||
#check for the headers |
||||
foreach header : header_checks |
||||
if cc.has_header(header) |
||||
config_h.set10('HAVE_'+header.underscorify().to_upper(), true) |
||||
endif |
||||
endforeach |
||||
|
||||
foreach function : function_checks |
||||
function_name = function[0] |
||||
headers_to_search = function[1] |
||||
dependencies = [] |
||||
args = [] |
||||
|
||||
# if there is a library, make sure they exist |
||||
if function.length() > 2 |
||||
foreach library : function[2] |
||||
lib = cc.find_library(library, required : false) |
||||
if lib.found() == true |
||||
dependencies += lib |
||||
endif |
||||
endforeach |
||||
endif |
||||
|
||||
#check if there are args |
||||
if function.length() > 3 |
||||
args = function[3] |
||||
endif |
||||
|
||||
# Only check the header if the dependencies are ready |
||||
foreach header : headers_to_search |
||||
if cc.has_header_symbol(header, function_name, |
||||
dependencies : dependencies, |
||||
args : args) |
||||
config_h.set10('HAVE_'+function_name.to_upper(), true) |
||||
endif |
||||
endforeach |
||||
endforeach |
||||
|
||||
# The next checks are manually for now due to the fact that some names are not within the default pattern |
||||
if (cc.has_header_symbol('sys/stat.h', 'fstatat')) |
||||
config_h.set10('HAVE_ATFILE_SOURCE', true) |
||||
endif |
||||
|
||||
if (cc.has_header('sys/mman.h')) |
||||
config_h.set10('HAVE_MMAN_H', true) |
||||
endif |
||||
|
||||
config_h.set('VMAJ', version_major) |
||||
config_h.set('VMIN', version_minor) |
||||
config_h.set('VMIC', version_micro) |
||||
config_h.set('VREV', '0') |
||||
|
||||
#jpeg detection ... life is a bit more complex there |
||||
|
||||
jpeg = dependency('libjpeg', required: false) |
||||
if jpeg.found() == false |
||||
jpeg = cc.find_library('jpeg') |
||||
endif |
||||
|
||||
if config_h.has('HAVE_KEVENT') |
||||
config_h.set('HAVE_NOTIFY_KEVENT', '1') |
||||
endif |
@ -0,0 +1,346 @@ |
||||
project('efl', ['c','cpp'], |
||||
version: '1.21.99', |
||||
default_options : ['buildtype=plain'], |
||||
meson_version : '>=0.46' |
||||
) |
||||
|
||||
if target_machine.system() == 'darwin' |
||||
add_languages('objc') |
||||
endif |
||||
|
||||
|
||||
clean_check = run_command('meson/clean_check.sh') |
||||
if clean_check.returncode() == 0 |
||||
error('Meson build requires a clean source tree') |
||||
endif |
||||
|
||||
pkgconfig = import('pkgconfig') |
||||
|
||||
test_env = environment() |
||||
test_env.set('EFL_RUN_IN_TREE', '1') |
||||
|
||||
version_arr = meson.project_version().split('.') |
||||
|
||||
version_major = version_arr[0] |
||||
version_minor = version_arr[1] |
||||
version_micro = version_arr[2] |
||||
version_name = 'v-'+version_major + '.' + version_minor |
||||
|
||||
cc = meson.get_compiler('c') |
||||
host_os = host_machine.system() |
||||
|
||||
if host_os == 'linux' |
||||
if cc.has_header_symbol('features.h', '__UCLIBC__') |
||||
host_os = 'linux-uclibc' |
||||
elif cc.has_header_symbol('features.h', '__dietlibc__') |
||||
host_os = 'linux-dietlibc' |
||||
else |
||||
host_os = 'linux-gnu' |
||||
endif |
||||
endif |
||||
|
||||
#prepare a special linker args flag for binaries on macos |
||||
bin_linker_args = [] |
||||
if target_machine.system() == 'darwin' |
||||
bin_linker_args = ['-pagezero_size', '10000', '-image_base', '100000000'] |
||||
endif |
||||
|
||||
module_files = [] |
||||
evas_loader_map = [] |
||||
|
||||
#install paths |
||||
dir_prefix = get_option('prefix') |
||||
dir_sysconf = join_paths(dir_prefix, get_option('sysconfdir')) |
||||
dir_bin = join_paths(dir_prefix, get_option('bindir')) |
||||
dir_data = join_paths(dir_prefix, get_option('datadir')) |
||||
dir_include = join_paths(dir_prefix, get_option('includedir')) |
||||
dir_lib = join_paths(dir_prefix, get_option('libdir')) |
||||
|
||||
#local paths |
||||
local_lib = join_paths('src', 'lib') |
||||
local_bin = join_paths('src', 'bin') |
||||
local_module = join_paths('src', 'modules') |
||||
local_tests = join_paths('src', 'tests') |
||||
local_benchmark = join_paths('src', 'benchmarks') |
||||
local_examples = join_paths('src', 'examples') |
||||
local_scripts = join_paths('src', 'scripts') |
||||
|
||||
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c') |
||||
add_global_arguments('-D_GNU_SOURCE=1', language: 'c') |
||||
add_global_arguments('-fPIC', language: 'c') |
||||
|
||||
add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: 'c') |
||||
add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: 'c') |
||||
add_global_arguments('-DNEED_RUN_IN_TREE=1', language: 'c') |
||||
add_global_arguments('-DEFL_BUILD=1', language: 'c') |
||||
add_global_arguments('-DEFL_BUILD=1', language: 'objc') |
||||
add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: 'objc') |
||||
add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: 'objc') |
||||
add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: 'c') |
||||
|
||||
config_h = configuration_data() |
||||
config_h.set_quoted('MODULE_ARCH', version_name) |
||||
config_h.set_quoted('PACKAGE', meson.project_name()) |
||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) |
||||
config_h.set_quoted('VERSION', meson.project_version()) |
||||
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', meson.project_name()) |
||||
config_h.set_quoted('PACKAGE_BUGREPORT', 'enlightenment-devel@lists.sourceforge.net') |
||||
config_h.set_quoted('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) |
||||
config_h.set_quoted('PACKAGE_NAME', meson.project_name()) |
||||
config_h.set_quoted('PACKAGE_BIN_DIR', dir_bin) |
||||
config_h.set_quoted('PACKAGE_LIB_DIR', dir_lib) |
||||
config_h.set_quoted('PACKAGE_SRC_DIR', meson.source_root()) |
||||
config_h.set_quoted('PACKAGE_BUILD_DIR', meson.current_build_dir()) |
||||
config_h.set_quoted('PACKAGE_SYSCONF_DIR', dir_sysconf) |
||||
config_h.set_quoted('BINDIR', dir_bin) |
||||
config_h.set_quoted('DATADIR', dir_data) |
||||
config_h.set10('EFL_HAVE_THREADS', true) |
||||
config_h.set('NEED_RUN_IN_TREE', '1') |
||||
|
||||
config_dir = [include_directories('.')] |
||||
eolian_include_directories = [] |
||||
|
||||
windows = ['windows', 'cygwin'] |
||||
#bsd for meson 0.46 and 0.47 |
||||
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd'] |
||||
linux = ['linux'] |
||||
osx = ['darwin'] |
||||
|
||||
if linux.contains(target_machine.system()) or bsd.contains(target_machine.system()) |
||||
sys_lib_extension = 'so' |
||||
sys_exe_extension = '' |
||||
sys_mod_extension = 'so' |
||||
elif windows.contains(target_machine.system()) |
||||
sys_lib_extension = 'dll' |
||||
sys_exe_extension = 'exe' |
||||
sys_mod_extension = 'dll' |
||||
elif osx.contains(target_machine.system()) |
||||
sys_lib_extension = 'dylib' |
||||
sys_exe_extension = '' |
||||
sys_mod_extension = 'dylib' |
||||
else |
||||
error('System '+target_machine.system()+' not known') |
||||
endif |
||||
|
||||
if (get_option('crypto') == 'gnutls') |
||||
# gcrypt does not want to provide a pkg config file so we try the lib |
||||
crypto = [dependency('gnutls'), cc.find_library('gcrypt')] |
||||
config_h.set('HAVE_GNUTLS', '1') |
||||
elif (get_option('crypto') == 'openssl') |
||||
crypto = dependency('openssl') |
||||
config_h.set('HAVE_OPENSSL', '1') |
||||
endif |
||||
|
||||
config_h.set_quoted('SHARED_LIB_SUFFIX', '.'+sys_lib_extension) |
||||
config_h.set_quoted('MOD_SUFFIX', '.'+sys_mod_extension) |
||||
config_h.set_quoted('EXE_SUFFIX', '.'+sys_exe_extension) |
||||
config_h.set('EFL_BUILD', '1') |
||||
|
||||
subdir('header_checks') |
||||
subdir('po') |
||||
|
||||
if get_option('wl') == true |
||||
subdir(join_paths('src', 'wayland_protocol')) |
||||
endif |
||||
|
||||
ecore_evas_wayland_engine_include_dir = [] |
||||
|
||||
subprojects = [ |
||||
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs |
||||
['eina' ,[] , false, true, true, true, true, true, [], []], |
||||
['eolian' ,[] , false, true, true, false, true, false, ['eina'], []], |
||||
['eo' ,[] , false, true, false, true, true, false, ['eina'], []], |
||||
['efl' ,[] , false, true, false, false, true, false, ['eo'], []], |
||||
['emile' ,[] , false, true, false, false, true, true, ['eina', 'efl'], ['lz4', 'rg_etc']], |
||||
['eet' ,[] , false, true, true, false, true, true, ['eina', 'emile', 'efl'], []], |
||||
['ecore' ,[] , false, true, false, false, false, false, ['eina', 'eo', 'efl'], ['buildsystem']], |
||||
['eldbus' ,[] , false, true, true, false, true, true, ['eina', 'eo', 'efl'], []], |
||||
['ecore' ,[] , true, false, false, false, true, true, ['eina', 'eo', 'efl'], []], #ecores modules depend on eldbus |
||||
['ecore_audio' ,[] , false, true, false, false, false, false, ['eina', 'eo'], []], |
||||
['ecore_avahi' ,['avahi'] , false, true, false, false, false, true, ['eina', 'ecore'], []], |
||||
['ecore_con' ,[] , false, true, true, false, true, false, ['eina', 'eo', 'efl', 'ecore'], ['http-parser']], |
||||
['ecore_file' ,[] , false, true, false, false, false, false, ['eina'], []], |
||||
['eeze' ,['eeze'] , true, true, true, false, true, false, ['eina', 'efl'], []], |
||||
['ecore_input' ,[] , false, true, false, false, false, false, ['eina', 'eo'], []], |
||||
['ecore_x' ,['x11'] , false, true, false, false, false, false, ['eina', 'efl'], []], |
||||
['ecore_fb' ,['fb'] , false, true, false, false, false, false, ['eina'], []], |
||||
['ecore_wl2' ,['wl'] , true, true, false, false, false, false, ['eina'], ['libdrm']], |
||||
['ecore_sdl' ,['sdl'] , false, true, false, false, false, false, ['eina'], []], |
||||
['ecore_ipc' ,[] , false, true, false, false, false, false, ['eina'], []], |
||||
['ecore_buffer' ,['buffer'] , true, true, true, false, false, false, ['eina'], []], |
||||
['ector' ,[] , false, true, false, false, true, false, ['eina', 'efl'], ['draw', 'triangulator', 'freetype']], |
||||
['elput' ,['drm'] , false, true, false, false, true, false, ['eina', 'eldbus'], []], |
||||
['ecore_drm2' ,['drm'] , false, true, false, false, false, false, ['ecore'], ['libdrm']], |
||||
['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, ['eina'], []], |
||||
['evas' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']], |
||||
['evas_goal' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['ecore_input_evas' ,[] , false, true, false, false, false, false, ['eina', 'evas'], []], |
||||
['ecore_evas' ,[] , true, true, true, false, false, false, ['evas', 'ector'], []], |
||||
['ecore_imf' ,[] , true, true, false, false, false, false, ['eina'], []], |
||||
['embryo' ,[] , false, true, true, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['efreet' ,[] , false, true, false, false, true, false, ['eina', 'efl', 'eo'], []], |
||||
['eio' ,[] , false, true, false, false, true, true, ['eina', 'eet'], []], |
||||
['efreet' ,[] , false, false, true, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['ecore_imf_evas' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['ephysics' ,['physics'] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', 'luajit'], []], |
||||
['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []], |
||||
['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []], |
||||
['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []], |
||||
['elocation' ,[] , false, true, false, false, false, false, ['ecore', 'eldbus'], []], |
||||
['elementary' ,[] , true, true, true, false, true, false, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio', 'elocation'], ['atspi']], |
||||
['efl_wl' ,['wl'] , false, true, true, false, false, false, ['evas', 'ecore'], []], |
||||
['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []], |
||||
['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []], |
||||
['ecore_drm' ,['drm-deprecated'] , false, true, false, false, false, false, ['eina'], []], |
||||
] |
||||
|
||||
# We generate Efl_Config.h and config.h later, they will be available here |
||||
config_dir += include_directories('.') |
||||
|
||||
#we have to do that first, eina modules are required by eina |
||||
#the other modules require theire package |
||||
subdir(join_paths(local_module, 'eina')) |
||||
|
||||
test_dirs = [] |
||||
example_dirs = [] |
||||
tmp_empty = declare_dependency() |
||||
|
||||
|
||||
foreach package : subprojects |
||||
package_name = package[0] |
||||
package_version_name = '-'.join(package_name.split('_')) + '-' + version_major |
||||
package_c_args = [ |
||||
'-DPACKAGE_DATA_DIR="'+ join_paths(dir_data, package_name)+'"', |
||||
'-DNEED_RUN_IN_TREE=1' |
||||
] |
||||
automatic_pkgfile = true |
||||
if package[1].length() == 0 or get_option(package[1][0]) |
||||
config_h.set('HAVE_'+package_name.to_upper(), '1') |
||||
|
||||
dir_package_include = join_paths(dir_include, package_version_name) |
||||
dir_package_modules = join_paths(dir_lib, package_name, 'modules') |
||||
|
||||
#ensure that we really dont copy the eo file targets from a previous library |
||||
pub_eo_file_target = [] |
||||
priv_eo_file_target = [] |
||||
|
||||
foreach static_lib : package[9] |
||||
if get_variable(static_lib, tmp_empty) == tmp_empty |
||||
subdir(join_paths('src', 'static_libs', static_lib)) |
||||
endif |
||||
endforeach |
||||
|
||||
if (package[3]) |
||||
subdir(join_paths(local_lib, package_name)) |
||||
endif |
||||
if (package[2]) |
||||
subdir(join_paths(local_module, package_name)) |
||||
endif |
||||
if (package[4]) |
||||
subdir(join_paths(local_bin, package_name)) |
||||
endif |
||||
if (package[5]) |
||||
subdir(join_paths(local_benchmark, package_name)) |
||||
endif |
||||
if (package[6]) |
||||
test_dirs += [package_name] |
||||
endif |
||||
if (package[7]) |
||||
example_dirs += [package_name] |
||||
endif |
||||
|
||||
set_variable('build_'+package_name, true) |
||||
|
||||
# generate automatic pc files for libraries |
||||
if automatic_pkgfile == true and package[3] |
||||
tmp_lib = get_variable(package_name+'_lib') |
||||
tmp_deps = get_variable(package_name+'_deps') |
||||
tmp_pub_deps = get_variable(package_name+'_pub_deps') |
||||
|
||||
pkgconfig.generate(tmp_lib, |
||||
name : '-'.join(package_name.split('_')), |
||||
subdirs : package_version_name, |
||||
version : version_major + '.' + version_minor, |
||||
libraries : tmp_pub_deps, |
||||
requires : package[8], |
||||
) |
||||
endif |
||||
else |
||||
message(package_name+' disabled!') |
||||
endif |
||||
|
||||
endforeach |
||||
|
||||
#build this later, as the debug services are depending on ecore |
||||
subdir(join_paths('src', 'bin', 'efl')) |
||||
|
||||
subdir(join_paths('src', 'generic', 'evas')) |
||||
subdir(join_paths('src', 'generic', 'emotion')) |
||||
|
||||
subdir(join_paths('src', 'bindings', 'luajit')) |
||||
subdir(join_paths('src', 'edje_external')) |
||||
|
||||
|
||||
subdir(join_paths('data')) |
||||
|
||||
if get_option('build-tests') |
||||
check = dependency('check') |
||||
subdir(join_paths('src', 'tests')) |
||||
foreach test : test_dirs |
||||
subdir(join_paths(local_tests, test)) |
||||
endforeach |
||||
endif |
||||
|
||||
if get_option('build-examples') |
||||
foreach example : example_dirs |
||||
subdir(join_paths(local_examples, example)) |
||||
endforeach |
||||
endif |
||||
|
||||
subdir(join_paths(local_scripts)) |
||||
|
||||
meson.add_install_script('meson/meson_modules.sh', module_files) |
||||
|
||||
foreach evas_loader_map_inst : evas_loader_map |
||||
evas_loader_original = evas_loader_map_inst[0] |
||||
evas_loader_link_types = evas_loader_map_inst[1] |
||||
|
||||
meson.add_install_script('meson/evas_loader_conf.sh', evas_loader_original, evas_loader_link_types) |
||||
endforeach |
||||
|
||||
# |
||||
# Configure files |
||||
# |
||||
|
||||
efl_config_h = configuration_data() |
||||
efl_config_h.set('EFL_VERSION_MAJOR', version_major) |
||||
efl_config_h.set('EFL_VERSION_MINOR', version_minor) |
||||
efl_config_h.set('EFL_VERSION_MICRO', version_micro) |
||||
efl_config_h.set('EFL_BUILD_ID', get_option('build-id')) |
||||
|
||||
#FIXME placeholder |
||||
efl_config_h.set('EFL_API_EO_DEF', '#define EFL_API_EO_DEF "FIXME NOT IMPLEMENTED"') |
||||
efl_config_h.set('EFL_API_LEGACY_DEF', '#define EFL_API_LEGACY_DEF "FIXME NOT IMPLEMENTED"') |
||||
|
||||
configure_file( |
||||
output: 'config.h', |
||||
install: false, |
||||
configuration: config_h |
||||
) |
||||
|
||||
configure_file( |
||||
input: join_paths('src','lib', 'efl', 'Efl_Config.h.in'), |
||||
output: 'Efl_Config.h', |
||||
install_dir : join_paths(dir_include,'efl-'+version_major), |
||||
configuration: efl_config_h |
||||
) |
||||
|
||||
configure_file( |
||||
input: 'elm_intro.h.in', |
||||
output: 'elm_intro.h', |
||||
configuration: config_h, |
||||
install_dir : join_paths(dir_include,'elementary-'+version_major) |
||||
) |
@ -0,0 +1,3 @@ |
||||
#!/bin/sh |
||||
|
||||
test -f ${MESON_SOURCE_ROOT}/configure |
@ -0,0 +1,18 @@ |
||||
#!/bin/bash |
||||
|
||||
original_loader=$1 |
||||
filename="$(basename $original_loader)" |
||||
ext="${ext##*.}" |
||||
original_name="$(basename $original_loader $ext)" |
||||
loader_dir="$(dirname $original_loader)" |
||||
loader="$(basename $original_loader)" |
||||
loader_name="$(echo $original_name | cut -f 1 -d '.')" |
||||
|
||||
if [ ${original_loader: -3} == "$ext" ] |
||||
then |
||||
mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name" |
||||
fi |
||||
|
||||
for x in "${@:2}"; do |
||||
ln -sf "$DESTDIR"/"$loader_dir"/"$original_name" "$DESTDIR"/"$loader_dir"/"$loader_name"."$x" |
||||
done |
@ -0,0 +1,8 @@ |
||||
#!/bin/sh |
||||
|
||||
for x in "$@" ; do |
||||
dir="$(dirname $x)" |
||||
filename="$(basename $x)" |
||||
ext="${filename##*.}" |
||||
mv "$DESTDIR"/"$x" "$DESTDIR"/"$dir"/module."$ext" |
||||
done |
@ -0,0 +1,311 @@ |
||||
option('audio', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling audio support in efl' |
||||
) |
||||
|
||||
option('avahi', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling avahi support in efl' |
||||
) |
||||
|
||||
option('x11', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling x11 support in efl' |
||||
) |
||||
|
||||
option('fb', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling frame buffer support in efl' |
||||
) |
||||
|
||||
option('sdl', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling sdl support in efl' |
||||
) |
||||
|
||||
option('wl', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling wayland support in efl' |
||||
) |
||||
|
||||
option('buffer', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling buffer support in efl' |
||||
) |
||||
|
||||
option('drm', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling drm support in efl' |
||||
) |
||||
|
||||
option('cocoa', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Flag for handling drm support in efl' |
||||
) |
||||
|
||||
option('physics', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling the internal physics engine in efl' |
||||
) |
||||
|
||||
option('eeze', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling the device abstraction layer in efl' |
||||
) |
||||
|
||||
option('opengl', |
||||
type : 'combo', |
||||
choices : ['full', 'es-egl', 'none'], |
||||
value : 'full', |
||||
description : 'build efl with a special opengl support' |
||||
) |
||||
|
||||
option('build-id', |
||||
type : 'string', |
||||
value : 'none', |
||||
description : 'The build id to attach to the efl build') |
||||
|
||||
option('eina-magic-debug', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'magic debug of eina structure' |
||||
) |
||||
|
||||
option('debug-threads', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'thread debugging' |
||||
) |
||||
|
||||
option('build-examples', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'build examples' |
||||
) |
||||
|
||||
option('build-tests', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'build examples' |
||||
) |
||||
|
||||
option('crypto', |
||||
type : 'combo', |
||||
choices : ['gnutls', 'openssl'], |
||||
value : 'openssl' |
||||
) |
||||
|
||||
option('glib', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'use glib or not' |
||||
) |
||||
|
||||
option('g-mainloop', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'use glib mainloop or not' |
||||
) |
||||
|
||||
option('gstreamer', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'use gstreamer 1.0 support' |
||||
) |
||||
|
||||
option('systemd', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'use systemd support' |
||||
) |
||||
|
||||
option('pulseaudio', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'pulseaudio support' |
||||
) |
||||
|
||||
option('network-backend', |
||||
type : 'combo', |
||||
choices : ['connman', 'none'], |
||||
value : 'none', |
||||
description : 'connman support' |
||||
) |
||||
|
||||
option('xpresent', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'xpresent support' |
||||
) |
||||
|
||||
option('xgesture', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'xgesture support' |
||||
) |
||||
|
||||
option('xinput2', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'xi2 support' |
||||
) |
||||
|
||||
option('xinput22', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'xi22 support' |
||||
) |
||||
|
||||
option('tslib', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'tslib support' |
||||
) |
||||
|
||||
option('eject-path', |
||||
type : 'string', |
||||
value : 'detect', |
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used' |
||||
) |
||||
|
||||
option('mount-path', |
||||
type : 'string', |
||||
value : 'detect', |
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used' |
||||
) |
||||
|
||||
option('unmount-path', |
||||
type : 'string', |
||||
value : 'detect', |
||||
description : 'path to use as eject binary, if "detect" internal eeze bins are used' |
||||
) |
||||
|
||||
option('evas-modules', |
||||
type : 'combo', |
||||
choices : ['shared', 'static'], |
||||
value : 'shared', |
||||
description : 'how to build the evas modules' |
||||
) |
||||
|
||||
option('evas-loaders-disabler', |
||||
type : 'array', |
||||
description : 'add names here to disable the loaders', |
||||
choices : ['gst', 'pdf', 'ps', 'raw', 'svg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm'], |
||||
value : ['webp'] |
||||
) |
||||
|
||||
option('ecore-imf-loaders-disabler', |
||||
type : 'array', |
||||
description : 'add names here to disable the loaders', |
||||
choices : ['xim', 'ibus', 'scim'], |
||||
value : ['scim'] |
||||
) |
||||
|
||||
option('emotion-loaders-disabler', |
||||
type : 'array', |
||||
description : 'add names here to disable the loaders', |
||||
choices : ['gstreamer', 'gstreamer1', 'libvlc', 'xine'], |
||||
value : ['gstreamer', 'libvlc', 'xine'] |
||||
) |
||||
|
||||
option('emotion-generic-loaders-disabler', |
||||
type : 'array', |
||||
description : 'add names here to disable the loaders', |
||||
choices : ['vlc'], |
||||
value : ['vlc'] |
||||
) |
||||
|
||||
option('harfbuzz', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'harfbuzz support' |
||||
) |
||||
|
||||
option('fribidi', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'fribidi support' |
||||
) |
||||
|
||||
option('fontconfig', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'fontconfig support' |
||||
) |
||||
|
||||
option('edje-sound-and-video', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'disable sound and video for edje' |
||||
) |
||||
|
||||
option('pixman', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Enable pixman support in evas' |
||||
) |
||||
|
||||
option('hyphen', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'Enable hyphen support in evas' |
||||
) |
||||
|
||||
option('embedded-lz4', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'do not use the system lz4, but rather the embedded r131 release' |
||||
) |
||||
|
||||
option('libmount', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'use libmount support or not' |
||||
) |
||||
|
||||
option('vnc-server', |
||||
type : 'boolean', |
||||
value : false, |
||||
description : 'use libmount support or not' |
||||
) |
||||
|
||||
option('v4l2', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'add v4l2 support' |
||||
) |
||||
|
||||
option('elua', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling elua support in efl' |
||||
) |
||||
|
||||
option('wl-deprecated', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling deprecated wayland support in efl' |
||||
) |
||||
|
||||
option('drm-deprecated', |
||||
type : 'boolean', |
||||
value : true, |
||||
description : 'Flag for handling deprecated drm support in efl' |
||||
) |
||||
|
||||
option('nls', |
||||
type: 'boolean', |
||||
value: true, |
||||
description: 'enable localization: (default=true)' |
||||
) |
@ -0,0 +1,22 @@ |
||||
if get_option('nls') |
||||
i18n = import('i18n') |
||||
i18n.gettext('efl', |
||||
args: [ |
||||
'--keyword=_', |
||||
'--keyword=d_:1', |
||||
'--keyword=P_:1,2', |
||||
'--keyword=dP_:1,2', |
||||
'--keyword=N_', |
||||
'--keyword=NP_:1,2', |
||||
'--from-code=UTF-8', |
||||
'--foreign-user' |
||||
]) |
||||
config_h.set('HAVE_GETTEXT', '1') |
||||
config_h.set('ENABLE_NLS', '1') |
||||
intl = cc.find_library('intl', required : false) |
||||
if cc.has_header('libintl.h', dependencies : intl) == false |
||||
error('libintl.h not found') |
||||
endif |
||||
else |
||||
intl = declare_dependency() |
||||
endif |
@ -0,0 +1,10 @@ |
||||
#!/bin/bash |
||||
|
||||
BUILD_DIR=`mktemp -d` |
||||
INSTALL_DIR=`mktemp -d` |
||||
|
||||
meson $@ --prefix ${INSTALL_DIR} ${BUILD_DIR} |
||||
|
||||
ninja -C ${BUILD_DIR} all |
||||
ninja -C ${BUILD_DIR} install |
||||
#ninja -C ${BUILD_DIR} test |
@ -0,0 +1,52 @@ |
||||
options = { |
||||
{"-Dopengl=", "full", "none", "es-egl"}, |
||||
{"--buildtype ", "plain", "debug", "release"}, |
||||
{"-Devas-modules ", "shared", "static"}, |
||||
} |
||||
|
||||
concated_options = {} |
||||
|
||||
for i,v in pairs(options) do |
||||
tmp_options = {} |
||||
|
||||
option_name = v[1] |
||||
|
||||
for i=2, #v do |
||||
table.insert(tmp_options, option_name..v[i]) |
||||
end |
||||
|
||||
table.insert(concated_options, tmp_options) |
||||
end |
||||
|
||||
function permutate(values) |
||||
local permutater = {table.unpack(values[1])} |
||||
|
||||
if #values == 1 then |
||||
return {table.unpack(values[1])} |
||||
else |
||||
local result = {} |
||||
table.remove(values, 1) |
||||
local list_to_complete = permutate(values) |
||||
|
||||
for k,v in pairs(list_to_complete) do |
||||
for k_perm,v_perm in pairs(permutater) do |
||||
table.insert(result, v_perm.." "..v) |
||||
end |
||||
end |
||||
return result |
||||
end |
||||
end |
||||
|
||||
all_options = permutate(concated_options) |
||||
|
||||
print("GOING TO BUILD ALOT OF EFL") |
||||
|
||||
for k,v in pairs(all_options) do |
||||
cmd = "sh ./scripts/check_options.sh "..v.." "..arg[1] |
||||
exitcode = os.execute(cmd) |
||||
if exitcode ~= true then |
||||
print("command "..cmd.." failed. ") |
||||
print(exitcode) |
||||
os.exit(-1) |
||||
end |
||||
end |