node-sword-interface 1.0.52 → 1.0.54
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/binding.gyp
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
+
"variables": {
|
|
3
|
+
# Detect if we are building for iOS by checking an env var
|
|
4
|
+
"is_ios%": "<!(python -c \"import os; print(1 if os.environ.get('PLATFORM') == 'ios' or os.environ.get('SDKROOT') and 'iPhone' in os.environ.get('SDKROOT') else 0)\")"
|
|
5
|
+
},
|
|
2
6
|
"targets": [
|
|
3
7
|
{
|
|
4
8
|
'target_name': 'sword',
|
|
5
9
|
'type': 'none',
|
|
6
10
|
'conditions': [
|
|
11
|
+
["is_ios==1", {
|
|
12
|
+
"xcode_settings": {
|
|
13
|
+
"SDKROOT": "iphoneos",
|
|
14
|
+
"IPHONEOS_DEPLOYMENT_TARGET": "12.0"
|
|
15
|
+
},
|
|
16
|
+
'actions': [
|
|
17
|
+
{
|
|
18
|
+
'action_name': 'build_sword',
|
|
19
|
+
'message': 'Building sword library for iOS...',
|
|
20
|
+
'inputs': [],
|
|
21
|
+
'outputs': ['sword_build/libsword.a'],
|
|
22
|
+
'action': ['./scripts/build_sword.sh', '--ios'],
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}],
|
|
7
26
|
[ "OS == 'mac'", {
|
|
8
27
|
'actions': [
|
|
9
28
|
{
|
|
10
29
|
'action_name': 'build_sword',
|
|
11
|
-
'message': 'Building sword library...',
|
|
30
|
+
'message': 'Building sword library for macOS ...',
|
|
12
31
|
'inputs': [],
|
|
13
32
|
'outputs': ['sword_build/libsword.a'],
|
|
14
33
|
'action': ['./scripts/build_sword.sh'],
|
|
@@ -19,7 +38,7 @@
|
|
|
19
38
|
'actions': [
|
|
20
39
|
{
|
|
21
40
|
'action_name': 'build_sword',
|
|
22
|
-
'message': 'Building sword library...',
|
|
41
|
+
'message': 'Building sword library for Linux...',
|
|
23
42
|
'inputs': [],
|
|
24
43
|
'outputs': ['sword_build/libsword.a'],
|
|
25
44
|
'action': ['./scripts/build_sword.sh'],
|
|
@@ -30,7 +49,7 @@
|
|
|
30
49
|
'actions': [
|
|
31
50
|
{
|
|
32
51
|
'action_name': 'build_sword',
|
|
33
|
-
'message': 'Building sword library...',
|
|
52
|
+
'message': 'Building sword library for Android...',
|
|
34
53
|
'inputs': [],
|
|
35
54
|
'outputs': ['sword_build/libsword.a'],
|
|
36
55
|
'action': ['./scripts/build_sword.sh', '--android', '<(target_arch)'],
|
|
@@ -75,6 +94,20 @@
|
|
|
75
94
|
"src/napi_module/binding.cpp"
|
|
76
95
|
],
|
|
77
96
|
"conditions":[
|
|
97
|
+
["is_ios==1", {
|
|
98
|
+
'include_dirs': [
|
|
99
|
+
"<(module_root_dir)/src/sword_backend",
|
|
100
|
+
"<!@(node -p \"require('node-addon-api').include\")",
|
|
101
|
+
"<!@(./scripts/get_sword_include_path.sh)"
|
|
102
|
+
],
|
|
103
|
+
"libraries": [
|
|
104
|
+
'<!@(./scripts/get_sword_library.sh "../sword_build/libsword.a")'
|
|
105
|
+
],
|
|
106
|
+
"dependencies": [
|
|
107
|
+
"<!(node -p \"require('node-addon-api').gyp\")",
|
|
108
|
+
'sword'
|
|
109
|
+
]
|
|
110
|
+
}],
|
|
78
111
|
["OS=='linux'", {
|
|
79
112
|
'include_dirs': [
|
|
80
113
|
"<(module_root_dir)/src/sword_backend",
|
package/package.json
CHANGED
package/scripts/build_sword.sh
CHANGED
|
@@ -31,7 +31,7 @@ fi
|
|
|
31
31
|
|
|
32
32
|
# CLONE SWORD
|
|
33
33
|
git clone https://github.com/ezra-bible-app/crosswire-sword-mirror sword
|
|
34
|
-
git -C sword checkout
|
|
34
|
+
git -C sword checkout 11e8b06
|
|
35
35
|
patch --batch --forward -d sword -p 0 < patch/sword_globconf.patch
|
|
36
36
|
|
|
37
37
|
# PATCHES
|
|
@@ -79,6 +79,22 @@ if [ "$1" = "--android" ] ; then
|
|
|
79
79
|
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-z,max-page-size=16384" \
|
|
80
80
|
-DNODYNCAST=1 \
|
|
81
81
|
../sword
|
|
82
|
+
elif [ "$1" = "--ios" ] ; then
|
|
83
|
+
git clone https://github.com/karlkleinpaste/biblesync.git
|
|
84
|
+
git -C biblesync checkout 2.1.0
|
|
85
|
+
|
|
86
|
+
cd sword_build
|
|
87
|
+
|
|
88
|
+
cmake -DCMAKE_SYSTEM_NAME=iOS \
|
|
89
|
+
-DLIBSWORD_LIBRARY_TYPE=Static \
|
|
90
|
+
-DCMAKE_CXX_STANDARD=11 \
|
|
91
|
+
-DCMAKE_OSX_ARCHITECTURES="arm64" \
|
|
92
|
+
-DCMAKE_OSX_SYSROOT=iphoneos \
|
|
93
|
+
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
|
|
94
|
+
-DCMAKE_BUILD_TYPE=$SWORD_BUILD_TYPE \
|
|
95
|
+
-DNODYNCAST=1 \
|
|
96
|
+
-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
|
|
97
|
+
../sword
|
|
82
98
|
else
|
|
83
99
|
# macOS & Linux
|
|
84
100
|
|
|
@@ -201,7 +201,7 @@ vector<string> RepositoryInterface::getRepoNames()
|
|
|
201
201
|
|
|
202
202
|
string source = string(it->second->caption);
|
|
203
203
|
|
|
204
|
-
#if defined(__ANDROID__)
|
|
204
|
+
#if defined(__ANDROID__) || defined(__APPLE__)
|
|
205
205
|
// Since August/September 2024 there have been issues observed with the access to the STEP Bible repository.
|
|
206
206
|
// We filter it out here, since it is currently dysfunctional.
|
|
207
207
|
if (source != "STEP Bible") {
|
|
@@ -590,4 +590,4 @@ bool RepositoryInterface::isModuleAvailableInRepo(string moduleName, string repo
|
|
|
590
590
|
sword::InstallMgr* RepositoryInterface::getInstallMgr()
|
|
591
591
|
{
|
|
592
592
|
return this->_installMgr;
|
|
593
|
-
}
|
|
593
|
+
}
|