@cpp.js/package-expat 1.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/cppjs-package-expat.podspec +13 -0
  4. package/cppjs.build.js +16 -0
  5. package/cppjs.config.js +12 -0
  6. package/dist/prebuilt/Android-arm64-v8a/include/expat.h +1075 -0
  7. package/dist/prebuilt/Android-arm64-v8a/include/expat_config.h +146 -0
  8. package/dist/prebuilt/Android-arm64-v8a/include/expat_external.h +165 -0
  9. package/dist/prebuilt/Android-arm64-v8a/lib/cmake/expat-2.6.2/expat-config-version.cmake +65 -0
  10. package/dist/prebuilt/Android-arm64-v8a/lib/cmake/expat-2.6.2/expat-config.cmake +99 -0
  11. package/dist/prebuilt/Android-arm64-v8a/lib/cmake/expat-2.6.2/expat-noconfig.cmake +19 -0
  12. package/dist/prebuilt/Android-arm64-v8a/lib/cmake/expat-2.6.2/expat.cmake +107 -0
  13. package/dist/prebuilt/Android-arm64-v8a/lib/libexpat.la +41 -0
  14. package/dist/prebuilt/Android-arm64-v8a/lib/libexpat.so +0 -0
  15. package/dist/prebuilt/Android-arm64-v8a/lib/pkgconfig/expat.pc +13 -0
  16. package/dist/prebuilt/Android-arm64-v8a/share/doc/expat/AUTHORS +10 -0
  17. package/dist/prebuilt/Android-arm64-v8a/share/doc/expat/changelog +1468 -0
  18. package/dist/prebuilt/CMakeLists.txt +44 -0
  19. package/dist/prebuilt/Emscripten-x86_64/include/expat.h +1075 -0
  20. package/dist/prebuilt/Emscripten-x86_64/include/expat_config.h +146 -0
  21. package/dist/prebuilt/Emscripten-x86_64/include/expat_external.h +165 -0
  22. package/dist/prebuilt/Emscripten-x86_64/lib/cmake/expat-2.6.2/expat-config-version.cmake +65 -0
  23. package/dist/prebuilt/Emscripten-x86_64/lib/cmake/expat-2.6.2/expat-config.cmake +99 -0
  24. package/dist/prebuilt/Emscripten-x86_64/lib/cmake/expat-2.6.2/expat-noconfig.cmake +19 -0
  25. package/dist/prebuilt/Emscripten-x86_64/lib/cmake/expat-2.6.2/expat.cmake +107 -0
  26. package/dist/prebuilt/Emscripten-x86_64/lib/libexpat.a +0 -0
  27. package/dist/prebuilt/Emscripten-x86_64/lib/libexpat.la +41 -0
  28. package/dist/prebuilt/Emscripten-x86_64/lib/pkgconfig/expat.pc +13 -0
  29. package/dist/prebuilt/Emscripten-x86_64/share/doc/expat/AUTHORS +10 -0
  30. package/dist/prebuilt/Emscripten-x86_64/share/doc/expat/changelog +1468 -0
  31. package/dist/prebuilt/expat.xcframework/Info.plist +50 -0
  32. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e/Headers/expat.h +1075 -0
  33. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e/Headers/expat_config.h +146 -0
  34. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e/Headers/expat_external.h +165 -0
  35. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e/libexpat.a +0 -0
  36. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/expat.h +1075 -0
  37. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/expat_config.h +146 -0
  38. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/expat_external.h +165 -0
  39. package/dist/prebuilt/expat.xcframework/ios-arm64_arm64e_x86_64-simulator/libexpat.a +0 -0
  40. package/dist/prebuilt/iOS-iphoneos/include/expat.h +1075 -0
  41. package/dist/prebuilt/iOS-iphoneos/include/expat_config.h +146 -0
  42. package/dist/prebuilt/iOS-iphoneos/include/expat_external.h +165 -0
  43. package/dist/prebuilt/iOS-iphoneos/lib/cmake/expat-2.6.2/expat-config-version.cmake +65 -0
  44. package/dist/prebuilt/iOS-iphoneos/lib/cmake/expat-2.6.2/expat-config.cmake +99 -0
  45. package/dist/prebuilt/iOS-iphoneos/lib/cmake/expat-2.6.2/expat-noconfig.cmake +19 -0
  46. package/dist/prebuilt/iOS-iphoneos/lib/cmake/expat-2.6.2/expat.cmake +107 -0
  47. package/dist/prebuilt/iOS-iphoneos/lib/libexpat.a +0 -0
  48. package/dist/prebuilt/iOS-iphoneos/lib/libexpat.la +41 -0
  49. package/dist/prebuilt/iOS-iphoneos/lib/pkgconfig/expat.pc +13 -0
  50. package/dist/prebuilt/iOS-iphoneos/share/doc/expat/AUTHORS +10 -0
  51. package/dist/prebuilt/iOS-iphoneos/share/doc/expat/changelog +1468 -0
  52. package/dist/prebuilt/iOS-iphonesimulator/include/expat.h +1075 -0
  53. package/dist/prebuilt/iOS-iphonesimulator/include/expat_config.h +146 -0
  54. package/dist/prebuilt/iOS-iphonesimulator/include/expat_external.h +165 -0
  55. package/dist/prebuilt/iOS-iphonesimulator/lib/cmake/expat-2.6.2/expat-config-version.cmake +65 -0
  56. package/dist/prebuilt/iOS-iphonesimulator/lib/cmake/expat-2.6.2/expat-config.cmake +99 -0
  57. package/dist/prebuilt/iOS-iphonesimulator/lib/cmake/expat-2.6.2/expat-noconfig.cmake +19 -0
  58. package/dist/prebuilt/iOS-iphonesimulator/lib/cmake/expat-2.6.2/expat.cmake +107 -0
  59. package/dist/prebuilt/iOS-iphonesimulator/lib/libexpat.a +0 -0
  60. package/dist/prebuilt/iOS-iphonesimulator/lib/libexpat.la +41 -0
  61. package/dist/prebuilt/iOS-iphonesimulator/lib/pkgconfig/expat.pc +13 -0
  62. package/dist/prebuilt/iOS-iphonesimulator/share/doc/expat/AUTHORS +10 -0
  63. package/dist/prebuilt/iOS-iphonesimulator/share/doc/expat/changelog +1468 -0
  64. package/package.json +28 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
2
+ Copyright (c) 2001-2022 Expat maintainers
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included
13
+ in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @cpp.js/package-expat
2
+ **Precompiled expat library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.**
3
+
4
+ <a href="https://www.npmjs.com/package/@cpp.js/package-expat">
5
+ <img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-expat?style=for-the-badge" />
6
+ </a>
7
+ <a href="https://github.com/libexpat/libexpat/blob/master/COPYING">
8
+ <img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-expat?style=for-the-badge" />
9
+ </a>
10
+
11
+ ## Integration
12
+ Start by installing these package with the following command:
13
+
14
+ ```sh
15
+ npm install @cpp.js/package-expat
16
+ ```
17
+
18
+ To enable the library, modify the cppjs.config.js file as shown below.
19
+ ```diff
20
+ +import expat from '@cpp.js/package-expat/cppjs.config.js';
21
+
22
+ export default {
23
+ dependencies: [
24
+ + expat
25
+ ]
26
+ paths: {
27
+ config: import.meta.url,
28
+ }
29
+ };
30
+ ```
31
+
32
+ ## Usage
33
+ Below are the steps to use the expat in your C++ or JavaScript code.
34
+
35
+ ### Usage in C++ Code
36
+ ```diff
37
+ +#include <expat.h>
38
+
39
+ std::string Native::sample() {
40
+ + return std::string(XML_ExpatVersion());
41
+ }
42
+ ```
43
+
44
+ ## License
45
+ This project includes the precompiled expat library, which is distributed under the [MIT License](https://github.com/libexpat/libexpat/blob/master/COPYING).
46
+
47
+ Expat Homepage: <https://github.com/libexpat/libexpat>
@@ -0,0 +1,13 @@
1
+ require "json"
2
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
3
+
4
+ Pod::Spec.new do |s|
5
+ s.module_name = "expat"
6
+ s.name = package["name"]
7
+ s.version = package["nativeVersion"]
8
+ s.summary = "Fast streaming XML parser"
9
+ s.homepage = "https://github.com/libexpat/libexpat"
10
+ s.author = "Thai Open Source Software Center Ltd, Clark Cooper, and Expat maintainers"
11
+ s.source = { :http => "https://cpp.js.org" }
12
+ s.vendored_frameworks = 'expat.xcframework'
13
+ end
package/cppjs.build.js ADDED
@@ -0,0 +1,16 @@
1
+ const platformBuild = {
2
+ 'Emscripten-x86_64': ['--enable-shared=no', '--host=wasm32-unknown-emscripten'],
3
+ 'Android-arm64-v8a': ['--enable-static=no', '--host=aarch64-linux-android'],
4
+ 'iOS-iphoneos': ['--enable-shared=no', '--host=arm-apple-darwin'],
5
+ 'iOS-iphonesimulator': ['--enable-shared=no', '--host=x86_64-apple-darwin'],
6
+ };
7
+
8
+ export default {
9
+ getURL: (version) => `https://github.com/libexpat/libexpat/releases/download/R_${version.replaceAll('.', '_')}/expat-${version}.tar.gz`,
10
+ buildType: 'configure',
11
+ getBuildParams: (platform) => [
12
+ ...(platformBuild[platform] || []),
13
+ '--without-getrandom', '--without-sys-getrandom',
14
+ '--without-xmlwf', '--without-examples', '--without-tests',
15
+ ],
16
+ };
@@ -0,0 +1,12 @@
1
+ export default {
2
+ general: {
3
+ name: 'expat',
4
+ },
5
+ export: {
6
+ type: 'cmake',
7
+ },
8
+ paths: {
9
+ config: import.meta.url,
10
+ output: 'dist',
11
+ },
12
+ };