added m4 toolchain step
This commit is contained in:
49
build/m4/build.bash
Normal file
49
build/m4/build.bash
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
. "$PROJECTDIR/build/m4/package.env"
|
||||
|
||||
fetch $M4_URL
|
||||
|
||||
cd "$SOURCES" && tar xf m4-$M4_VERSION.tar.xz && cd m4-$M4_VERSION
|
||||
|
||||
|
||||
bootstrap() {
|
||||
echo bootstrap
|
||||
}
|
||||
|
||||
|
||||
toolchain() {
|
||||
sed -r '/_GL_EXTERN_C/s/w?memchr|bsearch/(&)/' -i $(find -name \*.in.h)
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--host=$TARGET \
|
||||
--build=$(build-aux/config.guess) > /dev/null
|
||||
|
||||
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
|
||||
}
|
||||
|
||||
setup() {
|
||||
echo setup
|
||||
}
|
||||
|
||||
final() {
|
||||
echo final
|
||||
}
|
||||
|
||||
case $1 in
|
||||
bootstrap)
|
||||
bootstrap
|
||||
;;
|
||||
toolchain)
|
||||
toolchain
|
||||
;;
|
||||
setup)
|
||||
setup
|
||||
;;
|
||||
final)
|
||||
final
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
cd "$SOURCES" && rm -rf "$SOURCES/m4-$M4_VERSION"
|
||||
7
build/m4/package.env
Normal file
7
build/m4/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export M4_VERSION=1.4.20
|
||||
|
||||
IFS='.' read -r M4_VERSION_MAJOR M4_VERSION_MINOR <<< $M4_VERSION
|
||||
export M4_VERSION_MAJOR M4_VERSION_MINOR
|
||||
|
||||
export M4_URL=https://mirror.ufs.ac.za/gnu/m4/m4-$M4_VERSION.tar.xz
|
||||
|
||||
Reference in New Issue
Block a user