forked from enlightenment/terminology
Merge remote-tracking branch 'origin/devs/iscaro/meson'
This commit is contained in:
commit
b22a64043f
7
README
7
README
|
@ -29,6 +29,13 @@ Once you have met requirements, compiling and installing is simple:
|
|||
make
|
||||
make install
|
||||
|
||||
To build using meson:
|
||||
|
||||
meson build
|
||||
cd build
|
||||
ninja
|
||||
ninja install
|
||||
|
||||
Note: to make terminology work with input methods in general you need:
|
||||
|
||||
export ECORE_IMF_MODULE="xim"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
files = ['mystic.png', 'texture_background.png']
|
||||
install_data(files,
|
||||
install_dir: join_paths(get_option('datadir'),
|
||||
'terminology', 'backgrounds'))
|
|
@ -0,0 +1,2 @@
|
|||
install_data('terminology.desktop',
|
||||
install_dir: join_paths(get_option('datadir'), 'applications'))
|
|
@ -0,0 +1,27 @@
|
|||
files = ['10x20.pcf',
|
||||
'4x6.pcf',
|
||||
'5x7.pcf',
|
||||
'5x8.pcf',
|
||||
'6x10.pcf',
|
||||
'6x12.pcf',
|
||||
'6x13.pcf',
|
||||
'6x9.pcf',
|
||||
'7x13.pcf',
|
||||
'7x14.pcf',
|
||||
'8x13.pcf',
|
||||
'9x15.pcf',
|
||||
'9x18.pcf',
|
||||
'nexus.pcf',
|
||||
'terminus-12.pcf',
|
||||
'terminus-14-bold.pcf',
|
||||
'terminus-14.pcf',
|
||||
'terminus-16-bold.pcf',
|
||||
'terminus-16.pcf',
|
||||
'terminus-18-bold.pcf',
|
||||
'terminus-18.pcf',
|
||||
'terminus-20-bold.pcf',
|
||||
'terminus-20.pcf',
|
||||
'TERMINUS.txt',
|
||||
'XFONT.txt']
|
||||
install_data(files, install_dir: join_paths(get_option('datadir'),
|
||||
meson.project_name(), 'fonts'))
|
|
@ -0,0 +1,2 @@
|
|||
install_data('terminology.png',
|
||||
install_dir: join_paths(get_option('datadir'), 'icons'))
|
|
@ -0,0 +1,3 @@
|
|||
install_data('terminology.png',
|
||||
install_dir: join_paths(get_option('datadir'),
|
||||
meson.project_name(), 'images'))
|
|
@ -0,0 +1,6 @@
|
|||
subdir('desktop')
|
||||
subdir('icons')
|
||||
subdir('images')
|
||||
subdir('fonts')
|
||||
subdir('themes')
|
||||
subdir('backgrounds')
|
|
@ -0,0 +1,35 @@
|
|||
command = [edje_cc,
|
||||
'-id', join_paths(meson.source_root(), 'data', 'themes', 'images'),
|
||||
'-fd', join_paths(meson.source_root(), 'data', 'fonts'),
|
||||
'-sd', join_paths(meson.source_root(), 'data', 'themes', 'sounds'),
|
||||
'@INPUT@',
|
||||
'@OUTPUT@']
|
||||
|
||||
edje_to_compile = [
|
||||
['default', ['default_colors.in.edc']],
|
||||
['mild', ['default_colors.in.edc']],
|
||||
['black', ['default_colors.in.edc', 'mild.edc']],
|
||||
['solarized', ['default_colors.in.edc', 'default.edc']],
|
||||
['solarized_light', ['default_colors.in.edc', 'default.edc']],
|
||||
['mustang',['default_colors.in.edc', 'mild.edc']],
|
||||
['base16_ocean_dark', ['default_colors.in.edc']],
|
||||
['smyck', ['default_colors.in.edc', 'mild.edc']]
|
||||
]
|
||||
|
||||
edje_install_dir = join_paths(get_option('datadir'),
|
||||
meson.project_name(), 'themes')
|
||||
|
||||
foreach to_compile: edje_to_compile
|
||||
out = to_compile[0] + '.edj'
|
||||
in = to_compile[0] + '.edc'
|
||||
edj_targets += [custom_target(out,
|
||||
install:true,
|
||||
install_dir: edje_install_dir,
|
||||
depend_files: files(to_compile[1]),
|
||||
command: command,
|
||||
input: in,
|
||||
output: out)]
|
||||
edj_files += [join_paths(edje_install_dir, out)]
|
||||
endforeach
|
||||
|
||||
subdir('nyanology')
|
|
@ -0,0 +1,19 @@
|
|||
command = [edje_cc,
|
||||
'-id', join_paths(meson.source_root(), 'data', 'themes',
|
||||
'nyanology', 'images'),
|
||||
'-id', join_paths(meson.source_root(), 'data', 'themes', 'images'),
|
||||
'-fd', join_paths(meson.source_root(), 'data', 'fonts'),
|
||||
'-sd', join_paths(meson.source_root(), 'data', 'themes', 'sounds'),
|
||||
'@INPUT@',
|
||||
'@OUTPUT@']
|
||||
|
||||
edj_targets += [custom_target('nyanology.edj',
|
||||
install:true,
|
||||
depend_files: files(['about.edc',
|
||||
'nyancursor.edc']),
|
||||
install_dir: edje_install_dir,
|
||||
command: command,
|
||||
input:'nyanology.edc',
|
||||
output:'nyanology.edj')]
|
||||
|
||||
edj_files += [join_paths(edje_install_dir, 'nyanology.edj')]
|
|
@ -0,0 +1 @@
|
|||
install_man('terminology.1')
|
|
@ -0,0 +1,158 @@
|
|||
project('terminology', 'c',
|
||||
version: '1.0.99',
|
||||
default_options: ['c_std=gnu99'],
|
||||
license: 'BSD')
|
||||
|
||||
spec_data = configuration_data()
|
||||
spec_data.set('PACKAGE', meson.project_name())
|
||||
spec_data.set('VERSION', meson.project_version())
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
prefix = get_option('prefix')
|
||||
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
|
||||
config_data = configuration_data()
|
||||
config_data.set('EFL_BETA_API_SUPPORT', 1)
|
||||
config_data.set('EFL_EO_API_SUPPORT', 1)
|
||||
config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
config_data.set_quoted('PACKAGE', meson.project_name())
|
||||
config_data.set_quoted('PACKAGE_BUGREPORT',
|
||||
'enlightenment-devel@lists.sourceforge.net')
|
||||
config_data.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||
config_data.set_quoted('PACKAGE_TARNAME', meson.project_name())
|
||||
config_data.set_quoted('PACKAGE_URL',
|
||||
'https://www.enlightenment.org/about-terminology')
|
||||
config_data.set_quoted('PACKAGE_BIN_DIR',
|
||||
join_paths(prefix, get_option('bindir')))
|
||||
config_data.set_quoted('PACKAGE_DATA_DIR',
|
||||
join_paths(prefix, get_option('datadir'),
|
||||
meson.project_name()))
|
||||
config_data.set_quoted('PACKAGE_LIB_DIR',
|
||||
join_paths(prefix, get_option('libdir')))
|
||||
config_data.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
|
||||
config_data.set('_GNU_SOURCE', 1)
|
||||
config_data.set('__EXTENSIONS__', 1)
|
||||
config_data.set('_POSIX_PTHREAD_SEMANTICS', 1)
|
||||
config_data.set('_TANDEM_SOURCE', 1)
|
||||
config_data.set('_ALL_SOURCE', 1)
|
||||
config_data.set('_POSIX_SOURCE', 1)
|
||||
config_data.set('_POSIX_1_SOURCE', 1)
|
||||
|
||||
efl_version = '1.8.0'
|
||||
efl_deps = ['edje',
|
||||
'elementary',
|
||||
'eina',
|
||||
'eet',
|
||||
'evas',
|
||||
'ecore',
|
||||
'ecore-evas',
|
||||
'ecore-file',
|
||||
'emotion',
|
||||
'ecore-input',
|
||||
'ecore-imf',
|
||||
'ecore-imf-evas',
|
||||
'ecore-ipc',
|
||||
'efreet',
|
||||
'ecore-con',
|
||||
'ethumb_client']
|
||||
terminology_dependencies = []
|
||||
edje_cc_path = ''
|
||||
edj_targets = []
|
||||
edj_files = []
|
||||
use_translations = false
|
||||
intl_lib = cc.find_library('intl', required: false)
|
||||
if intl_lib.found()
|
||||
config_data.set('HAVE_GETTEXT', 1)
|
||||
config_data.set('ENABLE_NLS', 1)
|
||||
terminology_dependencies += [intl_lib]
|
||||
use_translations = true
|
||||
else
|
||||
gettext_code = '''
|
||||
#include <libintl.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
(void)ngettext("", "", 0);
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
if cc.links(gettext_code)
|
||||
config_data.set('HAVE_GETTEXT', 1)
|
||||
config_data.set('ENABLE_NLS', 1)
|
||||
use_translations = true
|
||||
endif
|
||||
endif
|
||||
|
||||
foreach efl_dep: efl_deps
|
||||
dep = dependency(efl_dep, version: '>=' + efl_version)
|
||||
terminology_dependencies += [dep]
|
||||
if efl_dep == 'edje'
|
||||
edje_cc_path = dep.get_pkgconfig_variable('prefix') + '/bin/edje_cc'
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if cc.has_function('mkstemps')
|
||||
config_data.set('HAVE_MKSTEMPS', 1)
|
||||
endif
|
||||
|
||||
url_head_code = '''#include <Ecore_Con.h>
|
||||
int main(int argc, char *argv[]) { ecore_con_url_head(NULL); return 0; }
|
||||
'''
|
||||
|
||||
elementary_teamwork_code = '''#include <Elementary.h>
|
||||
int main(int argc, char *argv[]) { elm_win_teamwork_uri_show(NULL); return 0; }
|
||||
'''
|
||||
|
||||
found = 'Not found'
|
||||
|
||||
if cc.links(url_head_code, dependencies: terminology_dependencies)
|
||||
config_data.set('HAVE_ECORE_CON_URL_HEAD', 1)
|
||||
found = 'Found'
|
||||
endif
|
||||
|
||||
message('Checking for ecore_con_url_head: ' + found)
|
||||
|
||||
if cc.links(elementary_teamwork_code, dependencies: terminology_dependencies)
|
||||
config_dat.set('HAVE_ELM_WIN_TEAMWORK', 1)
|
||||
found = 'Found'
|
||||
else
|
||||
found = 'Not Found'
|
||||
endif
|
||||
|
||||
message('Checking for elm_win_teamwork_uri_show: ' + found)
|
||||
|
||||
edje_cc = get_option('edje-cc')
|
||||
|
||||
if edje_cc == ''
|
||||
edje_cc = edje_cc_path
|
||||
endif
|
||||
|
||||
fuzzing = get_option('fuzzing')
|
||||
|
||||
if fuzzing
|
||||
config_data.set('ENABLE_FUZZING', 1)
|
||||
message('Fuzzing is enabled')
|
||||
else
|
||||
message('Fuzzing is disbled')
|
||||
endif
|
||||
|
||||
message('edje_cc set to:' + edje_cc)
|
||||
|
||||
configure_file(output: 'terminology_config.h',
|
||||
configuration: config_data)
|
||||
|
||||
configure_file(input: 'terminology.spec.in',
|
||||
output: 'terminology.spec',
|
||||
configuration: spec_data)
|
||||
|
||||
configure_file(input: join_paths('pkgbuild', 'PKGBUILD.in'),
|
||||
output: 'PKGBUILD',
|
||||
configuration: spec_data)
|
||||
|
||||
config_dir = include_directories('.')
|
||||
subdir('data')
|
||||
subdir('man')
|
||||
if use_translations
|
||||
subdir('po')
|
||||
endif
|
||||
subdir('src/bin')
|
||||
|
||||
meson.add_install_script('meson_install_themes.sh', edj_files)
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
for x in "$@" ; do
|
||||
chmod 644 "$MESON_INSTALL_DESTDIR_PREFIX/$x"
|
||||
done
|
|
@ -0,0 +1,7 @@
|
|||
option('edje-cc',
|
||||
type: 'string',
|
||||
description: 'A path to a edje_cc. Defaults to system\'s edje_cc')
|
||||
option('fuzzing',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'Enable fuzzing on terminology. Binaries are not suited for production.')
|
|
@ -0,0 +1,29 @@
|
|||
i18n = import('i18n')
|
||||
i18n.gettext('terminology',
|
||||
languages: [
|
||||
'ca',
|
||||
'de',
|
||||
'el',
|
||||
'eo',
|
||||
'es',
|
||||
'fi',
|
||||
'fr',
|
||||
'hi',
|
||||
'it',
|
||||
'ko',
|
||||
'ms',
|
||||
'sl',
|
||||
'sr',
|
||||
'tr',
|
||||
'vi'
|
||||
],
|
||||
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'
|
||||
])
|
|
@ -0,0 +1,104 @@
|
|||
terminology_sources = ['private.h',
|
||||
'about.c', 'about.h',
|
||||
'col.c', 'col.h',
|
||||
'config.c', 'config.h',
|
||||
'controls.c', 'controls.h',
|
||||
'ipc.c', 'ipc.h',
|
||||
'keyin.c', 'keyin.h',
|
||||
'main.c', 'main.h',
|
||||
'media.c', 'media.h',
|
||||
'options.c', 'options.h',
|
||||
'options_font.c', 'options_font.h',
|
||||
'options_theme.c', 'options_theme.h',
|
||||
'options_themepv.c', 'options_themepv.h',
|
||||
'options_wallpaper.c', 'options_wallpaper.h',
|
||||
'options_colors.c', 'options_colors.h',
|
||||
'options_behavior.c', 'options_behavior.h',
|
||||
'options_keys.c', 'options_keys.h',
|
||||
'options_helpers.c', 'options_helpers.h',
|
||||
'options_video.c', 'options_video.h',
|
||||
'options_elm.c', 'options_elm.h',
|
||||
'sel.c', 'sel.h',
|
||||
'miniview.c', 'miniview.h',
|
||||
'termio.c', 'termio.h',
|
||||
'termcmd.c', 'termcmd.h',
|
||||
'term_container.h',
|
||||
'termiolink.c', 'termiolink.h',
|
||||
'termpty.c', 'termpty.h',
|
||||
'termptydbl.c', 'termptydbl.h',
|
||||
'termptyesc.c', 'termptyesc.h',
|
||||
'termptyops.c', 'termptyops.h',
|
||||
'termptygfx.c', 'termptygfx.h',
|
||||
'termptyext.c', 'termptyext.h',
|
||||
'termptysave.c', 'termptysave.h',
|
||||
'lz4/lz4.c', 'lz4/lz4.h',
|
||||
'md5/md5.c', 'md5/md5.h',
|
||||
'utf8.c', 'utf8.h',
|
||||
'win.c', 'win.h',
|
||||
'utils.c', 'utils.h',
|
||||
'extns.c', 'extns.h',
|
||||
'gravatar.c', 'gravatar.h',
|
||||
'tty_keys.h',
|
||||
'sb.c', 'sb.h']
|
||||
|
||||
tybg_sources = ['tycommon.c', 'tycommon.h', 'tybg.c']
|
||||
tyalpha_sources = ['tycommon.c', 'tycommon.h', 'tyalpha.c']
|
||||
typop_sources = ['tycommon.c', 'tycommon.h', 'typop.c']
|
||||
tyq_sources = ['tycommon.c', 'tycommon.h', 'tyq.c']
|
||||
tycat_sources = ['tycommon.c', 'tycommon.h', 'tycat.c', 'extns.c', 'extns.h']
|
||||
tyls_sources = ['extns.c', 'extns.h', 'tyls.c', 'tycommon.c', 'tycommon.h']
|
||||
tyfuzz_sources = ['termptyesc.c', 'termptyesc.h',
|
||||
'termptysave.c', 'termptysave.h',
|
||||
'termptyops.c', 'termptyops.h',
|
||||
'termptydbl.c', 'termptydbl.h',
|
||||
'termptyext.c', 'termptyext.h',
|
||||
'termptygfx.c', 'termptygfx.h',
|
||||
'termpty.c', 'termpty.h',
|
||||
'config.c', 'config.h',
|
||||
'col.c', 'col.h',
|
||||
'tyfuzz.c']
|
||||
|
||||
executable('terminology',
|
||||
terminology_sources,
|
||||
edj_targets,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('tybg',
|
||||
tybg_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('tyalpha',
|
||||
tyalpha_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('typop',
|
||||
typop_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('tyq',
|
||||
tyq_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('tycat',
|
||||
tycat_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
executable('tyls',
|
||||
tyls_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
|
||||
if fuzzing
|
||||
executable('tyfuzz',
|
||||
tyfuzz_sources,
|
||||
install: true,
|
||||
include_directories: config_dir,
|
||||
dependencies: terminology_dependencies)
|
||||
endif
|
Loading…
Reference in New Issue