2022-11-11 18:15:45 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2024-07-24 17:28:43 +08:00
|
|
|
SCRIPT_REPO="https://github.com/tukaani-project/xz.git"
|
2026-05-28 10:55:08 +08:00
|
|
|
SCRIPT_COMMIT="v5.8.3"
|
2024-04-21 12:42:12 +08:00
|
|
|
SCRIPT_TAGFILTER="v?.*.*"
|
2022-11-11 18:15:45 +08:00
|
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xz
|
|
|
|
|
cd xz
|
|
|
|
|
|
2023-06-25 21:28:05 +08:00
|
|
|
./autogen.sh --no-po4a --no-doxygen
|
2022-11-11 18:15:45 +08:00
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
|
--disable-symbol-versions
|
|
|
|
|
--disable-shared
|
|
|
|
|
--enable-static
|
|
|
|
|
--with-pic
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
|
|
|
|
myconf+=(
|
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
|
)
|
2024-02-24 00:07:11 +08:00
|
|
|
elif [[ $TARGET == mac* ]]; then
|
|
|
|
|
:
|
2022-11-11 18:15:45 +08:00
|
|
|
else
|
|
|
|
|
echo "Unknown target"
|
|
|
|
|
return -1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
./configure "${myconf[@]}"
|
|
|
|
|
make -j$(nproc)
|
|
|
|
|
make install
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
|
echo --enable-lzma
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
|
echo --disable-lzma
|
|
|
|
|
}
|