Fortify build
This commit is contained in:
parent
b4bbce3020
commit
7811434ee9
4 changed files with 6 additions and 4 deletions
53
scripts.d/20-libiconv.sh
Executable file
53
scripts.d/20-libiconv.sh
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
ICONV_SRC="https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerstage() {
|
||||
to_df "ADD $SELF /stage.sh"
|
||||
to_df "RUN run_stage"
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
mkdir iconv
|
||||
cd iconv
|
||||
wget -O iconv.tar.gz "$ICONV_SRC" || return -1
|
||||
tar xaf iconv.tar.gz || return -1
|
||||
rm iconv.tar.gz
|
||||
cd libiconv*
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--enable-extra-encodings
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == win* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}" || return -1
|
||||
make -j$(nproc) || return -1
|
||||
make install || return -1
|
||||
|
||||
cd ../..
|
||||
rm -rf iconv
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
echo --enable-iconv
|
||||
}
|
||||
|
||||
ffbuild_unconfigure() {
|
||||
echo --disable-iconv
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue