*
* 2012-09-22 16:34:22
* 2012-09-22T16:34:22
- * 1348331662 (seconds since the Epoch (1970-01-01 00:00 UTC))
+ * @1348331662 (seconds since the Epoch (1970-01-01 00:00 UTC))
* 2012-09-22 16:34 (seconds will be set to 0)
* 2012-09-22 (time will be set to 00:00:00)
* 16:34:22 (date will be set to today)
return r;
goto finish;
+ } else if (t[0] == '@') {
+ k = strptime(t + 1, "%s", &tm);
+ if (k && *k == 0)
+ goto finish;
+ return -EINVAL;
} else if (endswith(t, " ago")) {
char *z;
goto finish;
}
- tm = copy;
- k = strptime(t, "%s", &tm);
- if (k && *k == 0) {
- tm.tm_sec = 0;
- goto finish;
- }
-
return -EINVAL;
finish:
cc = meson.get_compiler('c')
conf = configuration_data()
+conf.set_quoted('PACKAGE', meson.project_name())
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
package_string = '@0@ @1@'.format(meson.project_name(), meson.project_version())
conf.set_quoted('PACKAGE_STRING', package_string)
-conf.set_quoted('PACKAGE_VERSION', meson.project_version())
codes = [''' {print $1} ''',
''' {sub("-.*","",$2); print $2} ''',
static : true,
required : need_static_libs ? get_option('readline') : disabler())
+if meson.version().version_compare('>= 0.59.0')
+ lib_intl = dependency(
+ 'intl',
+ required : get_option('nls'))
+ conf.set('ENABLE_NLS', lib_intl.found() ? 1 : false)
+else
+ if get_option('nls').enabled()
+ error('nls is not supported with meson before 0.59.0')
+ endif
+ lib_intl = dependency('', required : false)
+endif
+
lib_user = dependency(
'libuser',
version : '>= 0.58',
conf.set('HAVE_CRYPTSETUP', lib_cryptsetup.found() ? 1 : false)
if not get_option('cryptsetup').disabled() and get_option('cryptsetup-dlopen').enabled()
- lib_dl = cc.find_library(
- 'libdl',
- required : true)
+ if meson.version().version_compare('>= 0.62.0')
+ lib_dl = dependency('dl')
+ else
+ lib_dl = cc.find_library('dl')
+ endif
conf.set('CRYPTSETUP_VIA_DLOPEN', 1)
summary('cryptsetup support (dlopen)',
'enabled',
option('cryptsetup-dlopen', type : 'feature')
option('zlib', type : 'feature')
option('readline', type : 'feature')
+option('nls', type : 'feature')
option('libutil', type : 'feature')
option('libutempter', type : 'feature')
option('libpcre2-posix', type : 'feature')
#
# for example:
#
-# cat words.raw | egrep --invert-match "'s$" | \
-# egrep "^[[:alnum:]'&!,./-]+$" | \
+# cat words.raw | grep -E --invert-match "'s$" | \
+# grep -E "^[[:alnum:]'&!,./-]+$" | \
# sort --ignore-case --dictionary-order | \
# uniq > words
#