node-sword-interface 1.0.74 → 1.0.75

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
@@ -6,10 +6,7 @@
6
6
  # 2. Get the deployment target (e.g., '15.0') from env, default to '13.0'
7
7
  "ios_ver%": "<!(python3 -c \"import os; print(os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'))\")",
8
8
 
9
- # 3. Detect if it's a simulator build
10
- "is_ios_sim%": "<!(python3 -c \"import os; print(1 if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else 0)\")",
11
-
12
- # 4. Construct the full target triple dynamically
9
+ # 3. Construct the full target triple dynamically
13
10
  "ios_target": "<!(python3 -c \"import os; ver = os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'); suffix = '-simulator' if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else ''; print(f'arm64-apple-ios{ver}{suffix}')\")"
14
11
  },
15
12
  "targets": [
@@ -28,7 +25,7 @@
28
25
  'message': 'Building sword library for iOS...',
29
26
  'inputs': [],
30
27
  'outputs': ['sword_build/libsword.a'],
31
- 'action': ['./scripts/build_sword.sh', '--ios'],
28
+ 'action': ['./scripts/build_sword.sh', '--ios', '<(ios_target)', '<(ios_ver)'],
32
29
  }
33
30
  ]
34
31
  }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -83,14 +83,26 @@ elif [ "$1" = "--ios" ] ; then
83
83
  git clone https://github.com/karlkleinpaste/biblesync.git
84
84
  git -C biblesync checkout 2.1.0
85
85
 
86
+ IOS_TARGET="$2"
87
+ IOS_VER="$3"
88
+
89
+ if [ -z "$IOS_VER" ]; then
90
+ IOS_VER="13.0"
91
+ fi
92
+
93
+ SYSROOT="iphoneos"
94
+ if echo "$IOS_TARGET" | grep -q "simulator"; then
95
+ SYSROOT="iphonesimulator"
96
+ fi
97
+
86
98
  cd sword_build
87
99
 
88
100
  cmake -DCMAKE_SYSTEM_NAME=iOS \
89
101
  -DLIBSWORD_LIBRARY_TYPE=Static \
90
102
  -DCMAKE_CXX_STANDARD=11 \
91
103
  -DCMAKE_OSX_ARCHITECTURES="arm64" \
92
- -DCMAKE_OSX_SYSROOT=iphoneos \
93
- -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
104
+ -DCMAKE_OSX_SYSROOT=$SYSROOT \
105
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=$IOS_VER \
94
106
  -DCMAKE_BUILD_TYPE=$SWORD_BUILD_TYPE \
95
107
  -DNODYNCAST=1 \
96
108
  -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \