karnel-termux 4.9.2 → 4.9.3

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.
@@ -56,7 +56,7 @@ _bun_install_deps_native_impl() {
56
56
  fi
57
57
  fi
58
58
  declare -A DEPS=(
59
- ["clang"]="clang"
59
+ ["clang"]="clang-21"
60
60
  ["unzip"]="unzip"
61
61
  ["curl"]="curl"
62
62
  )
@@ -122,32 +122,42 @@ _compile_bun_helper() {
122
122
  }
123
123
 
124
124
  _compile_bun_helper_impl() {
125
- local shim_src="$KARNEL_PATH/tools/lang/bun/src/bun-shim.c"
126
- local wrapper_src="$KARNEL_PATH/tools/lang/bun/src/bun_wrapper.c"
127
- if [ ! -f "$shim_src" ]; then
128
- log_error "Shim source not found at $shim_src"
129
- return 1
130
- fi
131
- if [ ! -f "$wrapper_src" ]; then
132
- log_error "Wrapper source not found at $wrapper_src"
133
- return 1
134
- fi
135
- mkdir -p "$PREFIX/lib"
136
- if ! clang -O2 -fPIC -shared -nostdlib -o "$PREFIX/lib/bun-shim.so" "$shim_src" &>>"$LOG_FILE"; then
137
- log_error "Failed to compile bun shim"
138
- return 1
139
- fi
140
- chmod +x "$PREFIX/lib/bun-shim.so"
141
- local wrapper_tmp="$TMPDIR/bun_wrapper_$$.c"
142
- sed "s|__BUN_REAL__|$BUN_DATA_DIR/bun.real|g" "$wrapper_src" >"$wrapper_tmp"
143
- if ! clang -O2 -o "$PREFIX/bin/bun" "$wrapper_tmp" &>>"$LOG_FILE"; then
144
- rm -f "$wrapper_tmp"
145
- log_error "Failed to compile bun wrapper"
146
- return 1
147
- fi
148
- chmod +x "$PREFIX/bin/bun"
149
- rm -f "$wrapper_tmp"
150
- return 0
125
+ local CC
126
+ if command -v clang-21 &>/dev/null; then
127
+ CC="clang-21"
128
+ elif command -v clang &>/dev/null; then
129
+ CC="clang"
130
+ else
131
+ log_error "C compiler not found (install clang package)"
132
+ return 1
133
+ fi
134
+
135
+ local shim_src="$KARNEL_PATH/tools/lang/bun/src/bun-shim.c"
136
+ local wrapper_src="$KARNEL_PATH/tools/lang/bun/src/bun_wrapper.c"
137
+ if [ ! -f "$shim_src" ]; then
138
+ log_error "Shim source not found at $shim_src"
139
+ return 1
140
+ fi
141
+ if [ ! -f "$wrapper_src" ]; then
142
+ log_error "Wrapper source not found at $wrapper_src"
143
+ return 1
144
+ fi
145
+ mkdir -p "$PREFIX/lib"
146
+ if ! $CC -O2 -fPIC -shared -nostdlib -o "$PREFIX/lib/bun-shim.so" "$shim_src" &>>"$LOG_FILE"; then
147
+ log_error "Failed to compile bun shim"
148
+ return 1
149
+ fi
150
+ chmod +x "$PREFIX/lib/bun-shim.so"
151
+ local wrapper_tmp="$TMPDIR/bun_wrapper_$$.c"
152
+ sed "s|__BUN_REAL__|$BUN_DATA_DIR/bun.real|g" "$wrapper_src" >"$wrapper_tmp"
153
+ if ! $CC -O2 -o "$PREFIX/bin/bun" "$wrapper_tmp" &>>"$LOG_FILE"; then
154
+ rm -f "$wrapper_tmp"
155
+ log_error "Failed to compile bun wrapper"
156
+ return 1
157
+ fi
158
+ chmod +x "$PREFIX/bin/bun"
159
+ rm -f "$wrapper_tmp"
160
+ return 0
151
161
  }
152
162
 
153
163
  _install_bun_native() {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- KARNEL_VERSION="4.9.2"
3
+ KARNEL_VERSION="4.9.3"
4
4
 
5
5
  # -------------------------
6
6
  # Directorios del usuario
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karnel-termux",
3
- "version": "4.9.2",
3
+ "version": "4.9.3",
4
4
  "description": "Modular Dev Environment for Termux — install languages, databases, AI agents, editors, and more with one command",
5
5
  "bin": {
6
6
  "karnel": "karnel/bin/karnel"