1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 02:59:47 +01:00

Add utility function for applying patches

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-02-09 18:49:17 +01:00
parent 52fb22a291
commit 8dca35930b
7 changed files with 13 additions and 25 deletions

1
mk.sh
View file

@ -40,6 +40,7 @@ source "$SCRIPTDIR/util/download.sh"
source "$SCRIPTDIR/util/pkgcmd.sh"
source "$SCRIPTDIR/util/toolchain.sh"
source "$SCRIPTDIR/util/cmake.sh"
source "$SCRIPTDIR/util/misc.sh"
############################## build toolchain ###############################
echo "--- resolving toolchain dependencies ---"

View file

@ -6,11 +6,7 @@ SHA256SUM="1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65"
DEPENDS=""
prepare() {
local PKGSCRIPTDIR="$1"
for PATCH in ${PKGSCRIPTDIR}/*.patch; do
patch -p1 < $PATCH
done
apply_patches
}
build() {

View file

@ -6,11 +6,7 @@ SHA256SUM="d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067"
DEPENDS="bdb libmnl"
prepare() {
local PKGSCRIPTDIR="$1"
for PATCH in ${PKGSCRIPTDIR}/*.patch; do
patch -p1 < $PATCH
done
apply_patches
}
build() {

View file

@ -16,11 +16,7 @@ build() {
cp -R ${SOURCE}/* ${BUILD}
for i in ${SCRIPTDIR}/${PKGDIR}/${PKGNAME}/*.patch; do
patch -p1 < $i
done
unset -v i
apply_patches
make CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
LD=${TARGET}-ld LIBTERMCAP="-lncursesw" \

View file

@ -6,11 +6,7 @@ SHA256SUM="6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4"
DEPENDS="ncurses"
prepare() {
local PKGSCRIPTDIR="$1"
for PATCH in ${PKGSCRIPTDIR}/*.patch; do
patch -p1 < $PATCH
done
apply_patches
}
build() {

View file

@ -6,11 +6,7 @@ SHA256SUM="f9be7cdcf4fc5c5064a226599acdda6bdf3d86c640152ba01ea642d91108dc8a"
DEPENDS="bash ncurses zlib"
prepare() {
local PKGSCRIPTDIR="$1"
for PATCH in ${PKGSCRIPTDIR}/*.patch; do
patch -p1 < $PATCH
done
apply_patches
}
build() {

7
util/misc.sh Normal file
View file

@ -0,0 +1,7 @@
apply_patches() {
local PATCH
for PATCH in $SCRIPTDIR/$PKGDIR/$PKGNAME/*.patch; do
patch -p1 < $PATCH
done
}