app-emulation/xen-pvgrub: bump to 4.13.0-rc1
authorTomas Mozes <hydrapolic@gmail.com>
Thu, 24 Oct 2019 10:07:40 +0000 (12:07 +0200)
committerYixun Lan <dlan@gentoo.org>
Fri, 25 Oct 2019 09:26:52 +0000 (09:26 +0000)
Package-Manager: Portage-2.3.77, Repoman-2.3.17
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
app-emulation/xen-pvgrub/Manifest
app-emulation/xen-pvgrub/xen-pvgrub-4.13.0_rc1.ebuild [new file with mode: 0644]

index 4f1837cd3915b867203faf11c2b9ab8b54da3d73..3331a7777db00b7b1daa525b8b49e1f924ac10b9 100644 (file)
@@ -6,4 +6,5 @@ DIST polarssl-1.1.4-gpl.tgz 611340 BLAKE2B 613da06dda9e4b86db5a4d616a0a0afee98c9
 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
 DIST xen-4.12.1.tar.gz 26970584 BLAKE2B ceab2af3d36b72d838d7b4f58f6855c97cf05282a4ea3c82eda29b8945ee20563845b7be02884bf0a061a633fb2b3016a2f7396ce34d9b3d93f90d6ee6d449ed SHA512 be15d3af6b109771aaf59b3621e4e1560b7d9a963d9b7f6a1f6f4a1c907fd97434b060c15f75849b44fbda33f26eb51b030d14d068c6ad5103ad240fe7a98f40
+DIST xen-4.13.0-rc1.tar.gz 38984903 BLAKE2B c8fa19a2cff2de67712e5976670ecbbeff1528b987cdd7523a7f8c8952b889255af4e21c50c68537ffff9273153dfc619582f8072f6f356e20f38dae1e331fb6 SHA512 392d1f77faec4d9868aff928a2eb2918e8cef576a92f7a853d3bbd1ba609bad6abcd4d675f7c618e7bf630feea4c8da081c31926c281a17c8f6b41c3ea9fd607
 DIST zlib-1.2.3.tar.gz 496597 BLAKE2B 603020b70cd52b83e48bde420b86e2acfd29d69bf7476eecbeeb07d1b8bcab703d2cbd3eab77772990bddb8c268f13594592ce985798d49e2d6ba25104d49f22 SHA512 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e
diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-4.13.0_rc1.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-4.13.0_rc1.ebuild
new file mode 100644 (file)
index 0000000..c723b78
--- /dev/null
@@ -0,0 +1,152 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+inherit flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
+LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
+GRUB_URL=mirror://gnu-alpha/grub
+
+UPSTREAM_VER=
+[[ -n ${UPSTREAM_VER} ]] && \
+       UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-pvgrub/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+               https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-pvgrub/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+
+SRC_URI="
+               https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+               $GRUB_URL/grub-0.97.tar.gz
+               $XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
+               $LIBPCI_URL/pciutils-2.2.9.tar.bz2
+               $XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
+               $XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
+               $XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
+               ${UPSTREAM_PATCHSET_URI}"
+
+S="${WORKDIR}/xen-${MY_PV}"
+
+DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
+HOMEPAGE="https://www.xenproject.org"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="sys-devel/gettext
+       sys-devel/bin86
+       sys-apps/texinfo
+       x11-libs/pixman"
+
+RDEPEND="${PYTHON_DEPS}
+       >=app-emulation/xen-tools-${PV}"
+
+pkg_setup() {
+       python-single-r1_pkg_setup
+}
+
+retar-externals() {
+       # Purely to unclutter src_prepare
+       local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
+
+       # eapply can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
+       sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
+               -i "${WORKDIR}"/zlib-1.2.3/configure || die
+       sed -e 's:^AR=ar rc:AR=ar:' \
+               -e s':$(AR) $@:$(AR) rc $@:' \
+               -i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in} || die
+       einfo "zlib Makefile edited"
+
+       cd "${WORKDIR}" || die
+       tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz || die
+       tar czp grub-0.97 -f grub-0.97.tar.gz || die
+       tar czp lwip -f lwip-1.3.0.tar.gz || die
+       tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz || die
+       tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz || die
+       mv $set "${S}"/stubdom/ || die
+       einfo "tarballs moved to source"
+}
+
+src_prepare() {
+       # Upstream's patchset
+       if [[ -n ${UPSTREAM_VER} ]]; then
+               einfo "Try to apply Xen Upstream patch set"
+               EPATCH_SUFFIX="patch" \
+               EPATCH_FORCE="yes" \
+               EPATCH_OPTS="-p1" \
+                       eapply "${WORKDIR}"/patches-upstream
+       fi
+
+       # Patch the unmergeable newlib, fix most of the leftover gcc QA issues
+       cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
+
+       # Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
+       eapply "${FILESDIR}"/${PN/-pvgrub/}-4.10-externals.patch
+
+       # fix jobserver in Makefile
+       eapply "${FILESDIR}"/${PN}-4.8-jserver.patch
+
+       #Substitute for internal downloading. pciutils copied only due to the only .bz2
+       cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
+       retar-externals || die "re-tar procedure failed"
+
+       default
+}
+
+src_configure() {
+       local myconf="--prefix=${PREFIX}/usr \
+               --libdir=${PREFIX}/usr/$(get_libdir) \
+               --libexecdir=${PREFIX}/usr/libexec \
+               --disable-werror \
+               --disable-xen"
+
+       econf ${myconf}
+}
+
+src_compile() {
+       unset CFLAGS
+       if test-flag-CC -fno-strict-overflow; then
+               append-flags -fno-strict-overflow
+       fi
+
+       emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
+       emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/libs
+
+       if use x86; then
+               emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
+               XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
+       elif use amd64; then
+               emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
+               XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
+               if has_multilib_profile; then
+                       multilib_toolchain_setup x86
+                       emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
+                       XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
+               fi
+       fi
+}
+
+src_install() {
+       if use x86; then
+               emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
+       fi
+       if use amd64; then
+               emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
+               if has_multilib_profile; then
+                       emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
+               fi
+       fi
+}
+
+pkg_postinst() {
+       elog "Official Xen Guide and the offical wiki page:"
+       elog "https://wiki.gentoo.org/wiki/Xen"
+       elog "https://wiki.xen.org/wiki/Main_Page"
+}