这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion packages/fish/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="The user-friendly command line shell"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="3.7.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250
TERMUX_PKG_AUTO_UPDATE=true
Expand All @@ -16,6 +16,23 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
"

termux_step_pre_configure() {
# fish releases tarballs that conflict with the way the toolchain
# currently is by putting a file in the tarball
# named "version" (not visible directly in the source code on github,
# generated by this code in fish's release workflow:
# https://github.com/fish-shell/fish-shell/blob/master/build_tools/make_tarball.sh#L69 )
# and, crucially, also placing the folder containing that file named "version"
# in the include path of building fish (since right next to this in the same folder,
# fish does have a file named "config.h" that it uses)
# here is the upstream, conflicting instance of file in internal llvm
# include path named "version" that is probably what propogates into the NDK's
# equivalent file,
# /home/builder/.termux-build/_cache/android-r27b-api-24-v1/sysroot/usr/include/c++/v1/version
# https://github.com/llvm/llvm-project/blob/main/libcxx/include/version
mv version fish_version
find build_tools -type f -exec sed -i {} \
-e 's/cat version/cat fish_version/g' \
-e 's/test -f version/test -f fish_version/g' \;
CXXFLAGS+=" $CPPFLAGS"
}

Expand Down