forked from mordak/playbook-dev-tools
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
路71 lines (56 loc) 路 2 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
路71 lines (56 loc) 路 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
# QuickJS port for BlackBerry 10 / QNX
# Uses pre-compiled GCC 9 optimized binaries from sw7ft
# Avoids GCC 4.6.3 limitations in berrymuch toolchain
set -e
source ../../lib.sh
DISTVER="quickjs-qnx8-arm-deploy"
DISTSUFFIX="tar.gz"
TASK=fetch
# Use sw7ft's pre-compiled GCC 9 optimized package from GitHub Releases
DISTFILES="https://github.com/sw7ft/qnx-packages/releases/download/v1.0/QuickJS_QNX8_ARM_Deploy.tar.gz"
# Fallback to berrystore during transition:
# DISTFILES="https://berrystore.sw7ft.com/QuickJS_QNX8_ARM_Deploy.tar.gz"
UNPACKCOMD="tar -xzf"
package_init "$@"
# Override package_build - no compilation needed, just repackage
package_build() {
if [ "$TASK" == "build" ]
then
echo "Using pre-compiled QuickJS binaries (GCC 9 optimized)..."
cd "$WORKROOT"
# Extract sw7ft package
if [ ! -d "quickjs_qnx8_deploy" ]; then
echo "Error: quickjs_qnx8_deploy directory not found"
exit 1
fi
echo "Repackaging for berrymuch compatibility..."
TASK=install
fi
}
# Override package_install to use existing directory structure
package_install() {
if [ "$TASK" == "install" ]
then
echo "Installing pre-compiled QuickJS to $DESTDIR"
cd "$WORKROOT/quickjs_qnx8_deploy"
# Install binaries
mkdir -p "$DESTDIR/$PREFIX/bin"
cp -r bin/* "$DESTDIR/$PREFIX/bin/"
# Install libraries
mkdir -p "$DESTDIR/$PREFIX/lib"
cp -r lib/* "$DESTDIR/$PREFIX/lib/"
# Install headers
mkdir -p "$DESTDIR/$PREFIX/include"
cp -r include/* "$DESTDIR/$PREFIX/include/"
# Install documentation
mkdir -p "$DESTDIR/$PREFIX/share/doc/quickjs"
cp README.md DEPLOY.md "$DESTDIR/$PREFIX/share/doc/quickjs/" 2>/dev/null || true
TASK=bundle
fi
}
package_fetch
# Skip package_patch - no patches needed for pre-compiled binaries
package_build
package_install
package_bundle