0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
2024-12-07 04:14:16 +08:00

38 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://findomain.app/
TERMUX_PKG_DESCRIPTION="Findomain is the fastest subdomain enumerator and the only one written in Rust"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="9.0.4"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/Findomain/Findomain/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=98c142e2e6ed67726bdea7a1726a54fb6773a8d1ccaa262e008804432af29190
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="resolv-conf"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
termux_setup_rust
# ld: error: undefined symbol: __atomic_is_lock_free
# ld: error: undefined symbol: __atomic_fetch_or_8
# ld: error: undefined symbol: __atomic_load
if [[ "${TERMUX_ARCH}" == "i686" ]]; then
local env_host=$(printf $CARGO_TARGET_NAME | tr a-z A-Z | sed s/-/_/g)
export CARGO_TARGET_${env_host}_RUSTFLAGS+=" -C link-arg=$(${CC} -print-libgcc-file-name)"
fi
: "${CARGO_HOME:=$HOME/.cargo}"
export CARGO_HOME
cargo fetch --target "${CARGO_TARGET_NAME}"
for d in $CARGO_HOME/registry/src/*/trust-dns-resolver-*; do
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" \
$TERMUX_PKG_BUILDER_DIR/trust-dns-resolver.diff \
| patch --silent -p1 -d ${d} || :
done
# clash with rust host build
unset CFLAGS
}