mirror of
https://github.com/pygos/build.git
synced 2024-12-23 23:50:51 +01:00
Add utility function for applying patches
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
52fb22a291
commit
8dca35930b
7 changed files with 13 additions and 25 deletions
1
mk.sh
1
mk.sh
|
@ -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 ---"
|
||||
|
|
|
@ -6,11 +6,7 @@ SHA256SUM="1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65"
|
|||
DEPENDS=""
|
||||
|
||||
prepare() {
|
||||
local PKGSCRIPTDIR="$1"
|
||||
|
||||
for PATCH in ${PKGSCRIPTDIR}/*.patch; do
|
||||
patch -p1 < $PATCH
|
||||
done
|
||||
apply_patches
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
7
util/misc.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
apply_patches() {
|
||||
local PATCH
|
||||
|
||||
for PATCH in $SCRIPTDIR/$PKGDIR/$PKGNAME/*.patch; do
|
||||
patch -p1 < $PATCH
|
||||
done
|
||||
}
|
Loading…
Reference in a new issue