# Drop .config, fixes to gcc-4.6
_gx001=" xen-4-fix_dotconfig-gcc.patch"
_gx020=" xen-4.3-fix_dotconfig-gcc.patch"

# Fix texi2html build error with new texi2html, qemu.doc.html
_gx002=" xen-tools-4-docfix.patch"
_gx003=" xen-tools-4-qemu-xen-doc.patch"

_gx004=" xen-tools-4.2-pod-utf8-chars.patch"
_gx005=" xen-tools-4.2-pod-docs.patch"
_gx006=" xen-tools-4.2-pod-xl.patch"

# Fix network broadcast on bridged networks
_gx007=" xen-tools-3.4.0-network-bridge-broadcast.patch"

# Bug 496708
_gx008=" xen-tools-4-unbundle-ipxe.patch"
_gx045=" xen-tools-4.10.1-unbundle-ipxe.patch"
#use system-seabios && epatch "${FILESDIR}"/${PN}-4-unbundle-seabios.patch

# Fix bridge by idella4, bug #362575
_gx009=" xen-tools-4.1.1-bridge.patch"

# Conditional patch, fix in ebuild
# Don't build ipxe with pie on hardened, Bug #360805
#if gcc-specs-pie; then
#	epatch "${FILESDIR}"/ipxe-nopie.patch
#fi

# Prevent double stripping of files at install
_gx010=" xen-4.2.0-nostrip.patch"
_gx024+=" xen-4.4-nostrip.patch"

# fix jobserver in Makefile
_gx011=" xen-4.2.0-jserver.patch"
_gx021=" xen-4.3-jserver.patch"

# add missing header, Bug #467200
_gx012=" xen-4-ulong.patch"
_gx013=" xen-tools-4.2-xen_disk_leak.patch"

# Set dom0-min-mem to kb; Bug #472982
_gx014=" xen-4.2-configsxp.patch"

# Bug 463840
_gx015=" xen-tools-4.2.2-install.patch"
_gx016=" xen-tools-4.2.2-rt-link.patch"

# Bug 379537
_gx017=" fix-gold-ld.patch"

# Bug 510976
_gx018=" xen-tools-4.2.4-udev-rules.patch"

# bundled seabios
_gx019=" xen-tools-4-anti-seabios-download.patch"
_gx032=" xen-tools-4.5-anti-seabios-download.patch"

# Bug 477676
_gx022=" xen-tools-4.3-ar-cc.patch"
_gx038=" xen-tools-4.8-ar-cc.patch"

# Prevent file collision with qemu package Bug 478064
_gx023=" qemu-bridge.patch"
_gx025=" xen-4.4-qemu-bridge.patch"
_gx031=" xen-4.5-qemu-bridge.patch"
_gx039=" xen-4.8-qemu-bridge.patch"
_gx043=" xen-4.10-qemu-bridge.patch"
#mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die

_gx026=" xen-tools-4.4-api-fix.patch"

# Fix po file collision with app-emulation/qemu, while USE=qemu is enabled, Bug 508302
_gx027=" xen-tools-4-qemu-fix-po-collision.patch"

# Fix build failure with ncurses[tinfo], bug 526526
_gx028=" xen-tools-4.4.1-tinfo.patch"

# Don't download ovmf, use pre-released
_gx029=" xen-tools-4-anti-ovmf-download.patch"

# fix build err while using gcc-4.5.x, c99
_gx033=" xen-tools-4.4.2-gcc99.patch"
_gx034=" xen-tools-4.5.0-gcc99.patch"

_gx035=" xen-tools-4.2-pod-docs-r1.patch"
# disable stackcheck for hardened system, bug 569810
_gx036=" xen-tools-4.6-no-stackcheck.patch"

# increase stack to fix xenqemu err
# https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03961.html
_gx037=" xen-tools-4.6-increase-stack-size.patch"


#Fix issues with zero-length records in migration v2"
#https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records
_gx040=" 0001-docs-Clarify-the-expected-behaviour-of-zero-length-r.patch
	0003-tools-libxc-Avoid-generating-inappropriate-zero-leng.patch
	0004-tools-python-Adjust-migration-v2-library-to-warn-abo.patch"

_gx041=" 0002-tools-libxc-Tolerate-zero-length-records-in-migratio.patch"

#Fix missing makedev(), major(), minor()
_gx042=" xen-tools-4.8.2-makedev.patch"

# Fix building with glibc 2.27, bug #648182
_gx044=" xen-tools-4.9-glibc-memfd.patch"

# Disable failing shim
_gx046=" xen-tools-4.10.1-shim.patch"

# Fix building with gcc 8, bug #657388
_gx047=" xen-tools-4.10.1-gcc8.patch"
_gx048=" xen-tools-4.11.0-gcc8.patch"

# xen-tools-4.8.2 patches set
_gpv_xen_tools_482_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027} ${_gx032}
${_gx028} ${_gx029}
${_gx037} ${_gx040} ${_gx042}
"

# xen-tools-4.9.0 patches set
_gpv_xen_tools_490_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
"

# xen-tools-4.9.1 patches set
_gpv_xen_tools_491_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
"

_gpv_xen_tools_491_1="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
${_gx044}
"

# xen-tools-4.9.2 patches set
_gpv_xen_tools_492_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
${_gx044}
"

# xen-tools-4.10.0 patches set
_gpv_xen_tools_4100_0="
${_gx008}
${_gx038} ${_gx017} ${_gx043}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
${_gx044}
"

# xen-tools-4.10.1 patches set
_gpv_xen_tools_4101_0="
${_gx038} ${_gx017} ${_gx043}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
${_gx044} ${_gx045} ${_gx046} ${_gx047}
"

# xen-tools-4.11.0 patches set
_gpv_xen_tools_4110_0="
${_gx038} ${_gx017} ${_gx043}
${_gx027}
${_gx028} ${_gx029}
${_gx037} ${_gx042}
${_gx045} ${_gx046} ${_gx048}
"
