mathematical 1.6.11 → 1.6.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/ext/mathematical/lasem/po/LINGUAS +2 -0
- data/ext/mathematical/lasem/po/es.po +38 -18
- data/ext/mathematical/lasem/po/fur.po +101 -0
- data/ext/mathematical/lasem/po/lv.po +72 -29
- data/ext/mathematical/lasem/po/nl.po +102 -0
- data/ext/mathematical/lasem/po/sl.po +53 -18
- data/ext/mathematical/lasem/po/zh_CN.po +71 -34
- data/ext/mathematical/lasem/src/lasemrender.c +2 -2
- data/ext/mathematical/lasem/src/lsmcairo.c +1 -1
- data/ext/mathematical/lasem/src/lsmdomparser.c +7 -7
- data/ext/mathematical/lasem/src/lsmdomparser.h +3 -3
- data/ext/mathematical/lasem/src/lsmdomview.c +6 -6
- data/ext/mathematical/mtex2MML/CMakeLists.txt +6 -1
- data/ext/mathematical/mtex2MML/README.md +1 -1
- data/ext/mathematical/mtex2MML/script/bootstrap +21 -6
- data/ext/mathematical/mtex2MML/script/cibuild +4 -3
- data/ext/mathematical/mtex2MML/src/lexer.l +6 -3
- data/ext/mathematical/mtex2MML/src/libmtex2MML.pc.in +1 -1
- data/ext/mathematical/mtex2MML/src/parser.y +13 -1
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/not-1.html +1 -1
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/relations-1.html +1 -1
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/filter.html +1 -1
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_filter.html +1 -1
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.html +4 -4
- data/ext/mathematical/mtex2MML/tests/functions.c +9 -0
- data/ext/mathematical/mtex2MML/tests/mathjax.c +592 -592
- data/ext/mathematical/mtex2MML/tests/mathjax_generate.py +1 -1
- data/lib/mathematical/version.rb +1 -1
- metadata +38 -34
@@ -2,15 +2,15 @@
|
|
2
2
|
# Copyright (C) 2012 lasem's COPYRIGHT HOLDER
|
3
3
|
# This file is distributed under the same license as the lasem package.
|
4
4
|
#
|
5
|
-
# Matej Urbančič <mateju@svn.gnome.org>, 2012
|
5
|
+
# Matej Urbančič <mateju@svn.gnome.org>, + 2012–2017.
|
6
6
|
#
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
9
|
"Project-Id-Version: lasem master\n"
|
10
|
-
"Report-Msgid-Bugs-To:
|
11
|
-
"product=lasem&keywords=I18N+L10N&component=
|
12
|
-
"POT-Creation-Date:
|
13
|
-
"PO-Revision-Date:
|
10
|
+
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
|
11
|
+
"product=lasem&keywords=I18N+L10N&component=Other\n"
|
12
|
+
"POT-Creation-Date: 2017-09-20 12:19+0200\n"
|
13
|
+
"PO-Revision-Date: 2017-10-15 20:48+0200\n"
|
14
14
|
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
15
15
|
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
16
16
|
"Language: sl_SI\n"
|
@@ -20,54 +20,89 @@ msgstr ""
|
|
20
20
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
|
21
21
|
"%100==4 ? 3 : 0);\n"
|
22
22
|
"X-Poedit-SourceCharset: utf-8\n"
|
23
|
-
"X-Generator: Poedit
|
23
|
+
"X-Generator: Poedit 2.0.4\n"
|
24
24
|
|
25
|
-
#: ../src/lasemrender.c:
|
25
|
+
#: ../src/lasemrender.c:70
|
26
26
|
msgid "Output filename"
|
27
27
|
msgstr "Odvodno ime datoteke"
|
28
28
|
|
29
|
-
#: ../src/lasemrender.c:
|
29
|
+
#: ../src/lasemrender.c:72
|
30
30
|
msgid "Output format"
|
31
31
|
msgstr "Odvodni zapis"
|
32
32
|
|
33
|
-
#: ../src/lasemrender.c:
|
33
|
+
#: ../src/lasemrender.c:74
|
34
34
|
msgid "Pixel per inch"
|
35
35
|
msgstr "Točke na palec"
|
36
36
|
|
37
|
-
#: ../src/lasemrender.c:
|
37
|
+
#: ../src/lasemrender.c:76
|
38
38
|
msgid "Zoom"
|
39
39
|
msgstr "Približanje"
|
40
40
|
|
41
|
-
#: ../src/lasemrender.c:
|
41
|
+
#: ../src/lasemrender.c:78
|
42
|
+
msgid "Element id"
|
43
|
+
msgstr "ID predmeta"
|
44
|
+
|
45
|
+
#: ../src/lasemrender.c:80
|
46
|
+
msgid "Offset"
|
47
|
+
msgstr "Odmik"
|
48
|
+
|
49
|
+
#: ../src/lasemrender.c:82
|
50
|
+
msgid "Size"
|
51
|
+
msgstr "Velikost"
|
52
|
+
|
53
|
+
#: ../src/lasemrender.c:84
|
42
54
|
msgid "Debug domains"
|
43
55
|
msgstr "Domene razhroščevanja"
|
44
56
|
|
45
|
-
#: ../src/lasemrender.c:
|
57
|
+
#: ../src/lasemrender.c:97
|
58
|
+
msgid "Invalid document type (SVG expected)"
|
59
|
+
msgstr "Neveljavna vrsta dokumenta (pričakovan je zapis SVG)"
|
60
|
+
|
61
|
+
#: ../src/lasemrender.c:103
|
62
|
+
#, c-format
|
63
|
+
msgid "Element '%s' not found"
|
64
|
+
msgstr "Predmeta »%s« ni mogoče najti"
|
65
|
+
|
66
|
+
#: ../src/lasemrender.c:154
|
46
67
|
msgid "Option parsing failed:"
|
47
68
|
msgstr "Razčlenjevanje možnosti je spodletelo:"
|
48
69
|
|
49
|
-
#: ../src/lasemrender.c:
|
70
|
+
#: ../src/lasemrender.c:161
|
50
71
|
msgid "Invalid zoom value"
|
51
72
|
msgstr "Neveljavna vrednost približanja"
|
52
73
|
|
53
|
-
#: ../src/lasemrender.c:
|
74
|
+
#: ../src/lasemrender.c:170
|
75
|
+
msgid "Invalid number of arguments for offset option"
|
76
|
+
msgstr "Neveljavno število argumentov za možnost odmika"
|
77
|
+
|
78
|
+
#: ../src/lasemrender.c:180
|
79
|
+
msgid "Invalid number of arguments for size option"
|
80
|
+
msgstr "Neveljavno število argumentov za možnost velikosti"
|
81
|
+
|
82
|
+
#: ../src/lasemrender.c:185
|
83
|
+
msgid "Invalid export size"
|
84
|
+
msgstr "Neveljavna velikost izvoza"
|
85
|
+
|
86
|
+
#: ../src/lasemrender.c:193
|
54
87
|
msgid "Missing input filename"
|
55
88
|
msgstr "Manjka ime vhodne datoteke"
|
56
89
|
|
57
|
-
#: ../src/lasemrender.c:
|
90
|
+
#: ../src/lasemrender.c:204
|
58
91
|
msgid "Unknown format:"
|
59
92
|
msgstr "Neznan zapis:"
|
60
93
|
|
61
|
-
#: ../src/lasemrender.c:
|
94
|
+
#: ../src/lasemrender.c:244
|
62
95
|
msgid ""
|
63
96
|
"Don't know which format to use, please either give a format (-f) or an "
|
64
97
|
"output filename (-o)"
|
65
98
|
msgstr ""
|
99
|
+
"Ni navedeno kateri zapis naj bo uporabljen; podati je treba ali zapis (-f) "
|
100
|
+
"ali pa ime odvodne datoteke (-o)"
|
66
101
|
|
67
|
-
#: ../src/lasemrender.c:
|
102
|
+
#: ../src/lasemrender.c:355
|
68
103
|
#, c-format
|
69
104
|
msgid "Can't load '%s'"
|
70
|
-
msgstr "
|
105
|
+
msgstr "Datoteke »%s« ni mogoče naložiti"
|
71
106
|
|
72
107
|
#~ msgid "Option parsing failed: %s\n"
|
73
108
|
#~ msgstr "Razčlenjevanje možnosti je spodletelo: %s\n"
|
@@ -1,63 +1,100 @@
|
|
1
|
-
# Chinese (China) translation
|
2
|
-
# Copyright (C)
|
1
|
+
# Chinese (China) translation of lasem
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
3
|
# This file is distributed under the same license as the lasem package.
|
4
|
-
#
|
4
|
+
# Yuqing Wu <yuqingwucn.pl@gmail.com>, 2015.
|
5
|
+
# Aron Xu <happyaron.xu@gmail.com>, 2017.
|
5
6
|
#
|
6
7
|
msgid ""
|
7
8
|
msgstr ""
|
8
|
-
"Project-Id-Version:
|
9
|
-
"Report-Msgid-Bugs-To:
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"Language-Team: Chinese (Simplified) <i18n-zh@googlegroups.com>\n"
|
9
|
+
"Project-Id-Version: \n"
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
11
|
+
"POT-Creation-Date: 2017-02-10 18:33+0800\n"
|
12
|
+
"PO-Revision-Date: 2017-02-10 18:35+0800\n"
|
13
|
+
"Last-Translator: Yuqing Wu <yuqingwucn.pl@gmail.com>\n"
|
14
|
+
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
15
15
|
"Language: zh_CN\n"
|
16
16
|
"MIME-Version: 1.0\n"
|
17
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
18
18
|
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"X-Generator: Poedit 1.7.1\n"
|
20
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
19
21
|
|
20
|
-
#: ../src/lasemrender.c:
|
22
|
+
#: ../src/lasemrender.c:70
|
21
23
|
msgid "Output filename"
|
22
|
-
msgstr "
|
24
|
+
msgstr "输出文件名"
|
23
25
|
|
24
|
-
#: ../src/lasemrender.c:
|
26
|
+
#: ../src/lasemrender.c:72
|
25
27
|
msgid "Output format"
|
26
28
|
msgstr "输出格式"
|
27
29
|
|
28
|
-
#: ../src/lasemrender.c:
|
30
|
+
#: ../src/lasemrender.c:74
|
29
31
|
msgid "Pixel per inch"
|
30
|
-
msgstr "
|
32
|
+
msgstr "每英寸像素数"
|
31
33
|
|
32
|
-
#: ../src/lasemrender.c:
|
34
|
+
#: ../src/lasemrender.c:76
|
33
35
|
msgid "Zoom"
|
34
|
-
msgstr "
|
36
|
+
msgstr "放大"
|
35
37
|
|
36
|
-
#: ../src/lasemrender.c:
|
38
|
+
#: ../src/lasemrender.c:78
|
39
|
+
msgid "Element id"
|
40
|
+
msgstr "元素 ID"
|
41
|
+
|
42
|
+
#: ../src/lasemrender.c:80
|
43
|
+
msgid "Offset"
|
44
|
+
msgstr "偏移"
|
45
|
+
|
46
|
+
#: ../src/lasemrender.c:82
|
47
|
+
msgid "Size"
|
48
|
+
msgstr "尺寸"
|
49
|
+
|
50
|
+
#: ../src/lasemrender.c:84
|
37
51
|
msgid "Debug domains"
|
38
52
|
msgstr "调试域"
|
39
53
|
|
40
|
-
#: ../src/lasemrender.c:
|
41
|
-
|
42
|
-
|
43
|
-
msgstr "解析选项失败:%s\n"
|
54
|
+
#: ../src/lasemrender.c:97
|
55
|
+
msgid "Invalid document type (SVG expected)"
|
56
|
+
msgstr "无效的文档类型(应为 SVG)"
|
44
57
|
|
45
|
-
#: ../src/lasemrender.c:
|
58
|
+
#: ../src/lasemrender.c:103
|
46
59
|
#, c-format
|
60
|
+
msgid "Element '%s' not found"
|
61
|
+
msgstr "未找到元素 %s"
|
62
|
+
|
63
|
+
#: ../src/lasemrender.c:154
|
64
|
+
msgid "Option parsing failed:"
|
65
|
+
msgstr "选项解析失败:"
|
66
|
+
|
67
|
+
#: ../src/lasemrender.c:161
|
47
68
|
msgid "Invalid zoom value"
|
48
69
|
msgstr "无效的缩放值"
|
49
70
|
|
50
|
-
#: ../src/lasemrender.c:
|
51
|
-
|
52
|
-
|
53
|
-
msgstr "需要一个输入文件名\n"
|
71
|
+
#: ../src/lasemrender.c:170
|
72
|
+
msgid "Invalid number of arguments for offset option"
|
73
|
+
msgstr ""
|
54
74
|
|
55
|
-
#: ../src/lasemrender.c:
|
56
|
-
|
57
|
-
|
58
|
-
|
75
|
+
#: ../src/lasemrender.c:180
|
76
|
+
msgid "Invalid number of arguments for size option"
|
77
|
+
msgstr ""
|
78
|
+
|
79
|
+
#: ../src/lasemrender.c:185
|
80
|
+
msgid "Invalid export size"
|
81
|
+
msgstr "无效的导出尺寸"
|
82
|
+
|
83
|
+
#: ../src/lasemrender.c:193
|
84
|
+
msgid "Missing input filename"
|
85
|
+
msgstr "缺少输出文件名"
|
86
|
+
|
87
|
+
#: ../src/lasemrender.c:204
|
88
|
+
msgid "Unknown format:"
|
89
|
+
msgstr "未知格式:"
|
90
|
+
|
91
|
+
#: ../src/lasemrender.c:244
|
92
|
+
msgid ""
|
93
|
+
"Don't know which format to use, please either give a format (-f) or an "
|
94
|
+
"output filename (-o)"
|
95
|
+
msgstr ""
|
59
96
|
|
60
|
-
#: ../src/lasemrender.c:
|
97
|
+
#: ../src/lasemrender.c:355
|
61
98
|
#, c-format
|
62
|
-
msgid "Can't load '%s'
|
63
|
-
msgstr "
|
99
|
+
msgid "Can't load '%s'"
|
100
|
+
msgstr "无法加载 %s"
|
@@ -269,13 +269,13 @@ main(int argc, char **argv)
|
|
269
269
|
|
270
270
|
if (document != NULL) {
|
271
271
|
if (lsm_debug_check (&lsm_debug_category_dom, LSM_DEBUG_LEVEL_LOG)) {
|
272
|
-
|
272
|
+
char *buffer;
|
273
273
|
gsize size;
|
274
274
|
|
275
275
|
lsm_dom_document_save_to_memory (document, &buffer, &size, NULL);
|
276
276
|
|
277
277
|
if (buffer != NULL) {
|
278
|
-
printf ("%*s\n", (int) size,
|
278
|
+
printf ("%*s\n", (int) size, buffer);
|
279
279
|
g_free (buffer);
|
280
280
|
}
|
281
281
|
}
|
@@ -528,7 +528,7 @@ lsm_cairo_set_source_pixbuf (cairo_t *cairo,
|
|
528
528
|
format = CAIRO_FORMAT_ARGB32;
|
529
529
|
|
530
530
|
cairo_stride = cairo_format_stride_for_width (format, width);
|
531
|
-
cairo_pixels =
|
531
|
+
cairo_pixels = g_malloc_n (height, cairo_stride);
|
532
532
|
surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
|
533
533
|
format,
|
534
534
|
width, height, cairo_stride);
|
@@ -259,7 +259,7 @@ typedef enum {
|
|
259
259
|
|
260
260
|
static LsmDomDocument *
|
261
261
|
_parse_memory (LsmDomDocument *document, LsmDomNode *node,
|
262
|
-
const
|
262
|
+
const char *buffer, gssize size, GError **error)
|
263
263
|
{
|
264
264
|
static LsmDomSaxParserState state;
|
265
265
|
|
@@ -304,7 +304,7 @@ _parse_memory (LsmDomDocument *document, LsmDomNode *node,
|
|
304
304
|
|
305
305
|
void
|
306
306
|
lsm_dom_document_append_from_memory (LsmDomDocument *document, LsmDomNode *node,
|
307
|
-
const
|
307
|
+
const char *buffer, gssize size, GError **error)
|
308
308
|
{
|
309
309
|
g_return_if_fail (LSM_IS_DOM_DOCUMENT (document));
|
310
310
|
g_return_if_fail (LSM_IS_DOM_NODE (node) || node == NULL);
|
@@ -323,11 +323,11 @@ lsm_dom_document_append_from_memory (LsmDomDocument *document, LsmDomNode *node,
|
|
323
323
|
*/
|
324
324
|
|
325
325
|
LsmDomDocument *
|
326
|
-
lsm_dom_document_new_from_memory (const
|
326
|
+
lsm_dom_document_new_from_memory (const char *buffer, gssize size, GError **error)
|
327
327
|
{
|
328
328
|
g_return_val_if_fail (buffer != NULL, NULL);
|
329
329
|
|
330
|
-
return _parse_memory (NULL, NULL, buffer, size, error);
|
330
|
+
return _parse_memory (NULL, NULL, buffer, size, error);
|
331
331
|
}
|
332
332
|
|
333
333
|
/**
|
@@ -432,15 +432,15 @@ lsm_dom_document_save_to_stream (LsmDomDocument *document, GOutputStream *stream
|
|
432
432
|
/**
|
433
433
|
* lsm_dom_document_save_to_memory:
|
434
434
|
* @document: a #LsmDomDocument
|
435
|
-
* @buffer: placeholder for a pointer to the resulting data buffer
|
436
|
-
* @size: placeholder for the data size
|
435
|
+
* @buffer: (out callee-allocates): placeholder for a pointer to the resulting data buffer
|
436
|
+
* @size: (out) (optional): placeholder for the data size
|
437
437
|
* @error: placeholder for a #GError
|
438
438
|
*
|
439
439
|
* Save @document as an xml representation into @buffer.
|
440
440
|
*/
|
441
441
|
|
442
442
|
void
|
443
|
-
lsm_dom_document_save_to_memory (LsmDomDocument *document,
|
443
|
+
lsm_dom_document_save_to_memory (LsmDomDocument *document, char **buffer, gsize *size, GError **error)
|
444
444
|
{
|
445
445
|
GOutputStream *stream;
|
446
446
|
|
@@ -30,8 +30,8 @@
|
|
30
30
|
G_BEGIN_DECLS
|
31
31
|
|
32
32
|
void lsm_dom_document_append_from_memory (LsmDomDocument *document, LsmDomNode *node,
|
33
|
-
const
|
34
|
-
LsmDomDocument * lsm_dom_document_new_from_memory (const
|
33
|
+
const char *buffer, gssize size, GError **error);
|
34
|
+
LsmDomDocument * lsm_dom_document_new_from_memory (const char *buffer, gssize size, GError **error);
|
35
35
|
LsmDomDocument * lsm_dom_document_new_from_path (const char *path, GError **error);
|
36
36
|
LsmDomDocument * lsm_dom_document_new_from_url (const char *url, GError **error);
|
37
37
|
|
@@ -39,7 +39,7 @@ void lsm_dom_document_save_to_stream (LsmDomDocument *document,
|
|
39
39
|
GOutputStream *stream,
|
40
40
|
GError **error);
|
41
41
|
void lsm_dom_document_save_to_memory (LsmDomDocument *document,
|
42
|
-
|
42
|
+
char **buffer,
|
43
43
|
gsize *size,
|
44
44
|
GError **error);
|
45
45
|
void lsm_dom_document_save_to_path (LsmDomDocument *document,
|
@@ -145,9 +145,9 @@ lsm_dom_view_get_viewport_pixels (LsmDomView *self)
|
|
145
145
|
/**
|
146
146
|
* lsm_dom_view_get_size:
|
147
147
|
* @view: a #LsmDomView
|
148
|
-
* @width: view width placeholder, in points
|
149
|
-
* @height: view height placeholder, in points
|
150
|
-
* @baseline: view baseline, in points
|
148
|
+
* @width: (out) (optional): view width placeholder, in points
|
149
|
+
* @height: (out) (optional): view height placeholder, in points
|
150
|
+
* @baseline: (out) (optional): view baseline, in points
|
151
151
|
*
|
152
152
|
* Get the view size and baseline. Baseline is for use of view inside bloc of text.
|
153
153
|
*/
|
@@ -175,9 +175,9 @@ lsm_dom_view_get_size (LsmDomView *view, double *width, double *height, double *
|
|
175
175
|
/**
|
176
176
|
* lsm_dom_view_get_size_pixels:
|
177
177
|
* @view: a #LsmDomView
|
178
|
-
* @width: view width placeholder, in pixels
|
179
|
-
* @height: view height placeholder, in pixels
|
180
|
-
* @baseline: view baseline, in pixels
|
178
|
+
* @width: (out) (optional): view width placeholder, in pixels
|
179
|
+
* @height: (out) (optional): view height placeholder, in pixels
|
180
|
+
* @baseline: (out) (optional): view baseline, in pixels
|
181
181
|
*
|
182
182
|
* Get the view size and baseline. Baseline is for use of view inside bloc of text.
|
183
183
|
*/
|
@@ -42,7 +42,7 @@ set(MTEX2MML_VERSION_STRING "${MTEX2MML_VERSION_MAJOR}.${MTEX2MML_VERSION_MINOR}
|
|
42
42
|
#
|
43
43
|
set(BIN_INSTALL_DIR bin CACHE PATH "Where to install binaries to.")
|
44
44
|
set(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.")
|
45
|
-
set(INCLUDE_INSTALL_DIR include CACHE PATH "Where to install headers to.")
|
45
|
+
set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME} CACHE PATH "Where to install headers to.")
|
46
46
|
|
47
47
|
#
|
48
48
|
#
|
@@ -107,6 +107,11 @@ add_library(${STATICLIBRARY} STATIC
|
|
107
107
|
)
|
108
108
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/libmtex2MML.pc.in
|
109
109
|
${CMAKE_CURRENT_BINARY_DIR}/libmtex2MML.pc @ONLY)
|
110
|
+
|
111
|
+
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${BIN_INSTALL_DIR})
|
112
|
+
install(TARGETS ${LIBRARY} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
113
|
+
install(TARGETS ${STATICLIBRARY} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
114
|
+
install(FILES ${SRC_H} DESTINATION ${INCLUDE_INSTALL_DIR})
|
110
115
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmtex2MML.pc
|
111
116
|
DESTINATION lib/pkgconfig)
|
112
117
|
|
@@ -88,7 +88,7 @@ To build mtex2MML, you need:
|
|
88
88
|
* [Flex](http://flex.sourceforge.net/)
|
89
89
|
* [Python3](https://www.python.org/) (just for the tests)
|
90
90
|
|
91
|
-
### OS X and
|
91
|
+
### OS X (brew or macports), Ubuntu and Arch Linux
|
92
92
|
|
93
93
|
To fetch dependencies, build, and run the library, call:
|
94
94
|
|
@@ -6,18 +6,33 @@ echo "==> Installing required libraries…"
|
|
6
6
|
|
7
7
|
if [ "$(uname)" == "Darwin" ]; then
|
8
8
|
for pkg in flex bison cmake valgrind; do
|
9
|
-
if
|
9
|
+
if hash port 2>/dev/null; then
|
10
|
+
if port installed $pkg | grep active | awk '{print $1};'; then
|
10
11
|
echo "Package '$pkg' is installed"
|
11
|
-
|
12
|
+
else
|
12
13
|
echo "Package '$pkg' is not installed"
|
13
|
-
|
14
|
+
port install $pkg
|
15
|
+
fi
|
16
|
+
else
|
17
|
+
if brew list -1 | grep -q "^${pkg}\$"; then
|
18
|
+
echo "Package '$pkg' is installed"
|
19
|
+
else
|
20
|
+
echo "Package '$pkg' is not installed"
|
21
|
+
if [ "$pkg" != "valgrind" ]; then
|
22
|
+
brew install $pkg
|
23
|
+
fi
|
24
|
+
fi
|
14
25
|
fi
|
15
26
|
done
|
16
27
|
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
17
|
-
if [ -
|
18
|
-
sudo
|
28
|
+
if [ -f "/etc/arch-release" ]; then
|
29
|
+
sudo pacman --needed -S flex bison cmake valgrind
|
19
30
|
else
|
20
|
-
|
31
|
+
if [ -z "$TRAVIS" ]; then
|
32
|
+
sudo apt-get -qq -y install flex bison cmake valgrind
|
33
|
+
else
|
34
|
+
echo "Packages already installed on Travis CI."
|
35
|
+
fi
|
21
36
|
fi
|
22
37
|
fi
|
23
38
|
|