nokolexbor 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b910105b4ec472a50603cfaacb05e8cadb197a91480e6084ccc438132fea10b4
4
- data.tar.gz: 149523b2290e5772e9cb24df768bb5f041574028f3f9131beb4d51d05e8dd9be
3
+ metadata.gz: b5eb708d3b21135112c1e1f373b89f94b83c4926043da9743aff108f4d4eed72
4
+ data.tar.gz: 5ba497f52ea19c49816e1ec9c2b5e12449ae4f812cb011f2953ba7cf1a0b971b
5
5
  SHA512:
6
- metadata.gz: c4a942b16c8c9de309a7235a3163c0265b03f6db24f2e22d84abd488744568f78d14d414e8f1cf71ec377fddd89b97a6a2010ac9385dbe0af0531e6e287a2360
7
- data.tar.gz: 0256be587e76a5642b1e2caaf0119ea69b25335f011b60741085f884d027692b11142047ada0ce8605df5695a584de68dae41e2d0dad50403f97ae529bcc3bdd
6
+ metadata.gz: ff508a1599f36608c4c7ae0b360d4f2eb6f4740c059a945215dcdbc27a457a74293a2de6ba4043b5db5601dacccd4befac396b85a824e615163ab36f2a603bcb
7
+ data.tar.gz: 1699d675b60d76a12da000e6bc0844842a31f910b80350a5e87bedaf4474e8078099623eeaeb1e1169c16ec23a51a4d0112aebf76c9ef25ac358a347992f32da
@@ -0,0 +1,92 @@
1
+ cmake_minimum_required(VERSION 3.0)
2
+
3
+ set(VERSION "2.11.0")
4
+
5
+ project(libxml2 VERSION ${VERSION} LANGUAGES C)
6
+
7
+ include(CheckFunctionExists)
8
+ include(CheckIncludeFiles)
9
+ include(CheckLibraryExists)
10
+ include(CheckStructHasMember)
11
+ include(CheckSymbolExists)
12
+
13
+ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
14
+ set(LIBXML2_WITH_AUTOMATA ON)
15
+ option(LIBXML2_WITH_C14N "Add the Canonicalization support" OFF)
16
+ option(LIBXML2_WITH_CATALOG "Add the Catalog support" OFF)
17
+ option(LIBXML2_WITH_DEBUG "Add the debugging module" OFF)
18
+ set(LIBXML2_WITH_EXPR OFF)
19
+ option(LIBXML2_WITH_FTP "Add the FTP support" OFF)
20
+ option(LIBXML2_WITH_HTML "Add the HTML support" ON)
21
+ option(LIBXML2_WITH_HTTP "Add the HTTP support" OFF)
22
+ option(LIBXML2_WITH_ICONV "Add ICONV support" OFF)
23
+ option(LIBXML2_WITH_ICU "Add ICU support" OFF)
24
+ option(LIBXML2_WITH_ISO8859X "Add ISO8859X support if no iconv" OFF)
25
+ option(LIBXML2_WITH_LEGACY "Add deprecated APIs for compatibility" OFF)
26
+ option(LIBXML2_WITH_LZMA "Use liblzma" OFF)
27
+ option(LIBXML2_WITH_MEM_DEBUG "Add the memory debugging module" OFF)
28
+ option(LIBXML2_WITH_MODULES "Add the dynamic modules support" OFF)
29
+ option(LIBXML2_WITH_OUTPUT "Add the serialization support" OFF)
30
+ option(LIBXML2_WITH_PATTERN "Add the xmlPattern selection interface" ON)
31
+ option(LIBXML2_WITH_PROGRAMS "Build programs" OFF)
32
+ option(LIBXML2_WITH_PUSH "Add the PUSH parser interfaces" OFF)
33
+ option(LIBXML2_WITH_PYTHON "Build Python bindings" OFF)
34
+ option(LIBXML2_WITH_READER "Add the xmlReader parsing interface" OFF)
35
+ option(LIBXML2_WITH_REGEXPS "Add Regular Expressions support" OFF)
36
+ option(LIBXML2_WITH_SAX1 "Add the older SAX1 interface" OFF)
37
+ option(LIBXML2_WITH_SCHEMAS "Add Relax-NG and Schemas support" OFF)
38
+ option(LIBXML2_WITH_SCHEMATRON "Add Schematron support" OFF)
39
+ option(LIBXML2_WITH_TESTS "Build tests" OFF)
40
+ option(LIBXML2_WITH_THREADS "Add multithread support" ON)
41
+ option(LIBXML2_WITH_THREAD_ALLOC "Add per-thread memory" OFF)
42
+ option(LIBXML2_WITH_TREE "Add the DOM like tree manipulation APIs" ON)
43
+ set(LIBXML2_WITH_TRIO OFF)
44
+ set(LIBXML2_WITH_UNICODE ON)
45
+ option(LIBXML2_WITH_VALID "Add the DTD validation support" OFF)
46
+ option(LIBXML2_WITH_WRITER "Add the xmlWriter saving interface" OFF)
47
+ option(LIBXML2_WITH_XINCLUDE "Add the XInclude support" OFF)
48
+ option(LIBXML2_WITH_XPATH "Add the XPATH support" ON)
49
+ option(LIBXML2_WITH_XPTR "Add the XPointer support" OFF)
50
+ option(LIBXML2_WITH_XPTR_LOCS "Add support for XPointer locations" OFF)
51
+ option(LIBXML2_WITH_ZLIB "Use libz" OFF)
52
+ set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML Conformance Test Suite")
53
+
54
+ if(LIBXML2_WITH_THREADS)
55
+ find_package(Threads REQUIRED)
56
+ endif()
57
+
58
+ foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_XPTR_LOCS WITH_ZLIB)
59
+ if(LIBXML2_${VARIABLE})
60
+ set(${VARIABLE} 1)
61
+ else()
62
+ set(${VARIABLE} 0)
63
+ endif()
64
+ endforeach()
65
+
66
+ if (NOT MSVC)
67
+ check_c_source_compiles("
68
+ void __attribute__((destructor))
69
+ f(void) {}
70
+ int main(void) { return 0; }
71
+ " HAVE_ATTRIBUTE_DESTRUCTOR)
72
+ if(HAVE_ATTRIBUTE_DESTRUCTOR)
73
+ set(ATTRIBUTE_DESTRUCTOR "__attribute__((destructor))")
74
+ endif()
75
+ check_include_files(inttypes.h HAVE_INTTYPES_H)
76
+ check_function_exists(rand_r HAVE_RAND_R)
77
+ check_include_files(stdint.h HAVE_STDINT_H)
78
+ endif()
79
+
80
+ if(LIBXML2_WITH_THREADS)
81
+ # target_compile_definitions(LibXml2 PRIVATE _REENTRANT)
82
+ if(NOT WIN32)
83
+ check_include_files(pthread.h HAVE_PTHREAD_H)
84
+ endif()
85
+ endif()
86
+
87
+ if(MSVC)
88
+ configure_file(include/win32config.h config.h COPYONLY)
89
+ else()
90
+ configure_file(config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
91
+ endif()
92
+ configure_file(libxml/xmlversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/libxml/xmlversion.h)
@@ -0,0 +1,26 @@
1
+ /* config.h. Generated from config.h.in by configure. */
2
+ /* config.h.in. Generated from configure.ac by autoheader. */
3
+
4
+ /* Define if __attribute__((destructor)) is accepted */
5
+ #cmakedefine ATTRIBUTE_DESTRUCTOR @ATTRIBUTE_DESTRUCTOR@
6
+
7
+ /* Define to 1 if you have the <inttypes.h> header file. */
8
+ #cmakedefine HAVE_INTTYPES_H 1
9
+
10
+ /* Define if <pthread.h> is there */
11
+ #cmakedefine HAVE_PTHREAD_H 1
12
+
13
+ /* Define to 1 if you have the `rand_r' function. */
14
+ #cmakedefine HAVE_RAND_R 1
15
+
16
+ /* Define to 1 if you have the <stdint.h> header file. */
17
+ #cmakedefine HAVE_STDINT_H 1
18
+
19
+ /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
20
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
21
+ #define below would cause a syntax error. */
22
+ #cmakedefine _UINT32_T @_UINT32_T@
23
+
24
+ /* Define to the type of an unsigned integer type of width exactly 32 bits if
25
+ such a type exists and the standard includes do not define it. */
26
+ #cmakedefine uint32_t @uint32_t@
@@ -12,8 +12,11 @@ cmake_flags << "-DLEXBOR_BUILD_STATIC=ON"
12
12
  # For debugging
13
13
  # cmake_flags << "-DLEXBOR_OPTIMIZATION_LEVEL='-O0 -g'"
14
14
 
15
+ append_cflags("-DLEXBOR_STATIC")
16
+ append_cflags("-DLIBXML_STATIC")
17
+
15
18
  def sys(cmd)
16
- puts " -- #{cmd}"
19
+ puts "-- #{cmd}"
17
20
  unless ret = xsystem(cmd)
18
21
  raise "ERROR: '#{cmd}' failed"
19
22
  end
@@ -79,19 +82,16 @@ else
79
82
  end
80
83
 
81
84
  if !MAKE
82
- abort "ERROR: GNU make is required to build Rugged."
85
+ abort "ERROR: GNU make is required to build Lexbor."
83
86
  end
84
87
 
85
88
  CWD = File.expand_path(File.dirname(__FILE__))
86
89
  LEXBOR_DIR = File.join(CWD, '..', '..', 'vendor', 'lexbor')
90
+ EXT_DIR = File.join(CWD, '..', '..', 'ext', 'nokolexbor')
87
91
  INSTALL_DIR = File.join(LEXBOR_DIR, 'dist')
88
92
 
89
93
  if !find_executable('cmake')
90
- abort "ERROR: CMake is required to build Rugged."
91
- end
92
-
93
- if !Gem.win_platform? && !find_executable('pkg-config')
94
- abort "ERROR: pkg-config is required to build Rugged."
94
+ abort "ERROR: CMake is required to build Lexbor."
95
95
  end
96
96
 
97
97
  Dir.chdir(LEXBOR_DIR) do
@@ -110,6 +110,15 @@ Dir.chdir(LEXBOR_DIR) do
110
110
  end
111
111
  end
112
112
 
113
+ # Generate config.h and xmlversion.h for libxml2
114
+ Dir.chdir(EXT_DIR) do
115
+ Dir.mkdir("build") if !Dir.exist?("build")
116
+
117
+ Dir.chdir("build") do
118
+ run_cmake(10 * 60, "..#{Gem.win_platform? ? " -DLIBXML2_WITH_THREADS=OFF" : ""}")
119
+ end
120
+ end
121
+
113
122
  # Prepend the vendored lexbor build dir to the $DEFLIBPATH.
114
123
  #
115
124
  # By default, $DEFLIBPATH includes $(libpath), which usually points
@@ -117,7 +126,7 @@ end
117
126
  # installed through rbenv or rvm).
118
127
  #
119
128
  # This was causing system-wide lexbor installations to be preferred
120
- # over of our vendored lexbor version when building rugged.
129
+ # over of our vendored lexbor version when building lexbor.
121
130
  #
122
131
  # By putting the path to the vendored lexbor library at the front of
123
132
  # $DEFLIBPATH, we can ensure that our bundled version is always used.
@@ -21,7 +21,7 @@ extern "C" {
21
21
  * your library and includes mismatch
22
22
  */
23
23
  #ifndef LIBXML2_COMPILING_MSCCDEF
24
- XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
24
+ XMLPUBFUN void xmlCheckVersion(int version);
25
25
  #endif /* LIBXML2_COMPILING_MSCCDEF */
26
26
 
27
27
  /**
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
29
29
  *
30
30
  * the version string like "1.2.3"
31
31
  */
32
- #define LIBXML_DOTTED_VERSION "2.11.0"
32
+ #define LIBXML_DOTTED_VERSION "@VERSION@"
33
33
 
34
34
  /**
35
35
  * LIBXML_VERSION:
36
36
  *
37
37
  * the version number: 1.2.3 value is 10203
38
38
  */
39
- #define LIBXML_VERSION 21100
39
+ #define LIBXML_VERSION @LIBXML_VERSION_NUMBER@
40
40
 
41
41
  /**
42
42
  * LIBXML_VERSION_STRING:
43
43
  *
44
44
  * the version number string, 1.2.3 value is "10203"
45
45
  */
46
- #define LIBXML_VERSION_STRING "21100"
46
+ #define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
47
47
 
48
48
  /**
49
49
  * LIBXML_VERSION_EXTRA:
50
50
  *
51
51
  * extra version information, used to show a git commit description
52
52
  */
53
- #define LIBXML_VERSION_EXTRA "-GITv2.10.0-263-gccb6d544"
53
+ #define LIBXML_VERSION_EXTRA "@LIBXML_VERSION_EXTRA@"
54
54
 
55
55
  /**
56
56
  * LIBXML_TEST_VERSION:
@@ -58,10 +58,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
58
58
  * Macro to check that the libxml version in use is compatible with
59
59
  * the version the software has been compiled against
60
60
  */
61
- #define LIBXML_TEST_VERSION xmlCheckVersion(21100);
61
+ #define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
62
62
 
63
63
  #ifndef VMS
64
- #if 0
64
+ #if @WITH_TRIO@
65
65
  /**
66
66
  * WITH_TRIO:
67
67
  *
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
90
90
  *
91
91
  * Whether the thread support is configured in
92
92
  */
93
- #if 1
93
+ #if @WITH_THREADS@
94
94
  #define LIBXML_THREAD_ENABLED
95
95
  #endif
96
96
 
@@ -99,7 +99,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
99
99
  *
100
100
  * Whether the allocation hooks are per-thread
101
101
  */
102
- #if 0
102
+ #if @WITH_THREAD_ALLOC@
103
103
  #define LIBXML_THREAD_ALLOC_ENABLED
104
104
  #endif
105
105
 
@@ -108,7 +108,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
108
108
  *
109
109
  * Whether the DOM like tree manipulation API support is configured in
110
110
  */
111
- #if 1
111
+ #if @WITH_TREE@
112
112
  #define LIBXML_TREE_ENABLED
113
113
  #endif
114
114
 
@@ -117,7 +117,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
117
117
  *
118
118
  * Whether the serialization/saving support is configured in
119
119
  */
120
- #if 1
120
+ #if @WITH_OUTPUT@
121
121
  #define LIBXML_OUTPUT_ENABLED
122
122
  #endif
123
123
 
@@ -126,7 +126,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
126
126
  *
127
127
  * Whether the push parsing interfaces are configured in
128
128
  */
129
- #if 1
129
+ #if @WITH_PUSH@
130
130
  #define LIBXML_PUSH_ENABLED
131
131
  #endif
132
132
 
@@ -135,7 +135,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
135
135
  *
136
136
  * Whether the xmlReader parsing interface is configured in
137
137
  */
138
- #if 1
138
+ #if @WITH_READER@
139
139
  #define LIBXML_READER_ENABLED
140
140
  #endif
141
141
 
@@ -144,7 +144,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
144
144
  *
145
145
  * Whether the xmlPattern node selection interface is configured in
146
146
  */
147
- #if 1
147
+ #if @WITH_PATTERN@
148
148
  #define LIBXML_PATTERN_ENABLED
149
149
  #endif
150
150
 
@@ -153,7 +153,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
153
153
  *
154
154
  * Whether the xmlWriter saving interface is configured in
155
155
  */
156
- #if 1
156
+ #if @WITH_WRITER@
157
157
  #define LIBXML_WRITER_ENABLED
158
158
  #endif
159
159
 
@@ -162,7 +162,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
162
162
  *
163
163
  * Whether the older SAX1 interface is configured in
164
164
  */
165
- #if 0
165
+ #if @WITH_SAX1@
166
166
  #define LIBXML_SAX1_ENABLED
167
167
  #endif
168
168
 
@@ -171,7 +171,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
171
171
  *
172
172
  * Whether the FTP support is configured in
173
173
  */
174
- #if 0
174
+ #if @WITH_FTP@
175
175
  #define LIBXML_FTP_ENABLED
176
176
  #endif
177
177
 
@@ -180,7 +180,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
180
180
  *
181
181
  * Whether the HTTP support is configured in
182
182
  */
183
- #if 1
183
+ #if @WITH_HTTP@
184
184
  #define LIBXML_HTTP_ENABLED
185
185
  #endif
186
186
 
@@ -189,7 +189,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
189
189
  *
190
190
  * Whether the DTD validation support is configured in
191
191
  */
192
- #if 1
192
+ #if @WITH_VALID@
193
193
  #define LIBXML_VALID_ENABLED
194
194
  #endif
195
195
 
@@ -198,7 +198,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
198
198
  *
199
199
  * Whether the HTML support is configured in
200
200
  */
201
- #if 1
201
+ #if @WITH_HTML@
202
202
  #define LIBXML_HTML_ENABLED
203
203
  #endif
204
204
 
@@ -207,7 +207,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
207
207
  *
208
208
  * Whether the deprecated APIs are compiled in for compatibility
209
209
  */
210
- #if 0
210
+ #if @WITH_LEGACY@
211
211
  #define LIBXML_LEGACY_ENABLED
212
212
  #endif
213
213
 
@@ -216,7 +216,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
216
216
  *
217
217
  * Whether the Canonicalization support is configured in
218
218
  */
219
- #if 1
219
+ #if @WITH_C14N@
220
220
  #define LIBXML_C14N_ENABLED
221
221
  #endif
222
222
 
@@ -225,7 +225,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
225
225
  *
226
226
  * Whether the Catalog support is configured in
227
227
  */
228
- #if 1
228
+ #if @WITH_CATALOG@
229
229
  #define LIBXML_CATALOG_ENABLED
230
230
  #endif
231
231
 
@@ -234,7 +234,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
234
234
  *
235
235
  * Whether XPath is configured in
236
236
  */
237
- #if 1
237
+ #if @WITH_XPATH@
238
238
  #define LIBXML_XPATH_ENABLED
239
239
  #endif
240
240
 
@@ -243,7 +243,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
243
243
  *
244
244
  * Whether XPointer is configured in
245
245
  */
246
- #if 1
246
+ #if @WITH_XPTR@
247
247
  #define LIBXML_XPTR_ENABLED
248
248
  #endif
249
249
 
@@ -252,7 +252,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
252
252
  *
253
253
  * Whether support for XPointer locations is configured in
254
254
  */
255
- #if 0
255
+ #if @WITH_XPTR_LOCS@
256
256
  #define LIBXML_XPTR_LOCS_ENABLED
257
257
  #endif
258
258
 
@@ -261,7 +261,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
261
261
  *
262
262
  * Whether XInclude is configured in
263
263
  */
264
- #if 1
264
+ #if @WITH_XINCLUDE@
265
265
  #define LIBXML_XINCLUDE_ENABLED
266
266
  #endif
267
267
 
@@ -270,7 +270,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
270
270
  *
271
271
  * Whether iconv support is available
272
272
  */
273
- #if 1
273
+ #if @WITH_ICONV@
274
274
  #define LIBXML_ICONV_ENABLED
275
275
  #endif
276
276
 
@@ -279,7 +279,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
279
279
  *
280
280
  * Whether icu support is available
281
281
  */
282
- #if 0
282
+ #if @WITH_ICU@
283
283
  #define LIBXML_ICU_ENABLED
284
284
  #endif
285
285
 
@@ -288,7 +288,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
288
288
  *
289
289
  * Whether ISO-8859-* support is made available in case iconv is not
290
290
  */
291
- #if 1
291
+ #if @WITH_ISO8859X@
292
292
  #define LIBXML_ISO8859X_ENABLED
293
293
  #endif
294
294
 
@@ -297,7 +297,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
297
297
  *
298
298
  * Whether Debugging module is configured in
299
299
  */
300
- #if 0
300
+ #if @WITH_DEBUG@
301
301
  #define LIBXML_DEBUG_ENABLED
302
302
  #endif
303
303
 
@@ -306,7 +306,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
306
306
  *
307
307
  * Whether the memory debugging is configured in
308
308
  */
309
- #if 0
309
+ #if @WITH_MEM_DEBUG@
310
310
  #define DEBUG_MEMORY_LOCATION
311
311
  #endif
312
312
 
@@ -324,7 +324,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
324
324
  *
325
325
  * Whether the Unicode related interfaces are compiled in
326
326
  */
327
- #if 1
327
+ #if @WITH_REGEXPS@
328
328
  #define LIBXML_UNICODE_ENABLED
329
329
  #endif
330
330
 
@@ -333,7 +333,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
333
333
  *
334
334
  * Whether the regular expressions interfaces are compiled in
335
335
  */
336
- #if 1
336
+ #if @WITH_REGEXPS@
337
337
  #define LIBXML_REGEXP_ENABLED
338
338
  #endif
339
339
 
@@ -342,7 +342,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
342
342
  *
343
343
  * Whether the automata interfaces are compiled in
344
344
  */
345
- #if 1
345
+ #if @WITH_REGEXPS@
346
346
  #define LIBXML_AUTOMATA_ENABLED
347
347
  #endif
348
348
 
@@ -362,7 +362,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
362
362
  *
363
363
  * Whether the Schemas validation interfaces are compiled in
364
364
  */
365
- #if 1
365
+ #if @WITH_SCHEMAS@
366
366
  #define LIBXML_SCHEMAS_ENABLED
367
367
  #endif
368
368
 
@@ -371,7 +371,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
371
371
  *
372
372
  * Whether the Schematron validation interfaces are compiled in
373
373
  */
374
- #if 1
374
+ #if @WITH_SCHEMATRON@
375
375
  #define LIBXML_SCHEMATRON_ENABLED
376
376
  #endif
377
377
 
@@ -380,14 +380,14 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
380
380
  *
381
381
  * Whether the module interfaces are compiled in
382
382
  */
383
- #if 1
383
+ #if @WITH_MODULES@
384
384
  #define LIBXML_MODULES_ENABLED
385
385
  /**
386
386
  * LIBXML_MODULE_EXTENSION:
387
387
  *
388
388
  * the string suffix used by dynamic modules (usually shared libraries)
389
389
  */
390
- #define LIBXML_MODULE_EXTENSION ".so"
390
+ #define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
391
391
  #endif
392
392
 
393
393
  /**
@@ -395,7 +395,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
395
395
  *
396
396
  * Whether the Zlib support is compiled in
397
397
  */
398
- #if 1
398
+ #if @WITH_ZLIB@
399
399
  #define LIBXML_ZLIB_ENABLED
400
400
  #endif
401
401
 
@@ -404,7 +404,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
404
404
  *
405
405
  * Whether the Lzma support is compiled in
406
406
  */
407
- #if 1
407
+ #if @WITH_LZMA@
408
408
  #define LIBXML_LZMA_ENABLED
409
409
  #endif
410
410
 
@@ -285,7 +285,7 @@ mark_node_orders(lxb_dom_node_t *root)
285
285
  void sort_nodes_if_necessary(VALUE selector, lxb_dom_document_t *doc, lexbor_array_t *array)
286
286
  {
287
287
  // No need to sort if there's only one selector, the results are natually in document traversal order
288
- if (strnstr(RSTRING_PTR(selector), ",", RSTRING_LEN(selector)) != NULL)
288
+ if (strchr(RSTRING_PTR(selector), ',') != NULL)
289
289
  {
290
290
  int need_order = 0;
291
291
  // Check if we have already markded orders, note that
@@ -179,7 +179,7 @@ rb_xml_xpath_context_new(VALUE klass, VALUE rb_node)
179
179
  ctx->node = node;
180
180
 
181
181
  self = Data_Wrap_Struct(klass, 0, free_xml_xpath_context, ctx);
182
- rb_iv_set(self, "@document", rb_iv_get(rb_node, "@document"));
182
+ rb_iv_set(self, "@document", nl_rb_document_get(rb_node));
183
183
 
184
184
  return self;
185
185
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nokolexbor
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokolexbor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yicheng Zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-15 00:00:00.000000000 Z
11
+ date: 2022-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -32,7 +32,8 @@ extensions:
32
32
  - ext/nokolexbor/extconf.rb
33
33
  extra_rdoc_files: []
34
34
  files:
35
- - ext/nokolexbor/config.h
35
+ - ext/nokolexbor/CMakeLists.txt
36
+ - ext/nokolexbor/config.h.cmake.in
36
37
  - ext/nokolexbor/extconf.rb
37
38
  - ext/nokolexbor/libxml.h
38
39
  - ext/nokolexbor/libxml/HTMLparser.h
@@ -59,7 +60,7 @@ files:
59
60
  - ext/nokolexbor/libxml/xmlmemory.h
60
61
  - ext/nokolexbor/libxml/xmlregexp.h
61
62
  - ext/nokolexbor/libxml/xmlstring.h
62
- - ext/nokolexbor/libxml/xmlversion.h
63
+ - ext/nokolexbor/libxml/xmlversion.h.in
63
64
  - ext/nokolexbor/libxml/xpath.h
64
65
  - ext/nokolexbor/libxml/xpathInternals.h
65
66
  - ext/nokolexbor/libxml/xpointer.h
@@ -519,7 +520,8 @@ files:
519
520
  homepage: https://github.com/serpapi/nokolexbor
520
521
  licenses:
521
522
  - MIT
522
- metadata: {}
523
+ metadata:
524
+ msys2_mingw_dependencies: cmake
523
525
  post_install_message:
524
526
  rdoc_options: []
525
527
  require_paths:
@@ -1,186 +0,0 @@
1
- /* config.h. Generated from config.h.in by configure. */
2
- /* config.h.in. Generated from configure.ac by autoheader. */
3
-
4
- /* A form that will not confuse apibuild.py */
5
- #define ATTRIBUTE_DESTRUCTOR __attribute__((destructor))
6
-
7
- /* Define to 1 if you have the <arpa/inet.h> header file. */
8
- #define HAVE_ARPA_INET_H 1
9
-
10
- /* Define if __attribute__((destructor)) is accepted */
11
- #define HAVE_ATTRIBUTE_DESTRUCTOR 1
12
-
13
- /* Define to 1 if you have the <dlfcn.h> header file. */
14
- #define HAVE_DLFCN_H 1
15
-
16
- /* Have dlopen based dso */
17
- #define HAVE_DLOPEN /**/
18
-
19
- /* Define to 1 if you have the <dl.h> header file. */
20
- /* #undef HAVE_DL_H */
21
-
22
- /* Define to 1 if you have the <fcntl.h> header file. */
23
- #define HAVE_FCNTL_H 1
24
-
25
- /* Define to 1 if you have the `ftime' function. */
26
- #define HAVE_FTIME 1
27
-
28
- /* Define to 1 if you have the `gettimeofday' function. */
29
- #define HAVE_GETTIMEOFDAY 1
30
-
31
- /* Define to 1 if you have the <glob.h> header file. */
32
- #define HAVE_GLOB_H 1
33
-
34
- /* Define to 1 if you have the <inttypes.h> header file. */
35
- #define HAVE_INTTYPES_H 1
36
-
37
- /* Define to 1 if you have the `isascii' function. */
38
- #define HAVE_ISASCII 1
39
-
40
- /* Define if history library is there (-lhistory) */
41
- /* #undef HAVE_LIBHISTORY */
42
-
43
- /* Define if readline library is there (-lreadline) */
44
- /* #undef HAVE_LIBREADLINE */
45
-
46
- /* Define to 1 if you have the <lzma.h> header file. */
47
- /* #undef HAVE_LZMA_H */
48
-
49
- /* Define to 1 if you have the `mmap' function. */
50
- #define HAVE_MMAP 1
51
-
52
- /* Define to 1 if you have the `munmap' function. */
53
- #define HAVE_MUNMAP 1
54
-
55
- /* mmap() is no good without munmap() */
56
- #if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
57
- # undef /**/ HAVE_MMAP
58
- #endif
59
-
60
- /* Define to 1 if you have the <netdb.h> header file. */
61
- #define HAVE_NETDB_H 1
62
-
63
- /* Define to 1 if you have the <netinet/in.h> header file. */
64
- #define HAVE_NETINET_IN_H 1
65
-
66
- /* Define to 1 if you have the <poll.h> header file. */
67
- #define HAVE_POLL_H 1
68
-
69
- /* Define to 1 if you have the <pthread.h> header file. */
70
- #define HAVE_PTHREAD_H /**/
71
-
72
- /* Define to 1 if you have the `putenv' function. */
73
- #define HAVE_PUTENV 1
74
-
75
- /* Define to 1 if you have the `rand_r' function. */
76
- #define HAVE_RAND_R 1
77
-
78
- /* Have shl_load based dso */
79
- /* #undef HAVE_SHLLOAD */
80
-
81
- /* Define to 1 if you have the `snprintf' function. */
82
- #define HAVE_SNPRINTF 1
83
-
84
- /* Define to 1 if you have the `stat' function. */
85
- #define HAVE_STAT 1
86
-
87
- /* Define to 1 if you have the <stdint.h> header file. */
88
- #define HAVE_STDINT_H 1
89
-
90
- /* Define to 1 if you have the <stdio.h> header file. */
91
- #define HAVE_STDIO_H 1
92
-
93
- /* Define to 1 if you have the <stdlib.h> header file. */
94
- #define HAVE_STDLIB_H 1
95
-
96
- /* Define to 1 if you have the <strings.h> header file. */
97
- #define HAVE_STRINGS_H 1
98
-
99
- /* Define to 1 if you have the <string.h> header file. */
100
- #define HAVE_STRING_H 1
101
-
102
- /* Define to 1 if you have the <sys/mman.h> header file. */
103
- #define HAVE_SYS_MMAN_H 1
104
-
105
- /* Define to 1 if you have the <sys/select.h> header file. */
106
- #define HAVE_SYS_SELECT_H 1
107
-
108
- /* Define to 1 if you have the <sys/socket.h> header file. */
109
- #define HAVE_SYS_SOCKET_H 1
110
-
111
- /* Define to 1 if you have the <sys/stat.h> header file. */
112
- #define HAVE_SYS_STAT_H 1
113
-
114
- /* Define to 1 if you have the <sys/timeb.h> header file. */
115
- #define HAVE_SYS_TIMEB_H 1
116
-
117
- /* Define to 1 if you have the <sys/time.h> header file. */
118
- #define HAVE_SYS_TIME_H 1
119
-
120
- /* Define to 1 if you have the <sys/types.h> header file. */
121
- #define HAVE_SYS_TYPES_H 1
122
-
123
- /* Define to 1 if you have the <unistd.h> header file. */
124
- #define HAVE_UNISTD_H 1
125
-
126
- /* Whether va_copy() is available */
127
- #define HAVE_VA_COPY 1
128
-
129
- /* Define to 1 if you have the `vsnprintf' function. */
130
- #define HAVE_VSNPRINTF 1
131
-
132
- /* Define to 1 if you have the <zlib.h> header file. */
133
- /* #undef HAVE_ZLIB_H */
134
-
135
- /* Whether __va_copy() is available */
136
- /* #undef HAVE___VA_COPY */
137
-
138
- /* Define to the sub-directory where libtool stores uninstalled libraries. */
139
- #define LT_OBJDIR ".libs/"
140
-
141
- /* Name of package */
142
- #define PACKAGE "libxml2"
143
-
144
- /* Define to the address where bug reports for this package should be sent. */
145
- #define PACKAGE_BUGREPORT ""
146
-
147
- /* Define to the full name of this package. */
148
- #define PACKAGE_NAME "libxml2"
149
-
150
- /* Define to the full name and version of this package. */
151
- #define PACKAGE_STRING "libxml2 2.11.0"
152
-
153
- /* Define to the one symbol short name of this package. */
154
- #define PACKAGE_TARNAME "libxml2"
155
-
156
- /* Define to the home page for this package. */
157
- #define PACKAGE_URL ""
158
-
159
- /* Define to the version of this package. */
160
- #define PACKAGE_VERSION "2.11.0"
161
-
162
- /* Define to 1 if all of the C90 standard headers exist (not just the ones
163
- required in a freestanding environment). This macro is provided for
164
- backward compatibility; new code need not use it. */
165
- #define STDC_HEADERS 1
166
-
167
- /* Support for IPv6 */
168
- #define SUPPORT_IP6 /**/
169
-
170
- /* Define if va_list is an array type */
171
- #define VA_LIST_IS_ARRAY 1
172
-
173
- /* Version number of package */
174
- #define VERSION "2.11.0"
175
-
176
- /* Determine what socket length (socklen_t) data type is */
177
- #define XML_SOCKLEN_T socklen_t
178
-
179
- /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
180
- <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
181
- #define below would cause a syntax error. */
182
- /* #undef _UINT32_T */
183
-
184
- /* Define to the type of an unsigned integer type of width exactly 32 bits if
185
- such a type exists and the standard includes do not define it. */
186
- /* #undef uint32_t */