added patch toolchain step
This commit is contained in:
48
build/patch/build.bash
Normal file
48
build/patch/build.bash
Normal file
@@ -0,0 +1,48 @@
|
||||
`. "$PROJECTDIR/build/patch/package.env"
|
||||
|
||||
fetch $PATCH_URL
|
||||
|
||||
|
||||
cd "$SOURCES" && tar xf patch-$PATCH_VERSION.tar.xz && cd patch-$PATCH_VERSION
|
||||
|
||||
|
||||
bootstrap() {
|
||||
echo bootstrap
|
||||
}
|
||||
|
||||
|
||||
toolchain() {
|
||||
./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
|
||||
|
||||
|
||||
rm -rf "$SOURCES/patch-$PATCH_VERSION"
|
||||
`
|
||||
7
build/patch/package.env
Normal file
7
build/patch/package.env
Normal file
@@ -0,0 +1,7 @@
|
||||
export PATCH_VERSION=2.8
|
||||
|
||||
IFS='.' read -r PATCH_VERSION_MAJOR PATCH_VERSION_MINOR <<< $PATCH_VERSION
|
||||
export PATCH_VERSION_MAJOR PATCH_VERSION_MINOR
|
||||
|
||||
export PATCH_URL=https://mirror.ufs.ac.za/gnu/patch/patch-$PATCH_VERSION.tar.xz
|
||||
|
||||
Reference in New Issue
Block a user