sassc 2.0.1 → 2.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.gitmodules +1 -1
  4. data/.travis.yml +7 -3
  5. data/CHANGELOG.md +3 -0
  6. data/CODE_OF_CONDUCT.md +1 -1
  7. data/README.md +1 -1
  8. data/Rakefile +23 -8
  9. data/ext/extconf.rb +39 -0
  10. data/ext/libsass/.gitignore +1 -0
  11. data/ext/libsass/GNUmakefile.am +23 -39
  12. data/ext/libsass/Makefile +56 -91
  13. data/ext/libsass/Makefile.conf +16 -2
  14. data/ext/libsass/configure.ac +8 -12
  15. data/ext/libsass/include/sass/base.h +1 -0
  16. data/ext/libsass/include/sass/context.h +1 -1
  17. data/ext/libsass/src/GNUmakefile.am +1 -5
  18. data/ext/libsass/src/ast.cpp +747 -2010
  19. data/ext/libsass/src/ast.hpp +239 -2383
  20. data/ext/libsass/src/{to_c.cpp → ast2c.cpp} +22 -16
  21. data/ext/libsass/src/ast2c.hpp +39 -0
  22. data/ext/libsass/src/ast_def_macros.hpp +62 -10
  23. data/ext/libsass/src/ast_fwd_decl.cpp +1 -0
  24. data/ext/libsass/src/ast_fwd_decl.hpp +43 -165
  25. data/ext/libsass/src/ast_sel_cmp.cpp +909 -0
  26. data/ext/libsass/src/ast_sel_unify.cpp +280 -0
  27. data/ext/libsass/src/ast_selectors.cpp +1475 -0
  28. data/ext/libsass/src/ast_selectors.hpp +568 -0
  29. data/ext/libsass/src/ast_supports.cpp +130 -0
  30. data/ext/libsass/src/ast_supports.hpp +121 -0
  31. data/ext/libsass/src/ast_values.cpp +967 -0
  32. data/ext/libsass/src/ast_values.hpp +489 -0
  33. data/ext/libsass/src/backtrace.cpp +4 -0
  34. data/ext/libsass/src/base64vlq.cpp +3 -0
  35. data/ext/libsass/src/bind.cpp +18 -17
  36. data/ext/libsass/src/bind.hpp +3 -1
  37. data/ext/libsass/src/c2ast.cpp +64 -0
  38. data/ext/libsass/src/c2ast.hpp +14 -0
  39. data/ext/libsass/src/cencode.c +2 -2
  40. data/ext/libsass/src/check_nesting.cpp +52 -56
  41. data/ext/libsass/src/check_nesting.hpp +35 -34
  42. data/ext/libsass/src/color_maps.cpp +156 -153
  43. data/ext/libsass/src/color_maps.hpp +152 -152
  44. data/ext/libsass/src/constants.cpp +15 -0
  45. data/ext/libsass/src/constants.hpp +13 -0
  46. data/ext/libsass/src/context.cpp +24 -14
  47. data/ext/libsass/src/context.hpp +6 -6
  48. data/ext/libsass/src/cssize.cpp +69 -71
  49. data/ext/libsass/src/cssize.hpp +50 -50
  50. data/ext/libsass/src/debugger.hpp +117 -110
  51. data/ext/libsass/src/emitter.cpp +13 -12
  52. data/ext/libsass/src/emitter.hpp +13 -9
  53. data/ext/libsass/src/environment.cpp +15 -1
  54. data/ext/libsass/src/environment.hpp +6 -0
  55. data/ext/libsass/src/error_handling.cpp +36 -59
  56. data/ext/libsass/src/error_handling.hpp +29 -16
  57. data/ext/libsass/src/eval.cpp +302 -323
  58. data/ext/libsass/src/eval.hpp +64 -55
  59. data/ext/libsass/src/expand.cpp +94 -88
  60. data/ext/libsass/src/expand.hpp +33 -37
  61. data/ext/libsass/src/extend.cpp +38 -36
  62. data/ext/libsass/src/extend.hpp +15 -15
  63. data/ext/libsass/src/file.cpp +34 -2
  64. data/ext/libsass/src/fn_colors.cpp +594 -0
  65. data/ext/libsass/src/fn_colors.hpp +85 -0
  66. data/ext/libsass/src/fn_lists.cpp +284 -0
  67. data/ext/libsass/src/fn_lists.hpp +34 -0
  68. data/ext/libsass/src/fn_maps.cpp +94 -0
  69. data/ext/libsass/src/fn_maps.hpp +30 -0
  70. data/ext/libsass/src/fn_miscs.cpp +256 -0
  71. data/ext/libsass/src/fn_miscs.hpp +40 -0
  72. data/ext/libsass/src/fn_numbers.cpp +220 -0
  73. data/ext/libsass/src/fn_numbers.hpp +45 -0
  74. data/ext/libsass/src/fn_selectors.cpp +235 -0
  75. data/ext/libsass/src/fn_selectors.hpp +35 -0
  76. data/ext/libsass/src/fn_strings.cpp +254 -0
  77. data/ext/libsass/src/fn_strings.hpp +34 -0
  78. data/ext/libsass/src/fn_utils.cpp +156 -0
  79. data/ext/libsass/src/fn_utils.hpp +56 -0
  80. data/ext/libsass/src/inspect.cpp +101 -152
  81. data/ext/libsass/src/inspect.hpp +69 -73
  82. data/ext/libsass/src/json.cpp +2 -2
  83. data/ext/libsass/src/lexer.cpp +6 -3
  84. data/ext/libsass/src/listize.cpp +9 -11
  85. data/ext/libsass/src/listize.hpp +11 -7
  86. data/ext/libsass/src/memory/SharedPtr.cpp +2 -83
  87. data/ext/libsass/src/memory/SharedPtr.hpp +127 -143
  88. data/ext/libsass/src/node.cpp +13 -10
  89. data/ext/libsass/src/node.hpp +3 -3
  90. data/ext/libsass/src/operation.hpp +184 -144
  91. data/ext/libsass/src/operators.cpp +43 -17
  92. data/ext/libsass/src/operators.hpp +5 -5
  93. data/ext/libsass/src/output.cpp +21 -18
  94. data/ext/libsass/src/output.hpp +14 -21
  95. data/ext/libsass/src/parser.cpp +215 -183
  96. data/ext/libsass/src/parser.hpp +28 -24
  97. data/ext/libsass/src/plugins.cpp +5 -1
  98. data/ext/libsass/src/position.cpp +3 -0
  99. data/ext/libsass/src/prelexer.cpp +9 -3
  100. data/ext/libsass/src/prelexer.hpp +9 -9
  101. data/ext/libsass/src/remove_placeholders.cpp +14 -11
  102. data/ext/libsass/src/remove_placeholders.hpp +8 -9
  103. data/ext/libsass/src/sass.cpp +9 -3
  104. data/ext/libsass/src/sass.hpp +12 -9
  105. data/ext/libsass/src/sass2scss.cpp +45 -14
  106. data/ext/libsass/src/sass_context.cpp +18 -15
  107. data/ext/libsass/src/sass_functions.cpp +6 -3
  108. data/ext/libsass/src/sass_functions.hpp +1 -1
  109. data/ext/libsass/src/sass_util.cpp +3 -0
  110. data/ext/libsass/src/sass_values.cpp +21 -13
  111. data/ext/libsass/src/source_map.cpp +5 -2
  112. data/ext/libsass/src/source_map.hpp +2 -2
  113. data/ext/libsass/src/subset_map.cpp +4 -1
  114. data/ext/libsass/src/to_value.cpp +23 -21
  115. data/ext/libsass/src/to_value.hpp +18 -22
  116. data/ext/libsass/src/units.cpp +4 -0
  117. data/ext/libsass/src/units.hpp +1 -0
  118. data/ext/libsass/src/utf8/checked.h +12 -10
  119. data/ext/libsass/src/utf8/core.h +3 -0
  120. data/ext/libsass/src/utf8_string.cpp +3 -0
  121. data/ext/libsass/src/util.cpp +67 -75
  122. data/ext/libsass/src/util.hpp +64 -19
  123. data/ext/libsass/src/util_string.cpp +75 -0
  124. data/ext/libsass/src/util_string.hpp +19 -0
  125. data/ext/libsass/src/values.cpp +22 -13
  126. data/ext/libsass/src/values.hpp +2 -2
  127. data/ext/libsass/win/libsass.targets +30 -4
  128. data/ext/libsass/win/libsass.vcxproj.filters +82 -4
  129. data/lib/sassc.rb +24 -0
  130. data/lib/sassc/engine.rb +2 -2
  131. data/lib/sassc/native.rb +8 -1
  132. data/lib/sassc/version.rb +1 -1
  133. data/sassc.gemspec +19 -11
  134. data/test/engine_test.rb +26 -1
  135. data/test/native_test.rb +1 -1
  136. metadata +66 -72
  137. data/ext/Rakefile +0 -3
  138. data/ext/libsass/.github/CONTRIBUTING.md +0 -65
  139. data/ext/libsass/.github/ISSUE_TEMPLATE.md +0 -54
  140. data/ext/libsass/.travis.yml +0 -64
  141. data/ext/libsass/Readme.md +0 -104
  142. data/ext/libsass/SECURITY.md +0 -10
  143. data/ext/libsass/appveyor.yml +0 -91
  144. data/ext/libsass/docs/README.md +0 -20
  145. data/ext/libsass/docs/api-context-example.md +0 -45
  146. data/ext/libsass/docs/api-context-internal.md +0 -163
  147. data/ext/libsass/docs/api-context.md +0 -295
  148. data/ext/libsass/docs/api-doc.md +0 -215
  149. data/ext/libsass/docs/api-function-example.md +0 -67
  150. data/ext/libsass/docs/api-function-internal.md +0 -8
  151. data/ext/libsass/docs/api-function.md +0 -74
  152. data/ext/libsass/docs/api-importer-example.md +0 -112
  153. data/ext/libsass/docs/api-importer-internal.md +0 -20
  154. data/ext/libsass/docs/api-importer.md +0 -86
  155. data/ext/libsass/docs/api-value-example.md +0 -55
  156. data/ext/libsass/docs/api-value-internal.md +0 -76
  157. data/ext/libsass/docs/api-value.md +0 -154
  158. data/ext/libsass/docs/build-on-darwin.md +0 -27
  159. data/ext/libsass/docs/build-on-gentoo.md +0 -55
  160. data/ext/libsass/docs/build-on-windows.md +0 -139
  161. data/ext/libsass/docs/build-shared-library.md +0 -35
  162. data/ext/libsass/docs/build-with-autotools.md +0 -78
  163. data/ext/libsass/docs/build-with-makefiles.md +0 -68
  164. data/ext/libsass/docs/build-with-mingw.md +0 -107
  165. data/ext/libsass/docs/build-with-visual-studio.md +0 -90
  166. data/ext/libsass/docs/build.md +0 -97
  167. data/ext/libsass/docs/compatibility-plan.md +0 -48
  168. data/ext/libsass/docs/contributing.md +0 -17
  169. data/ext/libsass/docs/custom-functions-internal.md +0 -122
  170. data/ext/libsass/docs/dev-ast-memory.md +0 -223
  171. data/ext/libsass/docs/implementations.md +0 -56
  172. data/ext/libsass/docs/plugins.md +0 -47
  173. data/ext/libsass/docs/setup-environment.md +0 -68
  174. data/ext/libsass/docs/source-map-internals.md +0 -51
  175. data/ext/libsass/docs/trace.md +0 -26
  176. data/ext/libsass/docs/triage.md +0 -17
  177. data/ext/libsass/docs/unicode.md +0 -39
  178. data/ext/libsass/extconf.rb +0 -6
  179. data/ext/libsass/script/bootstrap +0 -13
  180. data/ext/libsass/script/branding +0 -10
  181. data/ext/libsass/script/ci-build-libsass +0 -134
  182. data/ext/libsass/script/ci-build-plugin +0 -62
  183. data/ext/libsass/script/ci-install-compiler +0 -6
  184. data/ext/libsass/script/ci-install-deps +0 -20
  185. data/ext/libsass/script/ci-report-coverage +0 -42
  186. data/ext/libsass/script/spec +0 -5
  187. data/ext/libsass/script/tap-driver +0 -652
  188. data/ext/libsass/script/tap-runner +0 -1
  189. data/ext/libsass/script/test-leaks.pl +0 -103
  190. data/ext/libsass/src/functions.cpp +0 -2234
  191. data/ext/libsass/src/functions.hpp +0 -198
  192. data/ext/libsass/src/to_c.hpp +0 -39
  193. data/ext/libsass/test/test_node.cpp +0 -94
  194. data/ext/libsass/test/test_paths.cpp +0 -28
  195. data/ext/libsass/test/test_selector_difference.cpp +0 -25
  196. data/ext/libsass/test/test_specificity.cpp +0 -25
  197. data/ext/libsass/test/test_subset_map.cpp +0 -472
  198. data/ext/libsass/test/test_superselector.cpp +0 -69
  199. data/ext/libsass/test/test_unification.cpp +0 -31
  200. data/lib/tasks/libsass.rb +0 -33
@@ -1,154 +0,0 @@
1
- `Sass_Values` are used to pass values and their types between the implementer
2
- and LibSass. Sass knows various different value types (including nested arrays
3
- and hash-maps). If you implement a binding to another programming language, you
4
- have to find a way to [marshal][1] (convert) `Sass_Values` between the target
5
- language and C. `Sass_Values` are currently only used by custom functions, but
6
- it should also be possible to use them without a compiler context.
7
-
8
- [1]: https://en.wikipedia.org/wiki/Marshalling_%28computer_science%29
9
-
10
- ### Basic Usage
11
-
12
- ```C
13
- #include "sass/values.h"
14
- ```
15
-
16
- ```C
17
- // Type for Sass values
18
- enum Sass_Tag {
19
- SASS_BOOLEAN,
20
- SASS_NUMBER,
21
- SASS_COLOR,
22
- SASS_STRING,
23
- SASS_LIST,
24
- SASS_MAP,
25
- SASS_NULL,
26
- SASS_ERROR,
27
- SASS_WARNING
28
- };
29
-
30
- // Tags for denoting Sass list separators
31
- enum Sass_Separator {
32
- SASS_COMMA,
33
- SASS_SPACE,
34
- // only used internally to represent a hash map before evaluation
35
- // otherwise we would be too early to check for duplicate keys
36
- SASS_HASH
37
- };
38
-
39
- // Value Operators
40
- enum Sass_OP {
41
- AND, OR, // logical connectives
42
- EQ, NEQ, GT, GTE, LT, LTE, // arithmetic relations
43
- ADD, SUB, MUL, DIV, MOD, // arithmetic functions
44
- NUM_OPS // so we know how big to make the op table
45
- };
46
- ```
47
-
48
- ### Sass Value API
49
-
50
- ```C
51
- // Forward declaration
52
- union Sass_Value;
53
-
54
- // Creator functions for all value types
55
- union Sass_Value* sass_make_null (void);
56
- union Sass_Value* sass_make_boolean (bool val);
57
- union Sass_Value* sass_make_string (const char* val);
58
- union Sass_Value* sass_make_qstring (const char* val);
59
- union Sass_Value* sass_make_number (double val, const char* unit);
60
- union Sass_Value* sass_make_color (double r, double g, double b, double a);
61
- union Sass_Value* sass_make_list (size_t len, enum Sass_Separator sep, bool is_bracketed);
62
- union Sass_Value* sass_make_map (size_t len);
63
- union Sass_Value* sass_make_error (const char* msg);
64
- union Sass_Value* sass_make_warning (const char* msg);
65
-
66
- // Generic destructor function for all types
67
- // Will release memory of all associated Sass_Values
68
- // Means we will delete recursively for lists and maps
69
- void sass_delete_value (union Sass_Value* val);
70
-
71
- // Make a deep cloned copy of the given sass value
72
- union Sass_Value* sass_clone_value (const union Sass_Value* val);
73
-
74
- // Stringify a Sass_Values and also return the result as a Sass_Value (of type STRING)
75
- union Sass_Value* sass_value_stringify (const union Sass_Value* a, bool compressed, int precision);
76
-
77
- // Execute an operation for two Sass_Values and return the result as a Sass_Value too
78
- union Sass_Value* sass_value_op (enum Sass_OP op, const union Sass_Value* a, const union Sass_Value* b);
79
-
80
- // Return the sass tag for a generic sass value
81
- // Check is needed before accessing specific values!
82
- enum Sass_Tag sass_value_get_tag (const union Sass_Value* v);
83
-
84
- // Check value to be of a specific type
85
- // Can also be used before accessing properties!
86
- bool sass_value_is_null (const union Sass_Value* v);
87
- bool sass_value_is_number (const union Sass_Value* v);
88
- bool sass_value_is_string (const union Sass_Value* v);
89
- bool sass_value_is_boolean (const union Sass_Value* v);
90
- bool sass_value_is_color (const union Sass_Value* v);
91
- bool sass_value_is_list (const union Sass_Value* v);
92
- bool sass_value_is_map (const union Sass_Value* v);
93
- bool sass_value_is_error (const union Sass_Value* v);
94
- bool sass_value_is_warning (const union Sass_Value* v);
95
-
96
- // Getters and setters for Sass_Number
97
- double sass_number_get_value (const union Sass_Value* v);
98
- void sass_number_set_value (union Sass_Value* v, double value);
99
- const char* sass_number_get_unit (const union Sass_Value* v);
100
- void sass_number_set_unit (union Sass_Value* v, char* unit);
101
-
102
- // Getters and setters for Sass_String
103
- const char* sass_string_get_value (const union Sass_Value* v);
104
- void sass_string_set_value (union Sass_Value* v, char* value);
105
- bool sass_string_is_quoted(const union Sass_Value* v);
106
- void sass_string_set_quoted(union Sass_Value* v, bool quoted);
107
-
108
- // Getters and setters for Sass_Boolean
109
- bool sass_boolean_get_value (const union Sass_Value* v);
110
- void sass_boolean_set_value (union Sass_Value* v, bool value);
111
-
112
- // Getters and setters for Sass_Color
113
- double sass_color_get_r (const union Sass_Value* v);
114
- void sass_color_set_r (union Sass_Value* v, double r);
115
- double sass_color_get_g (const union Sass_Value* v);
116
- void sass_color_set_g (union Sass_Value* v, double g);
117
- double sass_color_get_b (const union Sass_Value* v);
118
- void sass_color_set_b (union Sass_Value* v, double b);
119
- double sass_color_get_a (const union Sass_Value* v);
120
- void sass_color_set_a (union Sass_Value* v, double a);
121
-
122
- // Getter for the number of items in list
123
- size_t sass_list_get_length (const union Sass_Value* v);
124
- // Getters and setters for Sass_List
125
- enum Sass_Separator sass_list_get_separator (const union Sass_Value* v);
126
- void sass_list_set_separator (union Sass_Value* v, enum Sass_Separator value);
127
- bool sass_list_get_is_bracketed (const union Sass_Value* v);
128
- void sass_list_set_is_bracketed (union Sass_Value* v, bool value);
129
- // Getters and setters for Sass_List values
130
- union Sass_Value* sass_list_get_value (const union Sass_Value* v, size_t i);
131
- void sass_list_set_value (union Sass_Value* v, size_t i, union Sass_Value* value);
132
-
133
- // Getter for the number of items in map
134
- size_t sass_map_get_length (const union Sass_Value* v);
135
- // Getters and setters for Sass_Map keys and values
136
- union Sass_Value* sass_map_get_key (const union Sass_Value* v, size_t i);
137
- void sass_map_set_key (union Sass_Value* v, size_t i, union Sass_Value*);
138
- union Sass_Value* sass_map_get_value (const union Sass_Value* v, size_t i);
139
- void sass_map_set_value (union Sass_Value* v, size_t i, union Sass_Value*);
140
-
141
- // Getters and setters for Sass_Error
142
- char* sass_error_get_message (const union Sass_Value* v);
143
- void sass_error_set_message (union Sass_Value* v, char* msg);
144
-
145
- // Getters and setters for Sass_Warning
146
- char* sass_warning_get_message (const union Sass_Value* v);
147
- void sass_warning_set_message (union Sass_Value* v, char* msg);
148
- ```
149
-
150
- ### More links
151
-
152
- - [Sass Value Example](api-value-example.md)
153
- - [Sass Value Internal](api-value-internal.md)
154
-
@@ -1,27 +0,0 @@
1
- To install LibSass, make sure the OS X build tools are installed:
2
-
3
- xcode-select --install
4
-
5
- ## Homebrew
6
-
7
- To install homebrew, see [http://brew.sh](http://brew.sh)
8
-
9
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
10
-
11
- You can install the latest version of LibSass quite easily with brew.
12
-
13
- brew install --HEAD libsass
14
-
15
- To update this, do:
16
-
17
- brew reinstall --HEAD libsass
18
-
19
- Brew will build static and shared libraries, and a `libsass.pc` file in `/usr/local/lib/pkgconfig`.
20
-
21
- To use `libsass.pc`, make sure this path is in your `PKG_CONFIG_PATH`
22
-
23
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
24
-
25
- ## Manually
26
-
27
- See the linux instructions [Building-with-autotools](build-with-autotools.md) or [Building-with-makefiles](build-with-makefiles.md)
@@ -1,55 +0,0 @@
1
- Here are two ebuilds to compile LibSass and sassc on gentoo linux. If you do not know how to use these ebuilds, you should probably read the gentoo wiki page about [portage overlays](http://wiki.gentoo.org/wiki/Overlay).
2
-
3
- ## www-misc/libsass/libsass-9999.ebuild
4
- ```ebuild
5
- EAPI=4
6
-
7
- inherit eutils git-2 autotools
8
-
9
- DESCRIPTION="A C/C++ implementation of a Sass compiler."
10
- HOMEPAGE="http://libsass.org/"
11
- EGIT_PROJECT='libsass'
12
- EGIT_REPO_URI="https://github.com/sass/libsass.git"
13
- LICENSE="MIT"
14
- SLOT="0"
15
- KEYWORDS=""
16
- IUSE=""
17
- DEPEND=""
18
- RDEPEND="${DEPEND}"
19
- DEPEND="${DEPEND}"
20
-
21
- pkg_pretend() {
22
- # older gcc is not supported
23
- local major=$(gcc-major-version)
24
- local minor=$(gcc-minor-version)
25
- [[ "${MERGE_TYPE}" != "binary" && ( $major > 4 || ( $major == 4 && $minor < 5 ) ) ]] && \
26
- die "Sorry, but gcc earlier than 4.5 will not work for LibSass."
27
- }
28
-
29
- src_prepare() {
30
- eautoreconf
31
- }
32
- ```
33
-
34
- ## www-misc/sassc/sassc-9999.ebuild
35
- ```ebuild
36
- EAPI=4
37
-
38
- inherit eutils git-2 autotools
39
-
40
- DESCRIPTION="Command Line Tool for LibSass."
41
- HOMEPAGE="http://libsass.org/"
42
- EGIT_PROJECT='sassc'
43
- EGIT_REPO_URI="https://github.com/sass/sassc.git"
44
- LICENSE="MIT"
45
- SLOT="0"
46
- KEYWORDS=""
47
- IUSE=""
48
- DEPEND="www-misc/libsass"
49
- RDEPEND="${DEPEND}"
50
- DEPEND="${DEPEND}"
51
-
52
- src_prepare() {
53
- eautoreconf
54
- }
55
- ```
@@ -1,139 +0,0 @@
1
- We support builds via MingGW and via Visual Studio Community 2013.
2
- Both should be considered experimental (MinGW was better tested)!
3
-
4
- ## Building via MingGW (makefiles)
5
-
6
- First grab the latest [MinGW for windows][1] installer. Once it is installed, you can click on continue or open the Installation Manager via `bin\mingw-get.exe`.
7
-
8
- You need to have the following components installed:
9
- ![Visualization of components installed in the interface](https://cloud.githubusercontent.com/assets/282293/5525466/947bf396-89e6-11e4-841d-4aa916f14de1.png)
10
-
11
- Next we need to install [git for windows][2]. You probably want to check the option to add it to the global path, but you do not need to install the unix tools.
12
-
13
- If you want to run the spec test-suite you also need [ruby][3] and a few gems available. Grab the [latest installer][3] and make sure to add it the global path. Then install the missing gems:
14
-
15
- ```bash
16
- gem install minitest
17
- ```
18
-
19
- ### Mount the mingw root directory
20
-
21
- As mentioned in the [MinGW Getting Started](http://www.mingw.org/wiki/Getting_Started#toc5) guide, you should edit `C:\MinGW\msys\1.0\etc\fstab` to contain the following line:
22
-
23
- ```
24
- C:\MinGW /mingw
25
- ```
26
-
27
- ### Starting a "MingGW" console
28
-
29
- Create a batch file with this content:
30
- ```bat
31
- @echo off
32
- set PATH=C:\MinGW\bin;%PATH%
33
- REM only needed if not already available
34
- set PATH=%PROGRAMFILES%\git\bin;%PATH%
35
- REM C:\MinGW\msys\1.0\msys.bat
36
- cmd
37
- ```
38
-
39
- Execute it and make sure these commands can be called: `git`, `mingw32-make`, `rm` and `gcc`! Once this is all set, you should be ready to compile `libsass`!
40
-
41
- ### Get the sources
42
-
43
- ```bash
44
- # using git is preferred
45
- git clone https://github.com/sass/libsass.git
46
- # only needed for sassc and/or testsuite
47
- git clone https://github.com/sass/sassc.git libsass/sassc
48
- git clone https://github.com/sass/sass-spec.git libsass/sass-spec
49
- ```
50
-
51
- ### Decide for static or shared library
52
-
53
- `libsass` can be built and linked as a `static` or as a `shared` library. The default is `static`. To change it you can set the `BUILD` environment variable:
54
-
55
- ```bat
56
- set BUILD="shared"
57
- ```
58
-
59
- ### Compile the library
60
- ```bash
61
- mingw32-make -C libsass
62
- ```
63
-
64
- ### Results can be found in
65
- ```bash
66
- $ ls libsass/lib
67
- libsass.a libsass.dll libsass.so
68
- ```
69
-
70
- ### Run the spec test-suite
71
- ```bash
72
- mingw32-make -C libsass test_build
73
- ```
74
-
75
- ## Building via MingGW 64bit (makefiles)
76
- Building libass to dll on window 64bit.
77
-
78
- + downloads [MinGW64 for windows7 64bit](http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v3-rev0.7z/download) , and unzip to "C:\mingw64".
79
-
80
- + Create a batch file with this content:
81
-
82
- ```bat
83
- @echo off
84
- set PATH=C:\mingw64\bin;%PATH%
85
- set CC=gcc
86
- REM only needed if not already available
87
- set PATH=%PROGRAMFILES%\Git\bin;%PATH%
88
- REM C:\MinGW\msys\1.0\msys.bat
89
- cmd
90
- ```
91
-
92
- + By default , mingw64 dll will depends on "​m​i​n​g​w​m​1​0​.​d​l​l​、​ ​l​i​b​g​c​c​_​s​_​d​w​2​-​1​.​d​l​l​" , we can modify Makefile to fix this:(add "-static")
93
-
94
- ``` bash
95
- lib/libsass.dll: $(COBJECTS) $(OBJECTS) $(RCOBJECTS)
96
- $(MKDIR) lib
97
- $(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(RCOBJECTS) $(LDLIBS) -s -static -Wl,--subsystem,windows,--out-implib,lib/libsass.a
98
- ```
99
-
100
- + Compile the library
101
-
102
- ```bash
103
- mingw32-make -C libsass
104
- ```
105
-
106
- By the way , if you are using java jna , [JNAerator](http://jnaerator.googlecode.com/) is a good tool.
107
-
108
- ## Building via Visual Studio Community 2013
109
-
110
- Open a Visual Studio 2013 command prompt:
111
- - `VS2013 x86 Native Tools Command Prompt`
112
-
113
- Note: When I installed the community edition, I only got the 2012 command prompts. I copied them from the Startmenu to the Desktop and adjusted the paths from `Visual Studio 11.0` to `Visual Studio 12.0`. Since `libsass` uses some `C++11` features, you need at least a MSVC 2013 compiler (v120).
114
-
115
- ### Get the source
116
- ```bash
117
- # using git is preferred
118
- git clone https://github.com/sass/libsass.git
119
- git clone https://github.com/sass/sassc.git libsass/sassc
120
- # only needed if you want to run the testsuite
121
- git clone https://github.com/sass/sass-spec.git libsass/sass-spec
122
- ```
123
-
124
- ### Compile sassc
125
-
126
- Sometimes `msbuild` seems not available from the command prompt. Just search for it and add it to the global path. It seems to be included in the .net folders too.
127
-
128
- ```bat
129
- cd libsass
130
- REM set PATH=%PATH%;%PROGRAMFILES%\MSBuild\12.0\Bin
131
- msbuild /m:4 /p:Configuration=Release win\libsass.sln
132
- REM running the spec test-suite manually (needs ruby and minitest gem)
133
- ruby sass-spec\sass-spec.rb -V 3.5 -c win\bin\sassc.exe -s --impl libsass sass-spec/spec
134
- cd ..
135
- ```
136
-
137
- [1]: http://sourceforge.net/projects/mingw/files/latest/download?source=files
138
- [2]: https://msysgit.github.io/
139
- [3]: http://rubyinstaller.org/
@@ -1,35 +0,0 @@
1
- This page is mostly intended for people that want to build a system library that gets distributed via RPMs or other means. This is currently in a experimental phase, as we currently do not really guarantee any ABI forward compatibility. The C API was rewritten to make this possible in the future, but we want to wait some more time till we can call this final and stable.
2
-
3
- Building via autotools
4
- --
5
-
6
- You want to build a system library only via autotools, since it will create the proper `libtool` files to make it loadable on multiple systems. We hope this works correctly, but nobody of the `libsass` core team has much knowledge in this area. Therefore we are open for comments or improvements by people that have more experience in that matter (like package maintainers from various linux distributions).
7
-
8
- ```bash
9
- apt-get install autoconf libtool
10
- git clone https://github.com/sass/libsass.git
11
- cd libsass
12
- autoreconf --force --install
13
- ./configure \
14
- --disable-tests \
15
- --disable-static \
16
- --enable-shared \
17
- --prefix=/usr
18
- make -j5 install
19
- cd ..
20
- ```
21
-
22
- This should install these files
23
- ```bash
24
- # $ ls -la /usr/lib/libsass.*
25
- /usr/lib/libsass.la
26
- /usr/lib/libsass.so -> libsass.so.0.0.9
27
- /usr/lib/libsass.so.0 -> libsass.so.0.0.9
28
- /usr/lib/libsass.so.0.0.9
29
- # $ ls -la /usr/include/sass*
30
- /usr/include/sass.h
31
- /usr/include/sass2scss.h
32
- /usr/include/sass/context.h
33
- /usr/include/sass/functions.h
34
- /usr/include/sass/values.h
35
- ```
@@ -1,78 +0,0 @@
1
- ### Get the sources
2
- ```bash
3
- # using git is preferred
4
- git clone https://github.com/sass/libsass.git
5
- # only needed for sassc and/or testsuite
6
- git clone https://github.com/sass/sassc.git libsass/sassc
7
- git clone https://github.com/sass/sass-spec.git libsass/sass-spec
8
- ```
9
-
10
- ### Prerequisites
11
-
12
- In order to run autotools you need a few tools installed on your system.
13
- ```bash
14
- yum install automake libtool # RedHat Linux
15
- emerge -a automake libtool # Gentoo Linux
16
- pkgin install automake libtool # SmartOS
17
- ```
18
-
19
-
20
- ### Create configure script
21
- ```bash
22
- cd libsass
23
- autoreconf --force --install
24
- cd ..
25
- ```
26
-
27
- ### Create custom makefiles
28
- ```bash
29
- cd libsass
30
- ./configure \
31
- --disable-tests \
32
- --disable-shared \
33
- --prefix=/usr
34
- cd ..
35
- ```
36
-
37
- ### Build the library
38
- ```bash
39
- make -C libsass -j5
40
- ```
41
-
42
- ### Install the library
43
- The library will be installed to the location given as `prefix` to `configure`. This is standard behavior for autotools and not `libsass` specific.
44
- ```bash
45
- make -C libsass -j5 install
46
- ```
47
-
48
- ### Configure options
49
- The `configure` script is created by autotools. To get an overview of available options you can call `./configure --help`. When you execute this script, it will create specific makefiles, which you then use via the regular make command.
50
-
51
- There are some `libsass` specific options:
52
-
53
- ```
54
- Optional Features:
55
- --enable-tests enable testing the build
56
- --enable-coverage enable coverage report for test suite
57
- --enable-shared build shared libraries [default=yes]
58
- --enable-static build static libraries [default=yes]
59
-
60
- Optional Packages:
61
- --with-sassc-dir=<dir> specify directory of sassc sources for
62
- testing (default: sassc)
63
- --with-sass-spec-dir=<dir> specify directory of sass-spec for testing
64
- (default: sass-spec)
65
- ```
66
-
67
- ### Build sassc and run spec test-suite
68
-
69
- ```bash
70
- cd libsass
71
- autoreconf --force --install
72
- ./configure \
73
- --enable-tests \
74
- --enable-shared \
75
- --prefix=/usr
76
- make -j5 test_build
77
- cd ..
78
- ```