sassc 2.0.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.gitmodules +1 -1
  4. data/.travis.yml +9 -3
  5. data/CHANGELOG.md +36 -0
  6. data/CODE_OF_CONDUCT.md +1 -1
  7. data/README.md +1 -1
  8. data/Rakefile +43 -7
  9. data/ext/depend +4 -0
  10. data/ext/extconf.rb +92 -0
  11. data/ext/libsass/VERSION +1 -0
  12. data/ext/libsass/include/sass/base.h +9 -1
  13. data/ext/libsass/include/sass/context.h +5 -1
  14. data/ext/libsass/src/MurmurHash2.hpp +91 -0
  15. data/ext/libsass/src/ast.cpp +755 -2028
  16. data/ext/libsass/src/ast.hpp +492 -2477
  17. data/ext/libsass/src/{to_c.cpp → ast2c.cpp} +22 -16
  18. data/ext/libsass/src/ast2c.hpp +39 -0
  19. data/ext/libsass/src/ast_def_macros.hpp +70 -10
  20. data/ext/libsass/src/ast_fwd_decl.cpp +5 -3
  21. data/ext/libsass/src/ast_fwd_decl.hpp +107 -296
  22. data/ext/libsass/src/ast_helpers.hpp +292 -0
  23. data/ext/libsass/src/ast_sel_cmp.cpp +396 -0
  24. data/ext/libsass/src/ast_sel_super.cpp +539 -0
  25. data/ext/libsass/src/ast_sel_unify.cpp +275 -0
  26. data/ext/libsass/src/ast_sel_weave.cpp +616 -0
  27. data/ext/libsass/src/ast_selectors.cpp +1043 -0
  28. data/ext/libsass/src/ast_selectors.hpp +522 -0
  29. data/ext/libsass/src/ast_supports.cpp +114 -0
  30. data/ext/libsass/src/ast_supports.hpp +121 -0
  31. data/ext/libsass/src/ast_values.cpp +1154 -0
  32. data/ext/libsass/src/ast_values.hpp +498 -0
  33. data/ext/libsass/src/backtrace.cpp +11 -7
  34. data/ext/libsass/src/backtrace.hpp +5 -5
  35. data/ext/libsass/src/base64vlq.cpp +5 -2
  36. data/ext/libsass/src/base64vlq.hpp +1 -1
  37. data/ext/libsass/src/bind.cpp +35 -34
  38. data/ext/libsass/src/bind.hpp +3 -1
  39. data/ext/libsass/src/c2ast.cpp +64 -0
  40. data/ext/libsass/src/c2ast.hpp +14 -0
  41. data/ext/libsass/src/cencode.c +4 -6
  42. data/ext/libsass/src/check_nesting.cpp +83 -88
  43. data/ext/libsass/src/check_nesting.hpp +39 -34
  44. data/ext/libsass/src/color_maps.cpp +168 -164
  45. data/ext/libsass/src/color_maps.hpp +152 -160
  46. data/ext/libsass/src/constants.cpp +20 -0
  47. data/ext/libsass/src/constants.hpp +19 -0
  48. data/ext/libsass/src/context.cpp +104 -121
  49. data/ext/libsass/src/context.hpp +43 -55
  50. data/ext/libsass/src/cssize.cpp +103 -188
  51. data/ext/libsass/src/cssize.hpp +45 -51
  52. data/ext/libsass/src/dart_helpers.hpp +199 -0
  53. data/ext/libsass/src/debugger.hpp +524 -361
  54. data/ext/libsass/src/emitter.cpp +26 -26
  55. data/ext/libsass/src/emitter.hpp +20 -18
  56. data/ext/libsass/src/environment.cpp +41 -27
  57. data/ext/libsass/src/environment.hpp +33 -22
  58. data/ext/libsass/src/error_handling.cpp +92 -94
  59. data/ext/libsass/src/error_handling.hpp +73 -50
  60. data/ext/libsass/src/eval.cpp +380 -515
  61. data/ext/libsass/src/eval.hpp +64 -57
  62. data/ext/libsass/src/eval_selectors.cpp +75 -0
  63. data/ext/libsass/src/expand.cpp +322 -263
  64. data/ext/libsass/src/expand.hpp +55 -39
  65. data/ext/libsass/src/extender.cpp +1188 -0
  66. data/ext/libsass/src/extender.hpp +399 -0
  67. data/ext/libsass/src/extension.cpp +43 -0
  68. data/ext/libsass/src/extension.hpp +89 -0
  69. data/ext/libsass/src/file.cpp +134 -88
  70. data/ext/libsass/src/file.hpp +28 -37
  71. data/ext/libsass/src/fn_colors.cpp +596 -0
  72. data/ext/libsass/src/fn_colors.hpp +85 -0
  73. data/ext/libsass/src/fn_lists.cpp +285 -0
  74. data/ext/libsass/src/fn_lists.hpp +34 -0
  75. data/ext/libsass/src/fn_maps.cpp +94 -0
  76. data/ext/libsass/src/fn_maps.hpp +30 -0
  77. data/ext/libsass/src/fn_miscs.cpp +244 -0
  78. data/ext/libsass/src/fn_miscs.hpp +40 -0
  79. data/ext/libsass/src/fn_numbers.cpp +227 -0
  80. data/ext/libsass/src/fn_numbers.hpp +45 -0
  81. data/ext/libsass/src/fn_selectors.cpp +205 -0
  82. data/ext/libsass/src/fn_selectors.hpp +35 -0
  83. data/ext/libsass/src/fn_strings.cpp +268 -0
  84. data/ext/libsass/src/fn_strings.hpp +34 -0
  85. data/ext/libsass/src/fn_utils.cpp +158 -0
  86. data/ext/libsass/src/fn_utils.hpp +62 -0
  87. data/ext/libsass/src/inspect.cpp +253 -266
  88. data/ext/libsass/src/inspect.hpp +72 -74
  89. data/ext/libsass/src/json.cpp +2 -2
  90. data/ext/libsass/src/lexer.cpp +25 -84
  91. data/ext/libsass/src/lexer.hpp +5 -16
  92. data/ext/libsass/src/listize.cpp +27 -43
  93. data/ext/libsass/src/listize.hpp +14 -11
  94. data/ext/libsass/src/mapping.hpp +1 -0
  95. data/ext/libsass/src/memory.hpp +12 -0
  96. data/ext/libsass/src/memory/allocator.cpp +48 -0
  97. data/ext/libsass/src/memory/allocator.hpp +138 -0
  98. data/ext/libsass/src/memory/config.hpp +20 -0
  99. data/ext/libsass/src/memory/memory_pool.hpp +186 -0
  100. data/ext/libsass/src/memory/shared_ptr.cpp +33 -0
  101. data/ext/libsass/src/memory/shared_ptr.hpp +332 -0
  102. data/ext/libsass/src/operation.hpp +193 -143
  103. data/ext/libsass/src/operators.cpp +56 -29
  104. data/ext/libsass/src/operators.hpp +11 -11
  105. data/ext/libsass/src/ordered_map.hpp +112 -0
  106. data/ext/libsass/src/output.cpp +59 -75
  107. data/ext/libsass/src/output.hpp +15 -22
  108. data/ext/libsass/src/parser.cpp +662 -818
  109. data/ext/libsass/src/parser.hpp +96 -100
  110. data/ext/libsass/src/parser_selectors.cpp +189 -0
  111. data/ext/libsass/src/permutate.hpp +164 -0
  112. data/ext/libsass/src/plugins.cpp +12 -8
  113. data/ext/libsass/src/plugins.hpp +8 -8
  114. data/ext/libsass/src/position.cpp +10 -26
  115. data/ext/libsass/src/position.hpp +44 -21
  116. data/ext/libsass/src/prelexer.cpp +14 -8
  117. data/ext/libsass/src/prelexer.hpp +9 -9
  118. data/ext/libsass/src/remove_placeholders.cpp +59 -57
  119. data/ext/libsass/src/remove_placeholders.hpp +20 -18
  120. data/ext/libsass/src/sass.cpp +25 -18
  121. data/ext/libsass/src/sass.hpp +22 -14
  122. data/ext/libsass/src/sass2scss.cpp +49 -18
  123. data/ext/libsass/src/sass_context.cpp +104 -132
  124. data/ext/libsass/src/sass_context.hpp +2 -2
  125. data/ext/libsass/src/sass_functions.cpp +7 -4
  126. data/ext/libsass/src/sass_functions.hpp +1 -1
  127. data/ext/libsass/src/sass_values.cpp +26 -21
  128. data/ext/libsass/src/settings.hpp +19 -0
  129. data/ext/libsass/src/source.cpp +69 -0
  130. data/ext/libsass/src/source.hpp +95 -0
  131. data/ext/libsass/src/source_data.hpp +32 -0
  132. data/ext/libsass/src/source_map.cpp +27 -20
  133. data/ext/libsass/src/source_map.hpp +14 -11
  134. data/ext/libsass/src/stylesheet.cpp +22 -0
  135. data/ext/libsass/src/stylesheet.hpp +57 -0
  136. data/ext/libsass/src/to_value.cpp +24 -22
  137. data/ext/libsass/src/to_value.hpp +18 -22
  138. data/ext/libsass/src/units.cpp +28 -22
  139. data/ext/libsass/src/units.hpp +9 -8
  140. data/ext/libsass/src/utf8/checked.h +12 -10
  141. data/ext/libsass/src/utf8/core.h +3 -0
  142. data/ext/libsass/src/utf8_string.cpp +12 -10
  143. data/ext/libsass/src/utf8_string.hpp +7 -6
  144. data/ext/libsass/src/util.cpp +97 -107
  145. data/ext/libsass/src/util.hpp +74 -30
  146. data/ext/libsass/src/util_string.cpp +125 -0
  147. data/ext/libsass/src/util_string.hpp +73 -0
  148. data/ext/libsass/src/values.cpp +33 -24
  149. data/ext/libsass/src/values.hpp +2 -2
  150. data/lib/sassc.rb +24 -0
  151. data/lib/sassc/engine.rb +7 -5
  152. data/lib/sassc/functions_handler.rb +11 -13
  153. data/lib/sassc/native.rb +10 -9
  154. data/lib/sassc/native/native_functions_api.rb +0 -5
  155. data/lib/sassc/script.rb +4 -6
  156. data/lib/sassc/version.rb +1 -1
  157. data/sassc.gemspec +32 -12
  158. data/test/engine_test.rb +32 -2
  159. data/test/functions_test.rb +38 -1
  160. data/test/native_test.rb +4 -4
  161. metadata +95 -109
  162. data/ext/Rakefile +0 -3
  163. data/ext/libsass/.editorconfig +0 -15
  164. data/ext/libsass/.gitattributes +0 -2
  165. data/ext/libsass/.github/CONTRIBUTING.md +0 -65
  166. data/ext/libsass/.github/ISSUE_TEMPLATE.md +0 -54
  167. data/ext/libsass/.gitignore +0 -85
  168. data/ext/libsass/.travis.yml +0 -64
  169. data/ext/libsass/COPYING +0 -25
  170. data/ext/libsass/GNUmakefile.am +0 -88
  171. data/ext/libsass/INSTALL +0 -1
  172. data/ext/libsass/LICENSE +0 -25
  173. data/ext/libsass/Makefile +0 -351
  174. data/ext/libsass/Makefile.conf +0 -55
  175. data/ext/libsass/Readme.md +0 -104
  176. data/ext/libsass/SECURITY.md +0 -10
  177. data/ext/libsass/appveyor.yml +0 -91
  178. data/ext/libsass/configure.ac +0 -138
  179. data/ext/libsass/contrib/libsass.spec +0 -66
  180. data/ext/libsass/docs/README.md +0 -20
  181. data/ext/libsass/docs/api-context-example.md +0 -45
  182. data/ext/libsass/docs/api-context-internal.md +0 -163
  183. data/ext/libsass/docs/api-context.md +0 -295
  184. data/ext/libsass/docs/api-doc.md +0 -215
  185. data/ext/libsass/docs/api-function-example.md +0 -67
  186. data/ext/libsass/docs/api-function-internal.md +0 -8
  187. data/ext/libsass/docs/api-function.md +0 -74
  188. data/ext/libsass/docs/api-importer-example.md +0 -112
  189. data/ext/libsass/docs/api-importer-internal.md +0 -20
  190. data/ext/libsass/docs/api-importer.md +0 -86
  191. data/ext/libsass/docs/api-value-example.md +0 -55
  192. data/ext/libsass/docs/api-value-internal.md +0 -76
  193. data/ext/libsass/docs/api-value.md +0 -154
  194. data/ext/libsass/docs/build-on-darwin.md +0 -27
  195. data/ext/libsass/docs/build-on-gentoo.md +0 -55
  196. data/ext/libsass/docs/build-on-windows.md +0 -139
  197. data/ext/libsass/docs/build-shared-library.md +0 -35
  198. data/ext/libsass/docs/build-with-autotools.md +0 -78
  199. data/ext/libsass/docs/build-with-makefiles.md +0 -68
  200. data/ext/libsass/docs/build-with-mingw.md +0 -107
  201. data/ext/libsass/docs/build-with-visual-studio.md +0 -90
  202. data/ext/libsass/docs/build.md +0 -97
  203. data/ext/libsass/docs/compatibility-plan.md +0 -48
  204. data/ext/libsass/docs/contributing.md +0 -17
  205. data/ext/libsass/docs/custom-functions-internal.md +0 -122
  206. data/ext/libsass/docs/dev-ast-memory.md +0 -223
  207. data/ext/libsass/docs/implementations.md +0 -56
  208. data/ext/libsass/docs/plugins.md +0 -47
  209. data/ext/libsass/docs/setup-environment.md +0 -68
  210. data/ext/libsass/docs/source-map-internals.md +0 -51
  211. data/ext/libsass/docs/trace.md +0 -26
  212. data/ext/libsass/docs/triage.md +0 -17
  213. data/ext/libsass/docs/unicode.md +0 -39
  214. data/ext/libsass/extconf.rb +0 -6
  215. data/ext/libsass/include/sass/version.h.in +0 -12
  216. data/ext/libsass/m4/.gitkeep +0 -0
  217. data/ext/libsass/m4/m4-ax_cxx_compile_stdcxx_11.m4 +0 -167
  218. data/ext/libsass/res/resource.rc +0 -35
  219. data/ext/libsass/script/bootstrap +0 -13
  220. data/ext/libsass/script/branding +0 -10
  221. data/ext/libsass/script/ci-build-libsass +0 -134
  222. data/ext/libsass/script/ci-build-plugin +0 -62
  223. data/ext/libsass/script/ci-install-compiler +0 -6
  224. data/ext/libsass/script/ci-install-deps +0 -20
  225. data/ext/libsass/script/ci-report-coverage +0 -42
  226. data/ext/libsass/script/spec +0 -5
  227. data/ext/libsass/script/tap-driver +0 -652
  228. data/ext/libsass/script/tap-runner +0 -1
  229. data/ext/libsass/script/test-leaks.pl +0 -103
  230. data/ext/libsass/src/GNUmakefile.am +0 -54
  231. data/ext/libsass/src/extend.cpp +0 -2130
  232. data/ext/libsass/src/extend.hpp +0 -86
  233. data/ext/libsass/src/functions.cpp +0 -2234
  234. data/ext/libsass/src/functions.hpp +0 -198
  235. data/ext/libsass/src/memory/SharedPtr.cpp +0 -114
  236. data/ext/libsass/src/memory/SharedPtr.hpp +0 -206
  237. data/ext/libsass/src/node.cpp +0 -319
  238. data/ext/libsass/src/node.hpp +0 -118
  239. data/ext/libsass/src/paths.hpp +0 -71
  240. data/ext/libsass/src/sass_util.cpp +0 -149
  241. data/ext/libsass/src/sass_util.hpp +0 -256
  242. data/ext/libsass/src/subset_map.cpp +0 -55
  243. data/ext/libsass/src/subset_map.hpp +0 -76
  244. data/ext/libsass/src/support/libsass.pc.in +0 -11
  245. data/ext/libsass/src/to_c.hpp +0 -39
  246. data/ext/libsass/test/test_node.cpp +0 -94
  247. data/ext/libsass/test/test_paths.cpp +0 -28
  248. data/ext/libsass/test/test_selector_difference.cpp +0 -25
  249. data/ext/libsass/test/test_specificity.cpp +0 -25
  250. data/ext/libsass/test/test_subset_map.cpp +0 -472
  251. data/ext/libsass/test/test_superselector.cpp +0 -69
  252. data/ext/libsass/test/test_unification.cpp +0 -31
  253. data/ext/libsass/version.sh +0 -10
  254. data/ext/libsass/win/libsass.sln +0 -39
  255. data/ext/libsass/win/libsass.sln.DotSettings +0 -9
  256. data/ext/libsass/win/libsass.targets +0 -118
  257. data/ext/libsass/win/libsass.vcxproj +0 -188
  258. data/ext/libsass/win/libsass.vcxproj.filters +0 -357
  259. data/lib/sassc/native/lib_c.rb +0 -21
  260. data/lib/tasks/libsass.rb +0 -33
@@ -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
- ```
@@ -1,68 +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
- ### Decide for static or shared library
11
-
12
- `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:
13
-
14
- ```bash
15
- export BUILD="shared"
16
- ```
17
-
18
- Alternatively you can also define it directly when calling make:
19
-
20
- ```bash
21
- BUILD="shared" make ...
22
- ```
23
-
24
- ### Compile the library
25
- ```bash
26
- make -C libsass -j5
27
- ```
28
-
29
- ### Results can be found in
30
- ```bash
31
- $ ls libsass/lib
32
- libsass.a libsass.so
33
- ```
34
-
35
- ### Install onto the system
36
-
37
- We recommend to use [autotools to install](build-with-autotools.md) libsass onto the
38
- system, since that brings all the benefits of using libtools as the main install method.
39
- If you still want to install libsass via the makefile, you need to make sure that gnu
40
- `install` utility (or compatible) is installed on your system.
41
- ```bash
42
- yum install coreutils # RedHat Linux
43
- emerge -a coreutils # Gentoo Linux
44
- pkgin install coreutils # SmartOS
45
- ```
46
-
47
- You can set the install location by setting `PREFIX`
48
- ```bash
49
- PREFIX="/opt/local" make install
50
- ```
51
-
52
-
53
- ### Compling sassc
54
-
55
- ```bash
56
- # Let build know library location
57
- export SASS_LIBSASS_PATH="`pwd`/libsass"
58
- # Invokes the sassc makefile
59
- make -C libsass -j5 sassc
60
- ```
61
-
62
- ### Run the spec test-suite
63
-
64
- ```bash
65
- # needs ruby available
66
- # also gem install minitest
67
- make -C libsass -j5 test_build
68
- ```
@@ -1,107 +0,0 @@
1
- ## Building LibSass with MingGW (makefiles)
2
-
3
- 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`.
4
-
5
- You need to have the following components installed:
6
- ![](https://cloud.githubusercontent.com/assets/282293/5525466/947bf396-89e6-11e4-841d-4aa916f14de1.png)
7
-
8
- 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.
9
-
10
- 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:
11
-
12
- ```bash
13
- gem install minitest
14
- ```
15
-
16
- ### Mount the mingw root directory
17
-
18
- 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:
19
-
20
- ```
21
- C:\MinGW /mingw
22
- ```
23
-
24
- ### Starting a "MingGW" console
25
-
26
- Create a batch file with this content:
27
- ```bat
28
- @echo off
29
- set PATH=C:\MinGW\bin;%PATH%
30
- REM only needed if not already available
31
- set PATH=%PROGRAMFILES%\git\bin;%PATH%
32
- REM C:\MinGW\msys\1.0\msys.bat
33
- cmd
34
- ```
35
-
36
- 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`!
37
-
38
- ### Get the sources
39
-
40
- ```bash
41
- # using git is preferred
42
- git clone https://github.com/sass/libsass.git
43
- # only needed for sassc and/or testsuite
44
- git clone https://github.com/sass/sassc.git libsass/sassc
45
- git clone https://github.com/sass/sass-spec.git libsass/sass-spec
46
- ```
47
-
48
- ### Decide for static or shared library
49
-
50
- `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:
51
-
52
- ```bat
53
- set BUILD="shared"
54
- ```
55
-
56
- ### Compile the library
57
- ```bash
58
- mingw32-make -C libsass
59
- ```
60
-
61
- ### Results can be found in
62
- ```bash
63
- $ ls libsass/lib
64
- libsass.a libsass.dll libsass.so
65
- ```
66
-
67
- ### Run the spec test-suite
68
- ```bash
69
- mingw32-make -C libsass test_build
70
- ```
71
-
72
- ## Building via MingGW 64bit (makefiles)
73
- Building libass to dll on window 64bit.
74
-
75
- Download [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".
76
-
77
- Create a batch file with this content:
78
-
79
- ```bat
80
- @echo off
81
- set PATH=C:\mingw64\bin;%PATH%
82
- set CC=gcc
83
- REM only needed if not already available
84
- set PATH=%PROGRAMFILES%\Git\bin;%PATH%
85
- REM C:\MinGW\msys\1.0\msys.bat
86
- cmd
87
- ```
88
-
89
- 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")
90
-
91
- ``` bash
92
- lib/libsass.dll: $(COBJECTS) $(OBJECTS) $(RCOBJECTS)
93
- $(MKDIR) lib
94
- $(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(RCOBJECTS) $(LDLIBS) -s -static -Wl,--subsystem,windows,--out-implib,lib/libsass.a
95
- ```
96
-
97
- Compile the library
98
-
99
- ```bash
100
- mingw32-make -C libsass
101
- ```
102
-
103
- By the way, if you are using java jna, [JNAerator](http://jnaerator.googlecode.com/) is a good tool.
104
-
105
- [1]: http://sourceforge.net/projects/mingw/files/latest/download?source=files
106
- [2]: https://msysgit.github.io/
107
- [3]: http://rubyinstaller.org/
@@ -1,90 +0,0 @@
1
- ## Building LibSass with Visual Studio
2
-
3
- ### Requirements:
4
-
5
- The minimum requirement to build LibSass with Visual Studio is "Visual Studio 2013 Express for Desktop".
6
-
7
- Additionally, it is recommended to have `git` installed and available in `PATH`, so to deduce the `libsass` version information. For instance, if GitHub for Windows (https://windows.github.com/) is installed, the `PATH` will have an entry resembling: `X:\Users\<YOUR_NAME>\AppData\Local\GitHub\PortableGit_<SOME_GUID>\cmd\` (where `X` is the drive letter of system drive). If `git` is not available, inquiring the LibSass version will result in `[NA]`.
8
-
9
- ### Build Steps:
10
-
11
- #### From Visual Studio:
12
-
13
- On opening the `win\libsass.sln` solution and build (Ctrl+Shift+B) to build `libsass.dll`.
14
-
15
- To Build LibSass as a static Library, it is recommended to set an environment variable `LIBSASS_STATIC_LIB` before launching the project:
16
-
17
- ```cmd
18
- cd path\to\libsass
19
- SET LIBSASS_STATIC_LIB=1
20
- ::
21
- :: or in PowerShell:
22
- :: $env:LIBSASS_STATIC_LIB=1
23
- ::
24
- win\libsass.sln
25
- ```
26
-
27
- Visual Studio will form the filtered source tree as shown below:
28
-
29
- ![image](https://cloud.githubusercontent.com/assets/3840695/9298985/aae9e072-44bf-11e5-89eb-e7995c098085.png)
30
-
31
- `Header Files` contains the .h and .hpp files, while `Source Files` covers `.c` and `.cpp`. The other used headers/sources will appear under `External Dependencies`.
32
-
33
- If there is a LibSass code file appearing under External Dependencies, it can be changed by altering the `win\libsass.vcxproj.filters` file or dragging in Solution Explorer.
34
-
35
- #### From Command Prompt:
36
-
37
- Notice that in the following commands:
38
-
39
- * If the platform is 32-bit Windows, replace `ProgramFiles(x86)` with `ProgramFiles`.
40
- * To build with Visual Studio 2015, replace `12.0` with `14.0` in the aforementioned command.
41
-
42
- Open a command prompt:
43
-
44
- To build dynamic/shared library (`libsass.dll`):
45
-
46
- ```cmd
47
- :: debug build:
48
- "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild" win\libsass.sln
49
-
50
- :: release build:
51
- "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild" win\libsass.sln ^
52
- /p:Configuration=Release
53
- ```
54
-
55
- To build static library (`libsass.lib`):
56
-
57
- ```cmd
58
- :: debug build:
59
- "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild" win\libsass.sln ^
60
- /p:LIBSASS_STATIC_LIB=1
61
-
62
- :: release build:
63
- "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild" win\libsass.sln ^
64
- /p:LIBSASS_STATIC_LIB=1 /p:Configuration=Release
65
- ```
66
-
67
- #### From PowerShell:
68
-
69
- To build dynamic/shared library (`libsass.dll`):
70
-
71
- ```powershell
72
- # debug build:
73
- &"${env:ProgramFiles(x86)}\MSBuild\12.0\Bin\MSBuild" win\libsass.sln
74
-
75
- # release build:
76
- &"${env:ProgramFiles(x86)}\MSBuild\12.0\Bin\MSBuild" win\libsass.sln `
77
- /p:Configuration=Release
78
- ```
79
-
80
- To build static library (`libsass.lib`):
81
-
82
- ```powershell
83
- # build:
84
- &"${env:ProgramFiles(x86)}\MSBuild\12.0\Bin\MSBuild" win\libsass.sln `
85
- /p:LIBSASS_STATIC_LIB=1
86
-
87
- # release build:
88
- &"${env:ProgramFiles(x86)}\MSBuild\12.0\Bin\MSBuild" win\libsass.sln `
89
- /p:LIBSASS_STATIC_LIB=1 /p:Configuration=Release
90
- ```