@cpp.js/package-gdal 2.0.0-beta.2 → 2.0.0-beta.4
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.
- package/package.json +5 -5
- package/assets/gdal_empty_file.cpp +0 -0
- package/cppjs-package-gdal.podspec +0 -15
- package/cppjs.build.js +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cpp.js/package-gdal",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.4",
|
|
4
4
|
"nativeVersion": "3.12.1",
|
|
5
5
|
"description": "This package provides the precompiled GDAL, built using Cpp.js, for seamless integration into JavaScript, WebAssembly, and React Native projects. It enables advanced geospatial data processing, including raster and vector data manipulation, format conversion, and spatial analysis, ensuring high performance and cross-platform compatibility. Perfect for web, server-side, and mobile geospatial applications.",
|
|
6
6
|
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-package-gdal#readme",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"react-native"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cpp.js/package-gdal-wasm": "^2.0.0-beta.
|
|
19
|
-
"@cpp.js/package-gdal-android": "^2.0.0-beta.
|
|
20
|
-
"@cpp.js/package-gdal-ios": "^2.0.0-beta.
|
|
18
|
+
"@cpp.js/package-gdal-wasm": "^2.0.0-beta.4",
|
|
19
|
+
"@cpp.js/package-gdal-android": "^2.0.0-beta.4",
|
|
20
|
+
"@cpp.js/package-gdal-ios": "^2.0.0-beta.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"cpp.js": "^2.0.0-beta.
|
|
23
|
+
"cpp.js": "^2.0.0-beta.4"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
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 = "gdal"
|
|
6
|
-
s.name = "cppjs-package-gdal"
|
|
7
|
-
s.version = package["nativeVersion"]
|
|
8
|
-
s.summary = "GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats."
|
|
9
|
-
s.homepage = "https://github.com/OSGeo/gdal"
|
|
10
|
-
s.author = "GDAL Authors"
|
|
11
|
-
s.source = { :http => "https://cpp.js.org" }
|
|
12
|
-
s.vendored_frameworks = 'gdal.xcframework', 'expat.xcframework', 'geos.xcframework', 'geotiff.xcframework', 'iconv.xcframework', 'proj.xcframework', 'spatialite.xcframework', 'sqlite3.xcframework', 'tiff.xcframework', 'webp.xcframework', 'z.xcframework'
|
|
13
|
-
s.library = 'xml2'
|
|
14
|
-
s.resources = ['dist/prebuilt/iOS-iphoneos/share/gdal']
|
|
15
|
-
end
|
package/cppjs.build.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const platformCmake = {
|
|
2
|
-
'Emscripten-x86_64': ['-DBUILD_SHARED_LIBS=OFF'],
|
|
3
|
-
'Android-arm64-v8a': ['-DCMAKE_ANDROID_STL_TYPE=c++_shared'],
|
|
4
|
-
'Android-x86_64': ['-DCMAKE_ANDROID_STL_TYPE=c++_shared'],
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
getURL: (version) => `https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz`,
|
|
9
|
-
copyToSource: { 'assets/gdal_empty_file.cpp': 'gcore/gdal_empty_file.cpp' },
|
|
10
|
-
replaceList: [
|
|
11
|
-
{
|
|
12
|
-
regex: ' iconv_open',
|
|
13
|
-
replacement: ' libiconv_open',
|
|
14
|
-
paths: ['port/cpl_recode_iconv.cpp'],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
regex: ' iconv',
|
|
18
|
-
replacement: ' libiconv',
|
|
19
|
-
paths: ['port/cpl_recode_iconv.cpp'],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
regex: '#include <iconv.h>',
|
|
23
|
-
replacement: '# include <iconv.h>\nextern "C" {\n extern __attribute__((__visibility__("default"))) iconv_t libiconv_open (const char* tocode, const char* fromcode);\n extern __attribute__((__visibility__("default"))) size_t libiconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);\n}',
|
|
24
|
-
paths: ['port/cpl_recode_iconv.cpp'],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
regex: ' add_subdirectory\\(swig\\)',
|
|
28
|
-
replacement: '',
|
|
29
|
-
paths: ['gdal.cmake'],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
regex: 'add_library\\(\\$\\{GDAL_LIB_TARGET_NAME\\} gcore/gdal.h\\)',
|
|
33
|
-
replacement: 'add_library(${GDAL_LIB_TARGET_NAME} gcore/gdal.h gcore/gdal_empty_file.cpp)',
|
|
34
|
-
paths: ['gdal.cmake'],
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
buildType: 'cmake',
|
|
38
|
-
getBuildParams: (platform, depPaths) => [
|
|
39
|
-
...(platformCmake[platform] || []),
|
|
40
|
-
'-DBUILD_APPS=OFF', '-DBUILD_TESTING=OFF', '-DACCEPT_MISSING_SQLITE3_MUTEX_ALLOC=ON',
|
|
41
|
-
'-DOGR_ENABLE_DRIVER_GPSBABEL=OFF', '-DGDAL_USE_HDF5=OFF', '-DGDAL_USE_HDFS=OFF',
|
|
42
|
-
'-DGDAL_USE_ZSTD=OFF', '-DGDAL_ENABLE_DRIVER_PDS=OFF',
|
|
43
|
-
`-DSQLite3_INCLUDE_DIR=${depPaths.sqlite3.header}`, `-DSQLite3_LIBRARY=${depPaths.sqlite3.lib}`,
|
|
44
|
-
`-DPROJ_INCLUDE_DIR=${depPaths.proj.header}`, `-DPROJ_LIBRARY_RELEASE=${depPaths.proj.lib}`,
|
|
45
|
-
`-DTIFF_INCLUDE_DIR=${depPaths.tiff.header}`, `-DTIFF_LIBRARY_RELEASE=${depPaths.tiff.lib}`,
|
|
46
|
-
`-DGEOTIFF_INCLUDE_DIR=${depPaths.geotiff.header}`, `-DGEOTIFF_LIBRARY_RELEASE=${depPaths.geotiff.lib}`,
|
|
47
|
-
`-DZLIB_INCLUDE_DIR=${depPaths.z.header}`, `-DZLIB_LIBRARY_RELEASE=${depPaths.z.lib}`,
|
|
48
|
-
`-DSPATIALITE_INCLUDE_DIR=${depPaths.spatialite.header}`, `-DSPATIALITE_LIBRARY=${depPaths.spatialite.lib}`,
|
|
49
|
-
`-DGEOS_INCLUDE_DIR=${depPaths.geos.header}`, `-DGEOS_LIBRARY=${depPaths.geos_c.lib}`,
|
|
50
|
-
`-DWEBP_INCLUDE_DIR=${depPaths.webp.header}`, `-DWEBP_LIBRARY=${depPaths.webp.lib}`,
|
|
51
|
-
`-DEXPAT_INCLUDE_DIR=${depPaths.expat.header}`, `-DEXPAT_LIBRARY=${depPaths.expat.lib}`,
|
|
52
|
-
`-DIconv_INCLUDE_DIR=${depPaths.iconv.header}`, `-DIconv_LIBRARY=${depPaths.iconv.lib}`,
|
|
53
|
-
],
|
|
54
|
-
env: [
|
|
55
|
-
'CFLAGS="-DRENAME_INTERNAL_LIBTIFF_SYMBOLS"',
|
|
56
|
-
'CPPFLAGS="-DRENAME_INTERNAL_LIBTIFF_SYMBOLS"',
|
|
57
|
-
'EMCC_CFLAGS="-DRENAME_INTERNAL_LIBTIFF_SYMBOLS"',
|
|
58
|
-
],
|
|
59
|
-
};
|