Add support for Gentoo epatch backend to patchinstall.sh.

This commit is contained in:
Sebastian Lackner 2015-01-12 13:10:19 +01:00
parent 17c1053de4
commit 7d9c7855c2
3 changed files with 50 additions and 4 deletions

4
debian/changelog vendored
View File

@ -1,3 +1,7 @@
wine-staging (1.7.35) UNRELEASED; urgency=low
* Add support for Gentoo epatch backend to patchinstall.sh.
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 12 Jan 2015 13:06:22 +0100
wine-staging (1.7.34-1) unstable; urgency=low
* Debian/Ubuntu specific package dependency fix (no changes for other distros).
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 11 Jan 2015 19:14:09 +0100

View File

@ -126,6 +126,23 @@ if test "$backend" = "patch"; then
fi
}}
# 'epatch' backend - used on Gentoo
elif test "$backend" = "epatch"; then
patch_apply ()
{{
if grep -q "^GIT binary patch" "$1"; then
if ! ../debian/tools/gitapply.sh -d "$DESTDIR" < "$1"; then
abort "Failed to apply patch, aborting!"
fi
else
local patch="$(readlink -f "$1")"
if ! (cd "$DESTDIR" && epatch "$patch"); then
abort "Failed to apply patch, aborting!"
fi
fi
}}
# GIT backend - apply patches using 'git am'
elif test "$backend" = "git" -o "$backend" = "git-am"; then
@ -181,8 +198,12 @@ fi
# To make sure we find all the patches and tools switch to the patches directory now
script="$(readlink -f "$0")"
curdir="$(dirname "$script")"
if ! cd "$curdir"; then
abort "Failed to change working directory to $curdir."
if test -f "$curdir/patchinstall.sh"; then
if ! cd "$curdir"; then
abort "Failed to change working directory to $curdir."
fi
elif test ! -f ./patchinstall.sh; then
abort "Failed to find patch directory."
fi
# If autoupdate is enabled then create a tempfile to keep track of all patches

View File

@ -668,6 +668,23 @@ if test "$backend" = "patch"; then
fi
}
# 'epatch' backend - used on Gentoo
elif test "$backend" = "epatch"; then
patch_apply ()
{
if grep -q "^GIT binary patch" "$1"; then
if ! ../debian/tools/gitapply.sh -d "$DESTDIR" < "$1"; then
abort "Failed to apply patch, aborting!"
fi
else
local patch="$(readlink -f "$1")"
if ! (cd "$DESTDIR" && epatch "$patch"); then
abort "Failed to apply patch, aborting!"
fi
fi
}
# GIT backend - apply patches using 'git am'
elif test "$backend" = "git" -o "$backend" = "git-am"; then
@ -824,8 +841,12 @@ fi
# To make sure we find all the patches and tools switch to the patches directory now
script="$(readlink -f "$0")"
curdir="$(dirname "$script")"
if ! cd "$curdir"; then
abort "Failed to change working directory to $curdir."
if test -f "$curdir/patchinstall.sh"; then
if ! cd "$curdir"; then
abort "Failed to change working directory to $curdir."
fi
elif test ! -f ./patchinstall.sh; then
abort "Failed to find patch directory."
fi
# If autoupdate is enabled then create a tempfile to keep track of all patches