Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
Date: Thu, 28 Jul 2016 16:50:58
Message-Id: 1469724646.f2ad0b87046b1a0349f702a7126b66c4a360214c.dlan@gentoo
1 commit: f2ad0b87046b1a0349f702a7126b66c4a360214c
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 28 16:44:19 2016 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 28 16:50:46 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ad0b87
7
8 app-emulation/xen-tools: drop old vulnerable versions
9
10 Gentoo-Bug: 588780
11
12 Package-Manager: portage-2.3.0
13
14 app-emulation/xen-tools/Manifest | 17 -
15 app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild | 469 --------------------
16 app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild | 469 --------------------
17 app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild | 469 --------------------
18 app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild | 474 --------------------
19 app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild | 449 -------------------
20 app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild | 469 --------------------
21 app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild | 458 --------------------
22 app-emulation/xen-tools/xen-tools-4.6.1.ebuild | 475 ---------------------
23 app-emulation/xen-tools/xen-tools-4.6.3.ebuild | 458 --------------------
24 app-emulation/xen-tools/xen-tools-4.7.0.ebuild | 458 --------------------
25 11 files changed, 4665 deletions(-)
26
27 diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
28 index f4a828a..c614caa 100644
29 --- a/app-emulation/xen-tools/Manifest
30 +++ b/app-emulation/xen-tools/Manifest
31 @@ -1,24 +1,7 @@
32 -DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac
33 DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
34 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
35 -DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
36 -DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
37 -DIST xen-4.6.1-upstream-patches-0.tar.xz 92472 SHA256 7b32cbd57571d838ec606c5bd2b98a51e14a6bcf44d2d61007c274fa3b6b5eb6 SHA512 2f8e9273601c70eac88fb9d94bcb607bc5ea76514f9cdee0e96309b9a9d78db881d94c57a518ad5cef398fa57274b9940ba1553d0984bb5504ca27b6b62a6003 WHIRLPOOL 9b2592f33587fc85b091fbfb357d4ab4914f39286f3207a0d8aebf26259f0ebd1eb7d6bede7da9a202427cf9c7d97c11c4c84c5f90584948b1f3c32fefac5164
38 -DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
39 DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4 SHA512 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c WHIRLPOOL f80fa73727218567b8d6c8d6bab9dfd577c4bb84ac737b084e4396128e8c4aa79776a277f73c283d5b12f17764b183b67fbf8596e240042dd0709f28cbab777e
40 DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f
41 -DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
42 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
43 -DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
44 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
45 -DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
46 -DIST xen-qemu-patches-2.tar.gz 4690 SHA256 5850513c6c6e1c68da7a04526bfc3f7ee049b1c5cbcd370d2dfcee94b49f84e9 SHA512 fb1adcccffdd53193699287049da719f826ab8ab819130e7747cb6de9f6f9446fde223e26772a6ee7380ee0691acffac2c970691583ef6cb06f3c597acac824e WHIRLPOOL ea6dc377c69261246d68342b0bf33bdcd07447f1d3547862da10dd0e72d0a6d96fcdfb5df422e88fd7119a6edc7c8990f02d33bbb4c401534aba55b287ac63fe
47 -DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5ded7b488fba3be4b88c85c33d981 SHA512 ca1c5a10c986dcc6e39fbcb606493532203f051d622fbd7318b4c6f69b686889d81c143c7eaf7c91b1e925aa4f7667fb8f80d887ac2b45172a9db4c4231e7feb WHIRLPOOL 1aee478c6eb39fd204a0b88c02770a304765f7dba979bdebd4dd882c77b947038219aab99be95010c308207eb18d276c127c1bb5c69c62e0ef2bbb618fd99e17
48 -DIST xen-qemu-patches-4.tar.gz 5231 SHA256 6ffc66654045ce6aa4f228e1a39025a0cdce613815c114d28d1c14499d25eb0d SHA512 b2cbf25a9ceec947f4c5ca7d77c8fb3b443bffc3c48c8c6fb50d72a795f86e5cc40fb2637e378fea048ee8094aebd96e5d056289d9538e5f19ed36b9e7d70431 WHIRLPOOL 2d73c793eaf00ca0f8a79f18e2b1e95931000989265d7a3bb4f6bccb2407619ddfbdfc28fcec03f37a18554352ea4dc6500de8ef6a72f2a991cff3495e66e4fc
49 -DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
50 -DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
51 -DIST xen-security-patches-12.tar.xz 5172 SHA256 1d3c238cbefc243a17770722895f6bc725e807641a93908d3e4002b26e4f2a8b SHA512 06f80b12c30d18f84e880ffb529fe2b90e7ade1cb3479d2fbc21447cf2c5d50c7ba3a14ddd0b31f63e87af520bf80812158e4097e657f8316bdb5f8b443c9828 WHIRLPOOL 49b776cf3d1d05758dfe9ce9f5f5cb0573eaec5f1273648eedb04b408587bb3cfe8838ea551a29423cc30622c7426e852740138fa2795898f25c22de148f91c9
52 DIST xen-security-patches-14.tar.xz 4036 SHA256 2ac238d2c63b77d7f36c48cac5e1ce062229fc8cbabe5ba0f359f1014bfd0572 SHA512 51849687b10fe73c7bdee9d9243f33d386c3dce112b6c1392f5a1583922371d17ac5f7b8e6b0152aeb34160d4ad4a88d975337a8bbf73a51c24065ec129bf2cf WHIRLPOOL 3c18fdcc4db107c57b7ee4d8b261f3d390b21530aadcb0a0381d8228d87cbb67bf97103749f44b2993ab164c806026b23a43d10d3c534fe583554916633c13a4
53 -DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
54 -DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
55 -DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7
56
57 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
58 deleted file mode 100644
59 index 8e879dc..0000000
60 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
61 +++ /dev/null
62 @@ -1,469 +0,0 @@
63 -# Copyright 1999-2016 Gentoo Foundation
64 -# Distributed under the terms of the GNU General Public License v2
65 -# $Id$
66 -
67 -EAPI=5
68 -
69 -PYTHON_COMPAT=( python2_7 )
70 -PYTHON_REQ_USE='ncurses,xml,threads'
71 -
72 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
73 -
74 -MY_PV=${PV/_/-}
75 -MAJOR_V="$(get_version_component_range 1-2)"
76 -
77 -if [[ $PV == *9999 ]]; then
78 - inherit git-r3
79 - KEYWORDS=""
80 - REPO="xen.git"
81 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
82 - S="${WORKDIR}/${REPO}"
83 -else
84 - KEYWORDS="~amd64 ~arm ~x86"
85 - UPSTREAM_VER=0
86 - SECURITY_VER=7
87 - # vars set to reflect https://dev.gentoo.org/~idella4/
88 - # first instance of UPS_VER (usptream ver)
89 - UPS_VER=0
90 - SEC_VER=10
91 - QEMU_VER=0
92 - # xen-tools's gentoo patches tarball
93 - GENTOO_VER=4
94 - # xen-tools's gentoo patches version which apply to this specific ebuild
95 - GENTOO_GPV=0
96 - # xen-tools ovmf's patches
97 - OVMF_VER=1
98 -
99 - SEABIOS_VER=1.8.2
100 - OVMF_PV=20150629
101 -
102 - [[ -n ${UPSTREAM_VER} ]] && \
103 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
104 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
105 - [[ -n ${SECURITY_VER} ]] && \
106 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
107 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
108 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
109 - [[ -n ${GENTOO_VER} ]] && \
110 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
111 - [[ -n ${OVMF_VER} ]] && \
112 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
113 -
114 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
115 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
116 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
117 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
118 - ${OVMF_PATCHSET_URI} )
119 - ${UPSTREAM_PATCHSET_URI}
120 - ${SECURITY_PATCHSET_URI}
121 - ${GENTOO_PATCHSET_URI}"
122 -
123 - S="${WORKDIR}/xen-${MY_PV}"
124 -fi
125 -
126 -DESCRIPTION="Xen tools including QEMU and xl"
127 -HOMEPAGE="http://xen.org/"
128 -DOCS=( README docs/README.xen-bugtool )
129 -
130 -LICENSE="GPL-2"
131 -SLOT="0/${MAJOR_V}"
132 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
133 -# >=dev-lang/ocaml-4 stable
134 -# Masked in profiles/eapi-5-files instead
135 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
136 -
137 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
138 - ${PYTHON_REQUIRED_USE}
139 - pygrub? ( python )
140 - ovmf? ( hvm )
141 - qemu? ( !system-qemu )"
142 -
143 -COMMON_DEPEND="
144 - dev-libs/lzo:2
145 - dev-libs/glib:2
146 - dev-libs/yajl
147 - dev-libs/libaio
148 - dev-libs/libgcrypt:0
149 - sys-libs/zlib
150 -"
151 -
152 -DEPEND="${COMMON_DEPEND}
153 - dev-python/lxml[${PYTHON_USEDEP}]
154 - x86? ( sys-devel/dev86
155 - sys-power/iasl )
156 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
157 - ${PYTHON_DEPS}
158 - api? ( dev-libs/libxml2
159 - net-misc/curl )
160 - ovmf? ( $(python_gen_impl_dep sqlite) )
161 - !amd64? ( >=sys-apps/dtc-1.4.0 )
162 - amd64? ( sys-devel/bin86
163 - system-seabios? ( sys-firmware/seabios )
164 - sys-firmware/ipxe
165 - sys-devel/dev86
166 - sys-power/iasl )
167 - dev-lang/perl
168 - app-misc/pax-utils
169 - doc? (
170 - app-doc/doxygen
171 - dev-python/markdown[${PYTHON_USEDEP}]
172 - dev-tex/latex2html[png,gif]
173 - media-gfx/graphviz
174 - dev-tex/xcolor
175 - media-gfx/transfig
176 - dev-texlive/texlive-latexextra
177 - virtual/latex-base
178 - dev-tex/latexmk
179 - dev-texlive/texlive-latex
180 - dev-texlive/texlive-pictures
181 - dev-texlive/texlive-latexrecommended
182 - )
183 - hvm? ( x11-proto/xproto
184 - !net-libs/libiscsi )
185 - qemu? (
186 - x11-libs/pixman
187 - sdl? ( media-libs/libsdl[X] )
188 - )
189 - system-qemu? ( app-emulation/qemu[xen] )
190 - ocaml? ( dev-ml/findlib
191 - >=dev-lang/ocaml-4 )"
192 -
193 -RDEPEND="${COMMON_DEPEND}
194 - sys-apps/iproute2[-minimal]
195 - net-misc/bridge-utils
196 - screen? (
197 - app-misc/screen
198 - app-admin/logrotate
199 - )"
200 -
201 -# hvmloader is used to bootstrap a fully virtualized kernel
202 -# Approved by QA team in bug #144032
203 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
204 - usr/share/qemu-xen/qemu/s390-ccw.img"
205 -
206 -RESTRICT="test"
207 -
208 -pkg_setup() {
209 - python-single-r1_pkg_setup
210 - export "CONFIG_LOMOUNT=y"
211 -
212 - #bug 522642, disable compile tools/tests
213 - export "CONFIG_TESTS=n"
214 -
215 - if has_version dev-libs/libgcrypt:0; then
216 - export "CONFIG_GCRYPT=y"
217 - fi
218 -
219 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
220 - if use x86 && use amd64; then
221 - die "Confusion! Both x86 and amd64 are set in your use flags!"
222 - elif use x86; then
223 - export XEN_TARGET_ARCH="x86_32"
224 - elif use amd64 ; then
225 - export XEN_TARGET_ARCH="x86_64"
226 - elif use arm; then
227 - export XEN_TARGET_ARCH="arm32"
228 - elif use arm64; then
229 - export XEN_TARGET_ARCH="arm64"
230 - else
231 - die "Unsupported architecture!"
232 - fi
233 - fi
234 -}
235 -
236 -src_prepare() {
237 - # Upstream's patchset
238 - if [[ -n ${UPSTREAM_VER} ]]; then
239 - einfo "Try to apply Xen Upstream patch set"
240 - EPATCH_SUFFIX="patch" \
241 - EPATCH_FORCE="yes" \
242 - EPATCH_OPTS="-p1" \
243 - epatch "${WORKDIR}"/patches-upstream \
244 - "${WORKDIR}"/libexec.patch
245 - fi
246 -
247 - # Security patchset
248 - if [[ -n ${SECURITY_VER} ]]; then
249 - einfo "Try to apply Xen Security patch set"
250 - source "${WORKDIR}"/patches-security/${PV}.conf
251 - # apply main xen patches
252 - # Two parallel systems, both work side by side
253 - # Over time they may concdense into one. This will suffice for now
254 - EPATCH_SUFFIX="patch"
255 - EPATCH_FORCE="yes"
256 - for i in ${XEN_SECURITY_MAIN}; do
257 - epatch "${WORKDIR}"/patches-security/xen/$i
258 - done
259 -
260 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
261 - epatch $i
262 - done
263 -
264 - # apply qemu-traditional patches
265 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
266 - for i in ${XEN_SECURITY_QEMUT}; do
267 - epatch "${WORKDIR}"/patches-security/qemut/$i
268 - done
269 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
270 - epatch $i
271 - done
272 - popd > /dev/null
273 -
274 - # apply qemu-xen/upstream patches
275 - pushd "${S}"/tools/qemu-xen/ > /dev/null
276 - for i in ${XEN_SECURITY_QEMUU}; do
277 - epatch "${WORKDIR}"/patches-security/qemuu/$i
278 - done
279 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
280 - epatch $i
281 - done
282 - popd > /dev/null
283 - fi
284 -
285 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
286 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
287 - pushd tools/firmware/ > /dev/null
288 - ln -s seabios-dir-remote seabios-dir || die
289 - popd > /dev/null
290 -
291 - # Gentoo's patchset
292 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
293 - einfo "Try to apply Gentoo specific patch set"
294 - source "${FILESDIR}"/gentoo-patches.conf
295 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
296 - for i in ${!_gpv}; do
297 - EPATCH_SUFFIX="patch" \
298 - EPATCH_FORCE="yes" \
299 - epatch "${WORKDIR}"/patches-gentoo/$i
300 - done
301 - fi
302 -
303 - # Ovmf's patchset
304 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
305 - einfo "Try to apply Ovmf patch set"
306 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
307 - EPATCH_SUFFIX="patch" \
308 - EPATCH_FORCE="yes" \
309 - EPATCH_OPTS="-p1" \
310 - epatch "${WORKDIR}"/patches-ovmf
311 - popd > /dev/null
312 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
313 - fi
314 -
315 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
316 -
317 - # Fix texi2html build error with new texi2html, qemu.doc.html
318 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
319 -
320 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
321 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
322 - -i tools/firmware/Makefile || die
323 -
324 - # Drop .config, fixes to gcc-4.6
325 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
326 -
327 - # if the user *really* wants to use their own custom-cflags, let them
328 - if use custom-cflags; then
329 - einfo "User wants their own CFLAGS - removing defaults"
330 -
331 - # try and remove all the default cflags
332 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
333 - -exec sed \
334 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
335 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
336 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
337 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
338 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
339 - -i {} + || die "failed to re-set custom-cflags"
340 - else
341 - unset CFLAGS
342 - unset LDFLAGS
343 - unset ASFLAGS
344 - unset CPPFLAGS
345 - fi
346 -
347 - if ! use pygrub; then
348 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
349 - fi
350 -
351 - if ! use python; then
352 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
353 - fi
354 -
355 - if ! use hvm; then
356 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
357 - # Bug 351648
358 - elif ! use x86 && ! has x86 $(get_all_abis); then
359 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
360 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
361 - export CPATH="${WORKDIR}"/extra-headers
362 - fi
363 -
364 - if use qemu; then
365 - if use sdl; then
366 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
367 - tools/Makefile || die
368 - else
369 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
370 - tools/qemu-xen-traditional/xen-setup || die
371 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
372 - tools/Makefile || die
373 - fi
374 - else
375 - # Don't bother with qemu, only needed for fully virtualised guests
376 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
377 - fi
378 -
379 - # Reset bash completion dir; Bug 472438
380 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
381 - -i Config.mk || die
382 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
383 -
384 - # xencommons, Bug #492332, sed lighter weight than patching
385 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
386 - -i tools/hotplug/Linux/init.d/xencommons.in || die
387 -
388 - # respect multilib, usr/lib/libcacard.so.0.0.0
389 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
390 - -i tools/qemu-xen/configure || die
391 -
392 - #bug 518136, don't build 32bit exactuable for nomultilib profile
393 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
394 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
395 - fi
396 -
397 - # use /var instead of /var/lib, consistat with previous ebuild
398 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
399 - m4/paths.m4 configure tools/configure || die
400 - # use /run instead of /var/run
401 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
402 - m4/paths.m4 configure tools/configure || die
403 -
404 - # uncomment lines in xl.conf
405 - sed -e 's:^#autoballoon=:autoballoon=:' \
406 - -e 's:^#lockfile=:lockfile=:' \
407 - -e 's:^#vif.default.script=:vif.default.script=:' \
408 - -i tools/examples/xl.conf || die
409 -
410 - epatch_user
411 -}
412 -
413 -src_configure() {
414 - local myconf="--prefix=${PREFIX}/usr \
415 - --libdir=${PREFIX}/usr/$(get_libdir) \
416 - --libexecdir=${PREFIX}/usr/libexec \
417 - --disable-werror \
418 - --disable-xen \
419 - --enable-tools \
420 - --enable-docs \
421 - $(use_with system-qemu) \
422 - $(use_enable pam) \
423 - $(use_enable api xenapi) \
424 - $(use_enable ovmf) \
425 - $(use_enable ocaml ocamltools) \
426 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
427 - "
428 -
429 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
430 - use qemu || myconf+=" --with-system-qemu"
431 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
432 - econf ${myconf}
433 -}
434 -
435 -src_compile() {
436 - export VARTEXFONTS="${T}/fonts"
437 - local myopt
438 - use debug && myopt="${myopt} debug=y"
439 -
440 - if test-flag-CC -fno-strict-overflow; then
441 - append-flags -fno-strict-overflow
442 - fi
443 -
444 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
445 -
446 - use doc && emake -C docs txt html
447 - emake -C docs man-pages
448 -}
449 -
450 -src_install() {
451 - # Override auto-detection in the build system, bug #382573
452 - export INITD_DIR=/tmp/init.d
453 - export CONFIG_LEAF_DIR=../tmp/default
454 -
455 - # Let the build system compile installed Python modules.
456 - local PYTHONDONTWRITEBYTECODE
457 - export PYTHONDONTWRITEBYTECODE
458 -
459 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
460 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
461 -
462 - # Fix the remaining Python shebangs.
463 - python_fix_shebang "${D}"
464 -
465 - # Remove RedHat-specific stuff
466 - rm -rf "${D}"tmp || die
467 -
468 - if use doc; then
469 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
470 -
471 - dohtml -r docs/
472 - docinto pdf
473 - dodoc ${DOCS[@]}
474 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
475 - fi
476 -
477 - rm -rf "${D}"/usr/share/doc/xen/
478 - doman docs/man?/*
479 -
480 - newconfd "${FILESDIR}"/xendomains.confd xendomains
481 - newconfd "${FILESDIR}"/xenstored.confd xenstored
482 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
483 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
484 - newinitd "${FILESDIR}"/xenstored.initd xenstored
485 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
486 - newinitd "${FILESDIR}"/xencommons.initd xencommons
487 - newconfd "${FILESDIR}"/xencommons.confd xencommons
488 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
489 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
490 -
491 - if use screen; then
492 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
493 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
494 - keepdir /var/log/xen-consoles
495 - fi
496 -
497 - # For -static-libs wrt Bug 384355
498 - if ! use static-libs; then
499 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
500 - fi
501 -
502 - # for xendomains
503 - keepdir /etc/xen/auto
504 -
505 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
506 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
507 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
508 -}
509 -
510 -pkg_postinst() {
511 - elog "Official Xen Guide and the offical wiki page:"
512 - elog "https://wiki.gentoo.org/wiki/Xen"
513 - elog "http://wiki.xen.org/wiki/Main_Page"
514 - elog ""
515 - elog "Recommended to utilise the xencommons script to config sytem At boot"
516 - elog "Add by use of rc-update on completion of the install"
517 -
518 - if ! use hvm; then
519 - echo
520 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
521 - elog "support enable the hvm use flag."
522 - elog "An x86 or amd64 system is required to build HVM support."
523 - fi
524 -
525 - if use qemu; then
526 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
527 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
528 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
529 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
530 - fi
531 -}
532
533 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
534 deleted file mode 100644
535 index 0ce7a84..0000000
536 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
537 +++ /dev/null
538 @@ -1,469 +0,0 @@
539 -# Copyright 1999-2016 Gentoo Foundation
540 -# Distributed under the terms of the GNU General Public License v2
541 -# $Id$
542 -
543 -EAPI=5
544 -
545 -PYTHON_COMPAT=( python2_7 )
546 -PYTHON_REQ_USE='ncurses,xml,threads'
547 -
548 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
549 -
550 -MY_PV=${PV/_/-}
551 -MAJOR_V="$(get_version_component_range 1-2)"
552 -
553 -if [[ $PV == *9999 ]]; then
554 - inherit git-r3
555 - KEYWORDS=""
556 - REPO="xen.git"
557 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
558 - S="${WORKDIR}/${REPO}"
559 -else
560 - KEYWORDS="~amd64 ~arm ~x86"
561 - UPSTREAM_VER=0
562 - SECURITY_VER=7
563 - # vars set to reflect https://dev.gentoo.org/~idella4/
564 - # first instance of UPS_VER (usptream ver)
565 - UPS_VER=0
566 - SEC_VER=10
567 - QEMU_VER=3
568 - # xen-tools's gentoo patches tarball
569 - GENTOO_VER=4
570 - # xen-tools's gentoo patches version which apply to this specific ebuild
571 - GENTOO_GPV=0
572 - # xen-tools ovmf's patches
573 - OVMF_VER=1
574 -
575 - SEABIOS_VER=1.8.2
576 - OVMF_PV=20150629
577 -
578 - [[ -n ${UPSTREAM_VER} ]] && \
579 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
580 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
581 - [[ -n ${SECURITY_VER} ]] && \
582 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
583 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
584 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
585 - [[ -n ${GENTOO_VER} ]] && \
586 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
587 - [[ -n ${OVMF_VER} ]] && \
588 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
589 -
590 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
591 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
592 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
593 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
594 - ${OVMF_PATCHSET_URI} )
595 - ${UPSTREAM_PATCHSET_URI}
596 - ${SECURITY_PATCHSET_URI}
597 - ${GENTOO_PATCHSET_URI}"
598 -
599 - S="${WORKDIR}/xen-${MY_PV}"
600 -fi
601 -
602 -DESCRIPTION="Xen tools including QEMU and xl"
603 -HOMEPAGE="http://xen.org/"
604 -DOCS=( README docs/README.xen-bugtool )
605 -
606 -LICENSE="GPL-2"
607 -SLOT="0/${MAJOR_V}"
608 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
609 -# >=dev-lang/ocaml-4 stable
610 -# Masked in profiles/eapi-5-files instead
611 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
612 -
613 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
614 - ${PYTHON_REQUIRED_USE}
615 - pygrub? ( python )
616 - ovmf? ( hvm )
617 - qemu? ( !system-qemu )"
618 -
619 -COMMON_DEPEND="
620 - dev-libs/lzo:2
621 - dev-libs/glib:2
622 - dev-libs/yajl
623 - dev-libs/libaio
624 - dev-libs/libgcrypt:0
625 - sys-libs/zlib
626 -"
627 -
628 -DEPEND="${COMMON_DEPEND}
629 - dev-python/lxml[${PYTHON_USEDEP}]
630 - x86? ( sys-devel/dev86
631 - sys-power/iasl )
632 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
633 - ${PYTHON_DEPS}
634 - api? ( dev-libs/libxml2
635 - net-misc/curl )
636 - ovmf? ( $(python_gen_impl_dep sqlite) )
637 - !amd64? ( >=sys-apps/dtc-1.4.0 )
638 - amd64? ( sys-devel/bin86
639 - system-seabios? ( sys-firmware/seabios )
640 - sys-firmware/ipxe
641 - sys-devel/dev86
642 - sys-power/iasl )
643 - dev-lang/perl
644 - app-misc/pax-utils
645 - doc? (
646 - app-doc/doxygen
647 - dev-python/markdown[${PYTHON_USEDEP}]
648 - dev-tex/latex2html[png,gif]
649 - media-gfx/graphviz
650 - dev-tex/xcolor
651 - media-gfx/transfig
652 - dev-texlive/texlive-latexextra
653 - virtual/latex-base
654 - dev-tex/latexmk
655 - dev-texlive/texlive-latex
656 - dev-texlive/texlive-pictures
657 - dev-texlive/texlive-latexrecommended
658 - )
659 - hvm? ( x11-proto/xproto
660 - !net-libs/libiscsi )
661 - qemu? (
662 - x11-libs/pixman
663 - sdl? ( media-libs/libsdl[X] )
664 - )
665 - system-qemu? ( app-emulation/qemu[xen] )
666 - ocaml? ( dev-ml/findlib
667 - >=dev-lang/ocaml-4 )"
668 -
669 -RDEPEND="${COMMON_DEPEND}
670 - sys-apps/iproute2[-minimal]
671 - net-misc/bridge-utils
672 - screen? (
673 - app-misc/screen
674 - app-admin/logrotate
675 - )"
676 -
677 -# hvmloader is used to bootstrap a fully virtualized kernel
678 -# Approved by QA team in bug #144032
679 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
680 - usr/share/qemu-xen/qemu/s390-ccw.img"
681 -
682 -RESTRICT="test"
683 -
684 -pkg_setup() {
685 - python-single-r1_pkg_setup
686 - export "CONFIG_LOMOUNT=y"
687 -
688 - #bug 522642, disable compile tools/tests
689 - export "CONFIG_TESTS=n"
690 -
691 - if has_version dev-libs/libgcrypt:0; then
692 - export "CONFIG_GCRYPT=y"
693 - fi
694 -
695 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
696 - if use x86 && use amd64; then
697 - die "Confusion! Both x86 and amd64 are set in your use flags!"
698 - elif use x86; then
699 - export XEN_TARGET_ARCH="x86_32"
700 - elif use amd64 ; then
701 - export XEN_TARGET_ARCH="x86_64"
702 - elif use arm; then
703 - export XEN_TARGET_ARCH="arm32"
704 - elif use arm64; then
705 - export XEN_TARGET_ARCH="arm64"
706 - else
707 - die "Unsupported architecture!"
708 - fi
709 - fi
710 -}
711 -
712 -src_prepare() {
713 - # Upstream's patchset
714 - if [[ -n ${UPSTREAM_VER} ]]; then
715 - einfo "Try to apply Xen Upstream patch set"
716 - EPATCH_SUFFIX="patch" \
717 - EPATCH_FORCE="yes" \
718 - EPATCH_OPTS="-p1" \
719 - epatch "${WORKDIR}"/patches-upstream \
720 - "${WORKDIR}"/libexec.patch
721 - fi
722 -
723 - # Security patchset
724 - if [[ -n ${SECURITY_VER} ]]; then
725 - einfo "Try to apply Xen Security patch set"
726 - source "${WORKDIR}"/patches-security/${PV}.conf
727 - # apply main xen patches
728 - # Two parallel systems, both work side by side
729 - # Over time they may concdense into one. This will suffice for now
730 - EPATCH_SUFFIX="patch"
731 - EPATCH_FORCE="yes"
732 - for i in ${XEN_SECURITY_MAIN}; do
733 - epatch "${WORKDIR}"/patches-security/xen/$i
734 - done
735 -
736 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
737 - epatch $i
738 - done
739 -
740 - # apply qemu-traditional patches
741 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
742 - for i in ${XEN_SECURITY_QEMUT}; do
743 - epatch "${WORKDIR}"/patches-security/qemut/$i
744 - done
745 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
746 - epatch $i
747 - done
748 - popd > /dev/null
749 -
750 - # apply qemu-xen/upstream patches
751 - pushd "${S}"/tools/qemu-xen/ > /dev/null
752 - for i in ${XEN_SECURITY_QEMUU}; do
753 - epatch "${WORKDIR}"/patches-security/qemuu/$i
754 - done
755 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
756 - epatch $i
757 - done
758 - popd > /dev/null
759 - fi
760 -
761 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
762 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
763 - pushd tools/firmware/ > /dev/null
764 - ln -s seabios-dir-remote seabios-dir || die
765 - popd > /dev/null
766 -
767 - # Gentoo's patchset
768 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
769 - einfo "Try to apply Gentoo specific patch set"
770 - source "${FILESDIR}"/gentoo-patches.conf
771 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
772 - for i in ${!_gpv}; do
773 - EPATCH_SUFFIX="patch" \
774 - EPATCH_FORCE="yes" \
775 - epatch "${WORKDIR}"/patches-gentoo/$i
776 - done
777 - fi
778 -
779 - # Ovmf's patchset
780 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
781 - einfo "Try to apply Ovmf patch set"
782 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
783 - EPATCH_SUFFIX="patch" \
784 - EPATCH_FORCE="yes" \
785 - EPATCH_OPTS="-p1" \
786 - epatch "${WORKDIR}"/patches-ovmf
787 - popd > /dev/null
788 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
789 - fi
790 -
791 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
792 -
793 - # Fix texi2html build error with new texi2html, qemu.doc.html
794 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
795 -
796 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
797 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
798 - -i tools/firmware/Makefile || die
799 -
800 - # Drop .config, fixes to gcc-4.6
801 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
802 -
803 - # if the user *really* wants to use their own custom-cflags, let them
804 - if use custom-cflags; then
805 - einfo "User wants their own CFLAGS - removing defaults"
806 -
807 - # try and remove all the default cflags
808 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
809 - -exec sed \
810 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
811 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
812 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
813 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
814 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
815 - -i {} + || die "failed to re-set custom-cflags"
816 - else
817 - unset CFLAGS
818 - unset LDFLAGS
819 - unset ASFLAGS
820 - unset CPPFLAGS
821 - fi
822 -
823 - if ! use pygrub; then
824 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
825 - fi
826 -
827 - if ! use python; then
828 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
829 - fi
830 -
831 - if ! use hvm; then
832 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
833 - # Bug 351648
834 - elif ! use x86 && ! has x86 $(get_all_abis); then
835 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
836 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
837 - export CPATH="${WORKDIR}"/extra-headers
838 - fi
839 -
840 - if use qemu; then
841 - if use sdl; then
842 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
843 - tools/Makefile || die
844 - else
845 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
846 - tools/qemu-xen-traditional/xen-setup || die
847 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
848 - tools/Makefile || die
849 - fi
850 - else
851 - # Don't bother with qemu, only needed for fully virtualised guests
852 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
853 - fi
854 -
855 - # Reset bash completion dir; Bug 472438
856 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
857 - -i Config.mk || die
858 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
859 -
860 - # xencommons, Bug #492332, sed lighter weight than patching
861 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
862 - -i tools/hotplug/Linux/init.d/xencommons.in || die
863 -
864 - # respect multilib, usr/lib/libcacard.so.0.0.0
865 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
866 - -i tools/qemu-xen/configure || die
867 -
868 - #bug 518136, don't build 32bit exactuable for nomultilib profile
869 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
870 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
871 - fi
872 -
873 - # use /var instead of /var/lib, consistat with previous ebuild
874 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
875 - m4/paths.m4 configure tools/configure || die
876 - # use /run instead of /var/run
877 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
878 - m4/paths.m4 configure tools/configure || die
879 -
880 - # uncomment lines in xl.conf
881 - sed -e 's:^#autoballoon=:autoballoon=:' \
882 - -e 's:^#lockfile=:lockfile=:' \
883 - -e 's:^#vif.default.script=:vif.default.script=:' \
884 - -i tools/examples/xl.conf || die
885 -
886 - epatch_user
887 -}
888 -
889 -src_configure() {
890 - local myconf="--prefix=${PREFIX}/usr \
891 - --libdir=${PREFIX}/usr/$(get_libdir) \
892 - --libexecdir=${PREFIX}/usr/libexec \
893 - --disable-werror \
894 - --disable-xen \
895 - --enable-tools \
896 - --enable-docs \
897 - $(use_with system-qemu) \
898 - $(use_enable pam) \
899 - $(use_enable api xenapi) \
900 - $(use_enable ovmf) \
901 - $(use_enable ocaml ocamltools) \
902 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
903 - "
904 -
905 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
906 - use qemu || myconf+=" --with-system-qemu"
907 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
908 - econf ${myconf}
909 -}
910 -
911 -src_compile() {
912 - export VARTEXFONTS="${T}/fonts"
913 - local myopt
914 - use debug && myopt="${myopt} debug=y"
915 -
916 - if test-flag-CC -fno-strict-overflow; then
917 - append-flags -fno-strict-overflow
918 - fi
919 -
920 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
921 -
922 - use doc && emake -C docs txt html
923 - emake -C docs man-pages
924 -}
925 -
926 -src_install() {
927 - # Override auto-detection in the build system, bug #382573
928 - export INITD_DIR=/tmp/init.d
929 - export CONFIG_LEAF_DIR=../tmp/default
930 -
931 - # Let the build system compile installed Python modules.
932 - local PYTHONDONTWRITEBYTECODE
933 - export PYTHONDONTWRITEBYTECODE
934 -
935 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
936 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
937 -
938 - # Fix the remaining Python shebangs.
939 - python_fix_shebang "${D}"
940 -
941 - # Remove RedHat-specific stuff
942 - rm -rf "${D}"tmp || die
943 -
944 - if use doc; then
945 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
946 -
947 - dohtml -r docs/
948 - docinto pdf
949 - dodoc ${DOCS[@]}
950 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
951 - fi
952 -
953 - rm -rf "${D}"/usr/share/doc/xen/
954 - doman docs/man?/*
955 -
956 - newconfd "${FILESDIR}"/xendomains.confd xendomains
957 - newconfd "${FILESDIR}"/xenstored.confd xenstored
958 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
959 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
960 - newinitd "${FILESDIR}"/xenstored.initd xenstored
961 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
962 - newinitd "${FILESDIR}"/xencommons.initd xencommons
963 - newconfd "${FILESDIR}"/xencommons.confd xencommons
964 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
965 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
966 -
967 - if use screen; then
968 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
969 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
970 - keepdir /var/log/xen-consoles
971 - fi
972 -
973 - # For -static-libs wrt Bug 384355
974 - if ! use static-libs; then
975 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
976 - fi
977 -
978 - # for xendomains
979 - keepdir /etc/xen/auto
980 -
981 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
982 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
983 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
984 -}
985 -
986 -pkg_postinst() {
987 - elog "Official Xen Guide and the offical wiki page:"
988 - elog "https://wiki.gentoo.org/wiki/Xen"
989 - elog "http://wiki.xen.org/wiki/Main_Page"
990 - elog ""
991 - elog "Recommended to utilise the xencommons script to config sytem At boot"
992 - elog "Add by use of rc-update on completion of the install"
993 -
994 - if ! use hvm; then
995 - echo
996 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
997 - elog "support enable the hvm use flag."
998 - elog "An x86 or amd64 system is required to build HVM support."
999 - fi
1000 -
1001 - if use qemu; then
1002 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1003 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1004 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1005 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1006 - fi
1007 -}
1008
1009 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
1010 deleted file mode 100644
1011 index 92486da..0000000
1012 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
1013 +++ /dev/null
1014 @@ -1,469 +0,0 @@
1015 -# Copyright 1999-2016 Gentoo Foundation
1016 -# Distributed under the terms of the GNU General Public License v2
1017 -# $Id$
1018 -
1019 -EAPI=5
1020 -
1021 -PYTHON_COMPAT=( python2_7 )
1022 -PYTHON_REQ_USE='ncurses,xml,threads'
1023 -
1024 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1025 -
1026 -MY_PV=${PV/_/-}
1027 -MAJOR_V="$(get_version_component_range 1-2)"
1028 -
1029 -if [[ $PV == *9999 ]]; then
1030 - inherit git-r3
1031 - KEYWORDS=""
1032 - REPO="xen.git"
1033 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1034 - S="${WORKDIR}/${REPO}"
1035 -else
1036 - KEYWORDS="amd64 ~arm ~arm64 x86"
1037 - UPSTREAM_VER=0
1038 - SECURITY_VER=7
1039 - # vars set to reflect https://dev.gentoo.org/~idella4/
1040 - # first instance of UPS_VER (usptream ver)
1041 - UPS_VER=0
1042 - SEC_VER=9
1043 - QEMU_VER=0
1044 - # xen-tools's gentoo patches tarball
1045 - GENTOO_VER=4
1046 - # xen-tools's gentoo patches version which apply to this specific ebuild
1047 - GENTOO_GPV=0
1048 - # xen-tools ovmf's patches
1049 - OVMF_VER=1
1050 -
1051 - SEABIOS_VER=1.8.2
1052 - OVMF_PV=20150629
1053 -
1054 - [[ -n ${UPSTREAM_VER} ]] && \
1055 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
1056 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
1057 - [[ -n ${SECURITY_VER} ]] && \
1058 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
1059 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
1060 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
1061 - [[ -n ${GENTOO_VER} ]] && \
1062 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1063 - [[ -n ${OVMF_VER} ]] && \
1064 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1065 -
1066 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
1067 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1068 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1069 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
1070 - ${OVMF_PATCHSET_URI} )
1071 - ${UPSTREAM_PATCHSET_URI}
1072 - ${SECURITY_PATCHSET_URI}
1073 - ${GENTOO_PATCHSET_URI}"
1074 -
1075 - S="${WORKDIR}/xen-${MY_PV}"
1076 -fi
1077 -
1078 -DESCRIPTION="Xen tools including QEMU and xl"
1079 -HOMEPAGE="http://xen.org/"
1080 -DOCS=( README docs/README.xen-bugtool )
1081 -
1082 -LICENSE="GPL-2"
1083 -SLOT="0/${MAJOR_V}"
1084 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1085 -# >=dev-lang/ocaml-4 stable
1086 -# Masked in profiles/eapi-5-files instead
1087 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
1088 -
1089 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
1090 - ${PYTHON_REQUIRED_USE}
1091 - pygrub? ( python )
1092 - ovmf? ( hvm )
1093 - qemu? ( !system-qemu )"
1094 -
1095 -COMMON_DEPEND="
1096 - dev-libs/lzo:2
1097 - dev-libs/glib:2
1098 - dev-libs/yajl
1099 - dev-libs/libaio
1100 - dev-libs/libgcrypt:0
1101 - sys-libs/zlib
1102 -"
1103 -
1104 -DEPEND="${COMMON_DEPEND}
1105 - dev-python/lxml[${PYTHON_USEDEP}]
1106 - x86? ( sys-devel/dev86
1107 - sys-power/iasl )
1108 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1109 - ${PYTHON_DEPS}
1110 - api? ( dev-libs/libxml2
1111 - net-misc/curl )
1112 - ovmf? ( $(python_gen_impl_dep sqlite) )
1113 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1114 - amd64? ( sys-devel/bin86
1115 - system-seabios? ( sys-firmware/seabios )
1116 - sys-firmware/ipxe
1117 - sys-devel/dev86
1118 - sys-power/iasl )
1119 - dev-lang/perl
1120 - app-misc/pax-utils
1121 - doc? (
1122 - app-doc/doxygen
1123 - dev-python/markdown[${PYTHON_USEDEP}]
1124 - dev-tex/latex2html[png,gif]
1125 - media-gfx/graphviz
1126 - dev-tex/xcolor
1127 - media-gfx/transfig
1128 - dev-texlive/texlive-latexextra
1129 - virtual/latex-base
1130 - dev-tex/latexmk
1131 - dev-texlive/texlive-latex
1132 - dev-texlive/texlive-pictures
1133 - dev-texlive/texlive-latexrecommended
1134 - )
1135 - hvm? ( x11-proto/xproto
1136 - !net-libs/libiscsi )
1137 - qemu? (
1138 - x11-libs/pixman
1139 - sdl? ( media-libs/libsdl[X] )
1140 - )
1141 - system-qemu? ( app-emulation/qemu[xen] )
1142 - ocaml? ( dev-ml/findlib
1143 - >=dev-lang/ocaml-4 )"
1144 -
1145 -RDEPEND="${COMMON_DEPEND}
1146 - sys-apps/iproute2[-minimal]
1147 - net-misc/bridge-utils
1148 - screen? (
1149 - app-misc/screen
1150 - app-admin/logrotate
1151 - )"
1152 -
1153 -# hvmloader is used to bootstrap a fully virtualized kernel
1154 -# Approved by QA team in bug #144032
1155 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
1156 - usr/share/qemu-xen/qemu/s390-ccw.img"
1157 -
1158 -RESTRICT="test"
1159 -
1160 -pkg_setup() {
1161 - python-single-r1_pkg_setup
1162 - export "CONFIG_LOMOUNT=y"
1163 -
1164 - #bug 522642, disable compile tools/tests
1165 - export "CONFIG_TESTS=n"
1166 -
1167 - if has_version dev-libs/libgcrypt:0; then
1168 - export "CONFIG_GCRYPT=y"
1169 - fi
1170 -
1171 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1172 - if use x86 && use amd64; then
1173 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1174 - elif use x86; then
1175 - export XEN_TARGET_ARCH="x86_32"
1176 - elif use amd64 ; then
1177 - export XEN_TARGET_ARCH="x86_64"
1178 - elif use arm; then
1179 - export XEN_TARGET_ARCH="arm32"
1180 - elif use arm64; then
1181 - export XEN_TARGET_ARCH="arm64"
1182 - else
1183 - die "Unsupported architecture!"
1184 - fi
1185 - fi
1186 -}
1187 -
1188 -src_prepare() {
1189 - # Upstream's patchset
1190 - if [[ -n ${UPSTREAM_VER} ]]; then
1191 - einfo "Try to apply Xen Upstream patch set"
1192 - EPATCH_SUFFIX="patch" \
1193 - EPATCH_FORCE="yes" \
1194 - EPATCH_OPTS="-p1" \
1195 - epatch "${WORKDIR}"/patches-upstream \
1196 - "${WORKDIR}"/libexec.patch
1197 - fi
1198 -
1199 - # Security patchset
1200 - if [[ -n ${SECURITY_VER} ]]; then
1201 - einfo "Try to apply Xen Security patch set"
1202 - source "${WORKDIR}"/patches-security/${PV}.conf
1203 - # apply main xen patches
1204 - # Two parallel systems, both work side by side
1205 - # Over time they may concdense into one. This will suffice for now
1206 - EPATCH_SUFFIX="patch"
1207 - EPATCH_FORCE="yes"
1208 - for i in ${XEN_SECURITY_MAIN}; do
1209 - epatch "${WORKDIR}"/patches-security/xen/$i
1210 - done
1211 -
1212 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
1213 - epatch $i
1214 - done
1215 -
1216 - # apply qemu-traditional patches
1217 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1218 - for i in ${XEN_SECURITY_QEMUT}; do
1219 - epatch "${WORKDIR}"/patches-security/qemut/$i
1220 - done
1221 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
1222 - epatch $i
1223 - done
1224 - popd > /dev/null
1225 -
1226 - # apply qemu-xen/upstream patches
1227 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1228 - for i in ${XEN_SECURITY_QEMUU}; do
1229 - epatch "${WORKDIR}"/patches-security/qemuu/$i
1230 - done
1231 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
1232 - epatch $i
1233 - done
1234 - popd > /dev/null
1235 - fi
1236 -
1237 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1238 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1239 - pushd tools/firmware/ > /dev/null
1240 - ln -s seabios-dir-remote seabios-dir || die
1241 - popd > /dev/null
1242 -
1243 - # Gentoo's patchset
1244 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1245 - einfo "Try to apply Gentoo specific patch set"
1246 - source "${FILESDIR}"/gentoo-patches.conf
1247 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1248 - for i in ${!_gpv}; do
1249 - EPATCH_SUFFIX="patch" \
1250 - EPATCH_FORCE="yes" \
1251 - epatch "${WORKDIR}"/patches-gentoo/$i
1252 - done
1253 - fi
1254 -
1255 - # Ovmf's patchset
1256 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
1257 - einfo "Try to apply Ovmf patch set"
1258 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1259 - EPATCH_SUFFIX="patch" \
1260 - EPATCH_FORCE="yes" \
1261 - EPATCH_OPTS="-p1" \
1262 - epatch "${WORKDIR}"/patches-ovmf
1263 - popd > /dev/null
1264 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1265 - fi
1266 -
1267 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1268 -
1269 - # Fix texi2html build error with new texi2html, qemu.doc.html
1270 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1271 -
1272 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1273 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1274 - -i tools/firmware/Makefile || die
1275 -
1276 - # Drop .config, fixes to gcc-4.6
1277 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1278 -
1279 - # if the user *really* wants to use their own custom-cflags, let them
1280 - if use custom-cflags; then
1281 - einfo "User wants their own CFLAGS - removing defaults"
1282 -
1283 - # try and remove all the default cflags
1284 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1285 - -exec sed \
1286 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1287 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1288 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1289 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1290 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1291 - -i {} + || die "failed to re-set custom-cflags"
1292 - else
1293 - unset CFLAGS
1294 - unset LDFLAGS
1295 - unset ASFLAGS
1296 - unset CPPFLAGS
1297 - fi
1298 -
1299 - if ! use pygrub; then
1300 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1301 - fi
1302 -
1303 - if ! use python; then
1304 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1305 - fi
1306 -
1307 - if ! use hvm; then
1308 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1309 - # Bug 351648
1310 - elif ! use x86 && ! has x86 $(get_all_abis); then
1311 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1312 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1313 - export CPATH="${WORKDIR}"/extra-headers
1314 - fi
1315 -
1316 - if use qemu; then
1317 - if use sdl; then
1318 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1319 - tools/Makefile || die
1320 - else
1321 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1322 - tools/qemu-xen-traditional/xen-setup || die
1323 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1324 - tools/Makefile || die
1325 - fi
1326 - else
1327 - # Don't bother with qemu, only needed for fully virtualised guests
1328 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1329 - fi
1330 -
1331 - # Reset bash completion dir; Bug 472438
1332 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1333 - -i Config.mk || die
1334 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1335 -
1336 - # xencommons, Bug #492332, sed lighter weight than patching
1337 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1338 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1339 -
1340 - # respect multilib, usr/lib/libcacard.so.0.0.0
1341 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1342 - -i tools/qemu-xen/configure || die
1343 -
1344 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1345 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1346 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1347 - fi
1348 -
1349 - # use /var instead of /var/lib, consistat with previous ebuild
1350 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
1351 - m4/paths.m4 configure tools/configure || die
1352 - # use /run instead of /var/run
1353 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
1354 - m4/paths.m4 configure tools/configure || die
1355 -
1356 - # uncomment lines in xl.conf
1357 - sed -e 's:^#autoballoon=:autoballoon=:' \
1358 - -e 's:^#lockfile=:lockfile=:' \
1359 - -e 's:^#vif.default.script=:vif.default.script=:' \
1360 - -i tools/examples/xl.conf || die
1361 -
1362 - epatch_user
1363 -}
1364 -
1365 -src_configure() {
1366 - local myconf="--prefix=${PREFIX}/usr \
1367 - --libdir=${PREFIX}/usr/$(get_libdir) \
1368 - --libexecdir=${PREFIX}/usr/libexec \
1369 - --disable-werror \
1370 - --disable-xen \
1371 - --enable-tools \
1372 - --enable-docs \
1373 - $(use_with system-qemu) \
1374 - $(use_enable pam) \
1375 - $(use_enable api xenapi) \
1376 - $(use_enable ovmf) \
1377 - $(use_enable ocaml ocamltools) \
1378 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1379 - "
1380 -
1381 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1382 - use qemu || myconf+=" --with-system-qemu"
1383 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
1384 - econf ${myconf}
1385 -}
1386 -
1387 -src_compile() {
1388 - export VARTEXFONTS="${T}/fonts"
1389 - local myopt
1390 - use debug && myopt="${myopt} debug=y"
1391 -
1392 - if test-flag-CC -fno-strict-overflow; then
1393 - append-flags -fno-strict-overflow
1394 - fi
1395 -
1396 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
1397 -
1398 - use doc && emake -C docs txt html
1399 - emake -C docs man-pages
1400 -}
1401 -
1402 -src_install() {
1403 - # Override auto-detection in the build system, bug #382573
1404 - export INITD_DIR=/tmp/init.d
1405 - export CONFIG_LEAF_DIR=../tmp/default
1406 -
1407 - # Let the build system compile installed Python modules.
1408 - local PYTHONDONTWRITEBYTECODE
1409 - export PYTHONDONTWRITEBYTECODE
1410 -
1411 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1412 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1413 -
1414 - # Fix the remaining Python shebangs.
1415 - python_fix_shebang "${D}"
1416 -
1417 - # Remove RedHat-specific stuff
1418 - rm -rf "${D}"tmp || die
1419 -
1420 - if use doc; then
1421 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1422 -
1423 - dohtml -r docs/
1424 - docinto pdf
1425 - dodoc ${DOCS[@]}
1426 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
1427 - fi
1428 -
1429 - rm -rf "${D}"/usr/share/doc/xen/
1430 - doman docs/man?/*
1431 -
1432 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1433 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1434 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1435 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1436 - newinitd "${FILESDIR}"/xenstored.initd xenstored
1437 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1438 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1439 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1440 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1441 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1442 -
1443 - if use screen; then
1444 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1445 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1446 - keepdir /var/log/xen-consoles
1447 - fi
1448 -
1449 - # For -static-libs wrt Bug 384355
1450 - if ! use static-libs; then
1451 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1452 - fi
1453 -
1454 - # for xendomains
1455 - keepdir /etc/xen/auto
1456 -
1457 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1458 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1459 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1460 -}
1461 -
1462 -pkg_postinst() {
1463 - elog "Official Xen Guide and the offical wiki page:"
1464 - elog "https://wiki.gentoo.org/wiki/Xen"
1465 - elog "http://wiki.xen.org/wiki/Main_Page"
1466 - elog ""
1467 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1468 - elog "Add by use of rc-update on completion of the install"
1469 -
1470 - if ! use hvm; then
1471 - echo
1472 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1473 - elog "support enable the hvm use flag."
1474 - elog "An x86 or amd64 system is required to build HVM support."
1475 - fi
1476 -
1477 - if use qemu; then
1478 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1479 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1480 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1481 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1482 - fi
1483 -}
1484
1485 diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
1486 deleted file mode 100644
1487 index ecf2593..0000000
1488 --- a/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
1489 +++ /dev/null
1490 @@ -1,474 +0,0 @@
1491 -# Copyright 1999-2016 Gentoo Foundation
1492 -# Distributed under the terms of the GNU General Public License v2
1493 -# $Id$
1494 -
1495 -EAPI=5
1496 -
1497 -PYTHON_COMPAT=( python2_7 )
1498 -PYTHON_REQ_USE='ncurses,xml,threads'
1499 -
1500 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1501 -
1502 -MY_PV=${PV/_/-}
1503 -MAJOR_V="$(get_version_component_range 1-2)"
1504 -
1505 -if [[ $PV == *9999 ]]; then
1506 - inherit git-r3
1507 - KEYWORDS=""
1508 - REPO="xen.git"
1509 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1510 - S="${WORKDIR}/${REPO}"
1511 -else
1512 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
1513 - UPSTREAM_VER=
1514 - SECURITY_VER=
1515 - # vars set to reflect https://dev.gentoo.org/~idella4/
1516 - # first instance of UPS_VER (usptream ver)
1517 - UPS_VER=
1518 - SEC_VER=
1519 - QEMU_VER=
1520 - # xen-tools's gentoo patches tarball
1521 - GENTOO_VER=6
1522 - # xen-tools's gentoo patches version which apply to this specific ebuild
1523 - GENTOO_GPV=0
1524 - # xen-tools ovmf's patches
1525 - OVMF_VER=2
1526 -
1527 - SEABIOS_VER=1.8.2
1528 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
1529 - OVMF_PV=20151110
1530 -
1531 - [[ -n ${UPSTREAM_VER} ]] && \
1532 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
1533 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
1534 - [[ -n ${SECURITY_VER} ]] && \
1535 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
1536 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
1537 - [[ -n ${GENTOO_VER} ]] && \
1538 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1539 - [[ -n ${OVMF_VER} ]] && \
1540 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1541 -
1542 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
1543 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1544 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1545 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
1546 - ${OVMF_PATCHSET_URI} )
1547 - ${UPSTREAM_PATCHSET_URI}
1548 - ${SECURITY_PATCHSET_URI}
1549 - ${GENTOO_PATCHSET_URI}"
1550 -
1551 - S="${WORKDIR}/xen-${MY_PV}"
1552 -fi
1553 -
1554 -DESCRIPTION="Xen tools including QEMU and xl"
1555 -HOMEPAGE="http://xen.org/"
1556 -DOCS=( README docs/README.xen-bugtool )
1557 -
1558 -LICENSE="GPL-2"
1559 -SLOT="0/${MAJOR_V}"
1560 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1561 -# >=dev-lang/ocaml-4 stable
1562 -# Masked in profiles/eapi-5-files instead
1563 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
1564 -
1565 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
1566 - ${PYTHON_REQUIRED_USE}
1567 - pygrub? ( python )
1568 - ovmf? ( hvm )
1569 - qemu? ( !system-qemu )"
1570 -
1571 -COMMON_DEPEND="
1572 - dev-libs/lzo:2
1573 - dev-libs/glib:2
1574 - dev-libs/yajl
1575 - dev-libs/libaio
1576 - dev-libs/libgcrypt:0
1577 - sys-libs/zlib
1578 -"
1579 -
1580 -DEPEND="${COMMON_DEPEND}
1581 - dev-python/lxml[${PYTHON_USEDEP}]
1582 - x86? ( sys-devel/dev86
1583 - sys-power/iasl )
1584 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1585 - ${PYTHON_DEPS}
1586 - api? ( dev-libs/libxml2
1587 - net-misc/curl )
1588 - ovmf? ( $(python_gen_impl_dep sqlite) )
1589 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1590 - amd64? ( sys-devel/bin86
1591 - system-seabios? ( sys-firmware/seabios )
1592 - sys-firmware/ipxe
1593 - sys-devel/dev86
1594 - sys-power/iasl )
1595 - dev-lang/perl
1596 - app-misc/pax-utils
1597 - doc? (
1598 - app-doc/doxygen
1599 - dev-python/markdown[${PYTHON_USEDEP}]
1600 - dev-tex/latex2html[png,gif]
1601 - media-gfx/graphviz
1602 - dev-tex/xcolor
1603 - media-gfx/transfig
1604 - dev-texlive/texlive-latexextra
1605 - virtual/latex-base
1606 - dev-tex/latexmk
1607 - dev-texlive/texlive-latex
1608 - dev-texlive/texlive-pictures
1609 - dev-texlive/texlive-latexrecommended
1610 - )
1611 - hvm? ( x11-proto/xproto
1612 - !net-libs/libiscsi )
1613 - qemu? (
1614 - x11-libs/pixman
1615 - sdl? ( media-libs/libsdl[X] )
1616 - )
1617 - system-qemu? ( app-emulation/qemu[xen] )
1618 - ocaml? ( dev-ml/findlib
1619 - >=dev-lang/ocaml-4 )"
1620 -
1621 -RDEPEND="${COMMON_DEPEND}
1622 - sys-apps/iproute2[-minimal]
1623 - net-misc/bridge-utils
1624 - screen? (
1625 - app-misc/screen
1626 - app-admin/logrotate
1627 - )"
1628 -
1629 -# hvmloader is used to bootstrap a fully virtualized kernel
1630 -# Approved by QA team in bug #144032
1631 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
1632 - usr/share/qemu-xen/qemu/s390-ccw.img"
1633 -
1634 -RESTRICT="test"
1635 -
1636 -pkg_setup() {
1637 - python-single-r1_pkg_setup
1638 - export "CONFIG_LOMOUNT=y"
1639 -
1640 - #bug 522642, disable compile tools/tests
1641 - export "CONFIG_TESTS=n"
1642 -
1643 - if has_version dev-libs/libgcrypt:0; then
1644 - export "CONFIG_GCRYPT=y"
1645 - fi
1646 -
1647 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1648 - if use x86 && use amd64; then
1649 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1650 - elif use x86; then
1651 - export XEN_TARGET_ARCH="x86_32"
1652 - elif use amd64 ; then
1653 - export XEN_TARGET_ARCH="x86_64"
1654 - elif use arm; then
1655 - export XEN_TARGET_ARCH="arm32"
1656 - elif use arm64; then
1657 - export XEN_TARGET_ARCH="arm64"
1658 - else
1659 - die "Unsupported architecture!"
1660 - fi
1661 - fi
1662 -}
1663 -
1664 -src_prepare() {
1665 - # Upstream's patchset
1666 - if [[ -n ${UPSTREAM_VER} ]]; then
1667 - einfo "Try to apply Xen Upstream patch set"
1668 - EPATCH_SUFFIX="patch" \
1669 - EPATCH_FORCE="yes" \
1670 - EPATCH_OPTS="-p1" \
1671 - epatch "${WORKDIR}"/patches-upstream \
1672 - "${WORKDIR}"/libexec.patch
1673 - fi
1674 -
1675 - # Security patchset
1676 - if [[ -n ${SECURITY_VER} ]]; then
1677 - einfo "Try to apply Xen Security patch set"
1678 - source "${WORKDIR}"/patches-security/${PV}.conf
1679 - # apply main xen patches
1680 - # Two parallel systems, both work side by side
1681 - # Over time they may concdense into one. This will suffice for now
1682 - EPATCH_SUFFIX="patch"
1683 - EPATCH_FORCE="yes"
1684 - for i in ${XEN_SECURITY_MAIN}; do
1685 - epatch "${WORKDIR}"/patches-security/xen/$i
1686 - done
1687 -
1688 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
1689 - epatch $i
1690 - done
1691 -
1692 - # apply qemu-traditional patches
1693 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1694 - for i in ${XEN_SECURITY_QEMUT}; do
1695 - epatch "${WORKDIR}"/patches-security/qemut/$i
1696 - done
1697 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
1698 - epatch $i
1699 - done
1700 - popd > /dev/null
1701 -
1702 - # apply qemu-xen/upstream patches
1703 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1704 - for i in ${XEN_SECURITY_QEMUU}; do
1705 - epatch "${WORKDIR}"/patches-security/qemuu/$i
1706 - done
1707 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
1708 - epatch $i
1709 - done
1710 - popd > /dev/null
1711 - fi
1712 -
1713 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1714 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1715 - pushd tools/firmware/ > /dev/null
1716 - ln -s seabios-dir-remote seabios-dir || die
1717 - popd > /dev/null
1718 -
1719 - # Gentoo's patchset
1720 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1721 - einfo "Try to apply Gentoo specific patch set"
1722 - source "${FILESDIR}"/gentoo-patches.conf
1723 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1724 - for i in ${!_gpv}; do
1725 - EPATCH_SUFFIX="patch" \
1726 - EPATCH_FORCE="yes" \
1727 - epatch "${WORKDIR}"/patches-gentoo/$i
1728 - done
1729 - fi
1730 -
1731 - # Ovmf's patchset
1732 - if use ovmf; then
1733 - if [[ -n ${OVMF_VER} ]];then
1734 - einfo "Try to apply Ovmf patch set"
1735 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1736 - EPATCH_SUFFIX="patch" \
1737 - EPATCH_FORCE="yes" \
1738 - EPATCH_OPTS="-p1" \
1739 - epatch "${WORKDIR}"/patches-ovmf
1740 - popd > /dev/null
1741 - fi
1742 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1743 - fi
1744 -
1745 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1746 -
1747 - # Fix texi2html build error with new texi2html, qemu.doc.html
1748 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1749 -
1750 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1751 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1752 - -i tools/firmware/Makefile || die
1753 -
1754 - # Drop .config, fixes to gcc-4.6
1755 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1756 -
1757 - # if the user *really* wants to use their own custom-cflags, let them
1758 - if use custom-cflags; then
1759 - einfo "User wants their own CFLAGS - removing defaults"
1760 -
1761 - # try and remove all the default cflags
1762 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1763 - -exec sed \
1764 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1765 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1766 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1767 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1768 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1769 - -i {} + || die "failed to re-set custom-cflags"
1770 - else
1771 - unset CFLAGS
1772 - unset LDFLAGS
1773 - unset ASFLAGS
1774 - unset CPPFLAGS
1775 - fi
1776 -
1777 - if ! use pygrub; then
1778 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1779 - fi
1780 -
1781 - if ! use python; then
1782 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1783 - fi
1784 -
1785 - if ! use hvm; then
1786 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1787 - # Bug 351648
1788 - elif ! use x86 && ! has x86 $(get_all_abis); then
1789 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1790 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1791 - export CPATH="${WORKDIR}"/extra-headers
1792 - fi
1793 -
1794 - if use qemu; then
1795 - if use sdl; then
1796 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1797 - tools/Makefile || die
1798 - else
1799 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1800 - tools/qemu-xen-traditional/xen-setup || die
1801 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1802 - tools/Makefile || die
1803 - fi
1804 - else
1805 - # Don't bother with qemu, only needed for fully virtualised guests
1806 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1807 - fi
1808 -
1809 - # Reset bash completion dir; Bug 472438
1810 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1811 - -i Config.mk || die
1812 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1813 -
1814 - # xencommons, Bug #492332, sed lighter weight than patching
1815 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1816 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1817 -
1818 - # respect multilib, usr/lib/libcacard.so.0.0.0
1819 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1820 - -i tools/qemu-xen/configure || die
1821 -
1822 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1823 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1824 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1825 - fi
1826 -
1827 - # use /var instead of /var/lib, consistat with previous ebuild
1828 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
1829 - m4/paths.m4 configure tools/configure || die
1830 - # use /run instead of /var/run
1831 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
1832 - m4/paths.m4 configure tools/configure || die
1833 -
1834 - # uncomment lines in xl.conf
1835 - sed -e 's:^#autoballoon=:autoballoon=:' \
1836 - -e 's:^#lockfile=:lockfile=:' \
1837 - -e 's:^#vif.default.script=:vif.default.script=:' \
1838 - -i tools/examples/xl.conf || die
1839 -
1840 - # Bug #575868 converted to a sed statement, typo of one char
1841 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
1842 -
1843 - epatch_user
1844 -}
1845 -
1846 -src_configure() {
1847 - local myconf="--prefix=${PREFIX}/usr \
1848 - --libdir=${PREFIX}/usr/$(get_libdir) \
1849 - --libexecdir=${PREFIX}/usr/libexec \
1850 - --disable-werror \
1851 - --disable-xen \
1852 - --enable-tools \
1853 - --enable-docs \
1854 - $(use_with system-qemu) \
1855 - $(use_enable pam) \
1856 - $(use_enable api xenapi) \
1857 - $(use_enable ovmf) \
1858 - $(use_enable ocaml ocamltools) \
1859 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1860 - "
1861 -
1862 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1863 - use qemu || myconf+=" --with-system-qemu"
1864 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
1865 - econf ${myconf}
1866 -}
1867 -
1868 -src_compile() {
1869 - export VARTEXFONTS="${T}/fonts"
1870 - local myopt
1871 - use debug && myopt="${myopt} debug=y"
1872 -
1873 - if test-flag-CC -fno-strict-overflow; then
1874 - append-flags -fno-strict-overflow
1875 - fi
1876 -
1877 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
1878 -
1879 - use doc && emake -C docs txt html
1880 - emake -C docs man-pages
1881 -}
1882 -
1883 -src_install() {
1884 - # Override auto-detection in the build system, bug #382573
1885 - export INITD_DIR=/tmp/init.d
1886 - export CONFIG_LEAF_DIR=../tmp/default
1887 -
1888 - # Let the build system compile installed Python modules.
1889 - local PYTHONDONTWRITEBYTECODE
1890 - export PYTHONDONTWRITEBYTECODE
1891 -
1892 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1893 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1894 -
1895 - # Fix the remaining Python shebangs.
1896 - python_fix_shebang "${D}"
1897 -
1898 - # Remove RedHat-specific stuff
1899 - rm -rf "${D}"tmp || die
1900 -
1901 - if use doc; then
1902 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1903 -
1904 - dohtml -r docs/
1905 - docinto pdf
1906 - dodoc ${DOCS[@]}
1907 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
1908 - fi
1909 -
1910 - rm -rf "${D}"/usr/share/doc/xen/
1911 - doman docs/man?/*
1912 -
1913 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1914 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1915 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1916 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1917 - newinitd "${FILESDIR}"/xenstored.initd xenstored
1918 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1919 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1920 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1921 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1922 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1923 -
1924 - if use screen; then
1925 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1926 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1927 - keepdir /var/log/xen-consoles
1928 - fi
1929 -
1930 - # For -static-libs wrt Bug 384355
1931 - if ! use static-libs; then
1932 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1933 - fi
1934 -
1935 - # for xendomains
1936 - keepdir /etc/xen/auto
1937 -
1938 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1939 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1940 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1941 -}
1942 -
1943 -pkg_postinst() {
1944 - elog "Official Xen Guide and the offical wiki page:"
1945 - elog "https://wiki.gentoo.org/wiki/Xen"
1946 - elog "http://wiki.xen.org/wiki/Main_Page"
1947 - elog ""
1948 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1949 - elog "Add by use of rc-update on completion of the install"
1950 -
1951 - if ! use hvm; then
1952 - echo
1953 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1954 - elog "support enable the hvm use flag."
1955 - elog "An x86 or amd64 system is required to build HVM support."
1956 - fi
1957 -
1958 - if use qemu; then
1959 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1960 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1961 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1962 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1963 - fi
1964 -}
1965
1966 diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
1967 deleted file mode 100644
1968 index 1d23c9f..0000000
1969 --- a/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
1970 +++ /dev/null
1971 @@ -1,449 +0,0 @@
1972 -# Copyright 1999-2016 Gentoo Foundation
1973 -# Distributed under the terms of the GNU General Public License v2
1974 -# $Id$
1975 -
1976 -EAPI=5
1977 -
1978 -PYTHON_COMPAT=( python2_7 )
1979 -PYTHON_REQ_USE='ncurses,xml,threads'
1980 -
1981 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1982 -
1983 -MY_PV=${PV/_/-}
1984 -MAJOR_V="$(get_version_component_range 1-2)"
1985 -
1986 -if [[ $PV == *9999 ]]; then
1987 - inherit git-r3
1988 - KEYWORDS=""
1989 - REPO="xen.git"
1990 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1991 - S="${WORKDIR}/${REPO}"
1992 -else
1993 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
1994 - UPSTREAM_VER=
1995 - SECURITY_VER=2
1996 - # vars set to reflect https://dev.gentoo.org/~idella4/
1997 - # first instance of UPS_VER (usptream ver)
1998 - UPS_VER=
1999 - SEC_VER=
2000 - QEMU_VER=2
2001 - # xen-tools's gentoo patches tarball
2002 - GENTOO_VER=6
2003 - # xen-tools's gentoo patches version which apply to this specific ebuild
2004 - GENTOO_GPV=0
2005 - # xen-tools ovmf's patches
2006 - OVMF_VER=2
2007 -
2008 - SEABIOS_VER=1.8.2
2009 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
2010 - OVMF_PV=20151110
2011 -
2012 - [[ -n ${UPSTREAM_VER} ]] && \
2013 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
2014 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
2015 - [[ -n ${SECURITY_VER} ]] && \
2016 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
2017 -# SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
2018 - [[ -n ${GENTOO_VER} ]] && \
2019 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
2020 - [[ -n ${OVMF_VER} ]] && \
2021 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
2022 -
2023 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
2024 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
2025 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
2026 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
2027 - ${OVMF_PATCHSET_URI} )
2028 - ${UPSTREAM_PATCHSET_URI}
2029 - ${SECURITY_PATCHSET_URI}
2030 - ${GENTOO_PATCHSET_URI}"
2031 -
2032 - S="${WORKDIR}/xen-${MY_PV}"
2033 -fi
2034 -
2035 -DESCRIPTION="Xen tools including QEMU and xl"
2036 -HOMEPAGE="http://xen.org/"
2037 -DOCS=( README docs/README.xen-bugtool )
2038 -
2039 -LICENSE="GPL-2"
2040 -SLOT="0/${MAJOR_V}"
2041 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
2042 -# >=dev-lang/ocaml-4 stable
2043 -# Masked in profiles/eapi-5-files instead
2044 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
2045 -
2046 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
2047 - ${PYTHON_REQUIRED_USE}
2048 - pygrub? ( python )
2049 - ovmf? ( hvm )
2050 - qemu? ( !system-qemu )"
2051 -
2052 -COMMON_DEPEND="
2053 - dev-libs/lzo:2
2054 - dev-libs/glib:2
2055 - dev-libs/yajl
2056 - dev-libs/libaio
2057 - dev-libs/libgcrypt:0
2058 - sys-libs/zlib
2059 -"
2060 -
2061 -DEPEND="${COMMON_DEPEND}
2062 - dev-python/lxml[${PYTHON_USEDEP}]
2063 - x86? ( sys-devel/dev86
2064 - sys-power/iasl )
2065 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
2066 - ${PYTHON_DEPS}
2067 - api? ( dev-libs/libxml2
2068 - net-misc/curl )
2069 - ovmf? ( $(python_gen_impl_dep sqlite) )
2070 - !amd64? ( >=sys-apps/dtc-1.4.0 )
2071 - amd64? ( sys-devel/bin86
2072 - system-seabios? ( sys-firmware/seabios )
2073 - sys-firmware/ipxe
2074 - sys-devel/dev86
2075 - sys-power/iasl )
2076 - dev-lang/perl
2077 - app-misc/pax-utils
2078 - doc? (
2079 - app-doc/doxygen
2080 - dev-python/markdown[${PYTHON_USEDEP}]
2081 - dev-tex/latex2html[png,gif]
2082 - media-gfx/graphviz
2083 - dev-tex/xcolor
2084 - media-gfx/transfig
2085 - dev-texlive/texlive-latexextra
2086 - virtual/latex-base
2087 - dev-tex/latexmk
2088 - dev-texlive/texlive-latex
2089 - dev-texlive/texlive-pictures
2090 - dev-texlive/texlive-latexrecommended
2091 - )
2092 - hvm? ( x11-proto/xproto
2093 - !net-libs/libiscsi )
2094 - qemu? (
2095 - x11-libs/pixman
2096 - sdl? ( media-libs/libsdl[X] )
2097 - )
2098 - system-qemu? ( app-emulation/qemu[xen] )
2099 - ocaml? ( dev-ml/findlib
2100 - >=dev-lang/ocaml-4 )"
2101 -
2102 -RDEPEND="${COMMON_DEPEND}
2103 - sys-apps/iproute2[-minimal]
2104 - net-misc/bridge-utils
2105 - screen? (
2106 - app-misc/screen
2107 - app-admin/logrotate
2108 - )"
2109 -
2110 -# hvmloader is used to bootstrap a fully virtualized kernel
2111 -# Approved by QA team in bug #144032
2112 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
2113 - usr/share/qemu-xen/qemu/s390-ccw.img"
2114 -
2115 -RESTRICT="test"
2116 -
2117 -pkg_setup() {
2118 - python-single-r1_pkg_setup
2119 - export "CONFIG_LOMOUNT=y"
2120 -
2121 - #bug 522642, disable compile tools/tests
2122 - export "CONFIG_TESTS=n"
2123 -
2124 - if has_version dev-libs/libgcrypt:0; then
2125 - export "CONFIG_GCRYPT=y"
2126 - fi
2127 -
2128 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
2129 - if use x86 && use amd64; then
2130 - die "Confusion! Both x86 and amd64 are set in your use flags!"
2131 - elif use x86; then
2132 - export XEN_TARGET_ARCH="x86_32"
2133 - elif use amd64 ; then
2134 - export XEN_TARGET_ARCH="x86_64"
2135 - elif use arm; then
2136 - export XEN_TARGET_ARCH="arm32"
2137 - elif use arm64; then
2138 - export XEN_TARGET_ARCH="arm64"
2139 - else
2140 - die "Unsupported architecture!"
2141 - fi
2142 - fi
2143 -}
2144 -
2145 -src_prepare() {
2146 - # Upstream's patchset
2147 - if [[ -n ${UPSTREAM_VER} ]]; then
2148 - einfo "Try to apply Xen Upstream patch set"
2149 - EPATCH_SUFFIX="patch" \
2150 - EPATCH_FORCE="yes" \
2151 - EPATCH_OPTS="-p1" \
2152 - epatch "${WORKDIR}"/patches-upstream \
2153 - "${WORKDIR}"/libexec.patch
2154 - fi
2155 -
2156 - # Security patchset
2157 - if [[ -n ${QEMU_VER} ]]; then
2158 - # apply qemu-xen/upstream patches
2159 - pushd "${S}"/tools/qemu-xen/ > /dev/null
2160 - for i in ${XEN_SECURITY_QEMUU}; do
2161 - epatch "${WORKDIR}"/patches-security/qemuu/$i
2162 - done
2163 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
2164 - epatch $i
2165 - done
2166 - popd > /dev/null
2167 - fi
2168 -
2169 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
2170 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
2171 - pushd tools/firmware/ > /dev/null
2172 - ln -s seabios-dir-remote seabios-dir || die
2173 - popd > /dev/null
2174 -
2175 - # Gentoo's patchset
2176 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
2177 - einfo "Try to apply Gentoo specific patch set"
2178 - source "${FILESDIR}"/gentoo-patches.conf
2179 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
2180 - for i in ${!_gpv}; do
2181 - EPATCH_SUFFIX="patch" \
2182 - EPATCH_FORCE="yes" \
2183 - epatch "${WORKDIR}"/patches-gentoo/$i
2184 - done
2185 - fi
2186 -
2187 - # Ovmf's patchset
2188 - if use ovmf; then
2189 - if [[ -n ${OVMF_VER} ]];then
2190 - einfo "Try to apply Ovmf patch set"
2191 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
2192 - EPATCH_SUFFIX="patch" \
2193 - EPATCH_FORCE="yes" \
2194 - EPATCH_OPTS="-p1" \
2195 - epatch "${WORKDIR}"/patches-ovmf
2196 - popd > /dev/null
2197 - fi
2198 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
2199 - fi
2200 -
2201 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
2202 -
2203 - # Fix texi2html build error with new texi2html, qemu.doc.html
2204 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
2205 -
2206 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
2207 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
2208 - -i tools/firmware/Makefile || die
2209 -
2210 - # Drop .config, fixes to gcc-4.6
2211 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
2212 -
2213 - # if the user *really* wants to use their own custom-cflags, let them
2214 - if use custom-cflags; then
2215 - einfo "User wants their own CFLAGS - removing defaults"
2216 -
2217 - # try and remove all the default cflags
2218 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
2219 - -exec sed \
2220 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
2221 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
2222 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
2223 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
2224 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
2225 - -i {} + || die "failed to re-set custom-cflags"
2226 - else
2227 - unset CFLAGS
2228 - unset LDFLAGS
2229 - unset ASFLAGS
2230 - unset CPPFLAGS
2231 - fi
2232 -
2233 - if ! use pygrub; then
2234 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
2235 - fi
2236 -
2237 - if ! use python; then
2238 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
2239 - fi
2240 -
2241 - if ! use hvm; then
2242 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
2243 - # Bug 351648
2244 - elif ! use x86 && ! has x86 $(get_all_abis); then
2245 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
2246 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
2247 - export CPATH="${WORKDIR}"/extra-headers
2248 - fi
2249 -
2250 - if use qemu; then
2251 - if use sdl; then
2252 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
2253 - tools/Makefile || die
2254 - else
2255 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
2256 - tools/qemu-xen-traditional/xen-setup || die
2257 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
2258 - tools/Makefile || die
2259 - fi
2260 - else
2261 - # Don't bother with qemu, only needed for fully virtualised guests
2262 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
2263 - fi
2264 -
2265 - # Reset bash completion dir; Bug 472438
2266 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
2267 - -i Config.mk || die
2268 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
2269 -
2270 - # xencommons, Bug #492332, sed lighter weight than patching
2271 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
2272 - -i tools/hotplug/Linux/init.d/xencommons.in || die
2273 -
2274 - # respect multilib, usr/lib/libcacard.so.0.0.0
2275 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
2276 - -i tools/qemu-xen/configure || die
2277 -
2278 - #bug 518136, don't build 32bit exactuable for nomultilib profile
2279 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
2280 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
2281 - fi
2282 -
2283 - # use /var instead of /var/lib, consistat with previous ebuild
2284 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
2285 - m4/paths.m4 configure tools/configure || die
2286 - # use /run instead of /var/run
2287 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
2288 - m4/paths.m4 configure tools/configure || die
2289 -
2290 - # uncomment lines in xl.conf
2291 - sed -e 's:^#autoballoon=:autoballoon=:' \
2292 - -e 's:^#lockfile=:lockfile=:' \
2293 - -e 's:^#vif.default.script=:vif.default.script=:' \
2294 - -i tools/examples/xl.conf || die
2295 -
2296 - # Bug #575868 converted to a sed statement, typo of one char
2297 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
2298 -
2299 - epatch_user
2300 -}
2301 -
2302 -src_configure() {
2303 - local myconf="--prefix=${PREFIX}/usr \
2304 - --libdir=${PREFIX}/usr/$(get_libdir) \
2305 - --libexecdir=${PREFIX}/usr/libexec \
2306 - --disable-werror \
2307 - --disable-xen \
2308 - --enable-tools \
2309 - --enable-docs \
2310 - $(use_with system-qemu) \
2311 - $(use_enable pam) \
2312 - $(use_enable api xenapi) \
2313 - $(use_enable ovmf) \
2314 - $(use_enable ocaml ocamltools) \
2315 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
2316 - "
2317 -
2318 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
2319 - use qemu || myconf+=" --with-system-qemu"
2320 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
2321 - econf ${myconf}
2322 -}
2323 -
2324 -src_compile() {
2325 - export VARTEXFONTS="${T}/fonts"
2326 - local myopt
2327 - use debug && myopt="${myopt} debug=y"
2328 -
2329 - if test-flag-CC -fno-strict-overflow; then
2330 - append-flags -fno-strict-overflow
2331 - fi
2332 -
2333 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
2334 -
2335 - use doc && emake -C docs txt html
2336 - emake -C docs man-pages
2337 -}
2338 -
2339 -src_install() {
2340 - # Override auto-detection in the build system, bug #382573
2341 - export INITD_DIR=/tmp/init.d
2342 - export CONFIG_LEAF_DIR=../tmp/default
2343 -
2344 - # Let the build system compile installed Python modules.
2345 - local PYTHONDONTWRITEBYTECODE
2346 - export PYTHONDONTWRITEBYTECODE
2347 -
2348 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
2349 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
2350 -
2351 - # Fix the remaining Python shebangs.
2352 - python_fix_shebang "${D}"
2353 -
2354 - # Remove RedHat-specific stuff
2355 - rm -rf "${D}"tmp || die
2356 -
2357 - if use doc; then
2358 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
2359 -
2360 - dohtml -r docs/
2361 - docinto pdf
2362 - dodoc ${DOCS[@]}
2363 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
2364 - fi
2365 -
2366 - rm -rf "${D}"/usr/share/doc/xen/
2367 - doman docs/man?/*
2368 -
2369 - newconfd "${FILESDIR}"/xendomains.confd xendomains
2370 - newconfd "${FILESDIR}"/xenstored.confd xenstored
2371 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
2372 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
2373 - newinitd "${FILESDIR}"/xenstored.initd xenstored
2374 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
2375 - newinitd "${FILESDIR}"/xencommons.initd xencommons
2376 - newconfd "${FILESDIR}"/xencommons.confd xencommons
2377 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
2378 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
2379 -
2380 - if use screen; then
2381 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
2382 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
2383 - keepdir /var/log/xen-consoles
2384 - fi
2385 -
2386 - # For -static-libs wrt Bug 384355
2387 - if ! use static-libs; then
2388 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
2389 - fi
2390 -
2391 - # for xendomains
2392 - keepdir /etc/xen/auto
2393 -
2394 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
2395 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
2396 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
2397 -}
2398 -
2399 -pkg_postinst() {
2400 - elog "Official Xen Guide and the offical wiki page:"
2401 - elog "https://wiki.gentoo.org/wiki/Xen"
2402 - elog "http://wiki.xen.org/wiki/Main_Page"
2403 - elog ""
2404 - elog "Recommended to utilise the xencommons script to config sytem At boot"
2405 - elog "Add by use of rc-update on completion of the install"
2406 -
2407 - if ! use hvm; then
2408 - echo
2409 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
2410 - elog "support enable the hvm use flag."
2411 - elog "An x86 or amd64 system is required to build HVM support."
2412 - fi
2413 -
2414 - if use qemu; then
2415 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
2416 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
2417 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
2418 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
2419 - fi
2420 -}
2421
2422 diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
2423 deleted file mode 100644
2424 index 1a0afb5..0000000
2425 --- a/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
2426 +++ /dev/null
2427 @@ -1,469 +0,0 @@
2428 -# Copyright 1999-2016 Gentoo Foundation
2429 -# Distributed under the terms of the GNU General Public License v2
2430 -# $Id$
2431 -
2432 -EAPI=5
2433 -
2434 -PYTHON_COMPAT=( python2_7 )
2435 -PYTHON_REQ_USE='ncurses,xml,threads'
2436 -
2437 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
2438 -
2439 -MY_PV=${PV/_/-}
2440 -MAJOR_V="$(get_version_component_range 1-2)"
2441 -
2442 -if [[ $PV == *9999 ]]; then
2443 - inherit git-r3
2444 - KEYWORDS=""
2445 - REPO="xen.git"
2446 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
2447 - S="${WORKDIR}/${REPO}"
2448 -else
2449 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
2450 - UPSTREAM_VER=
2451 - SECURITY_VER=01
2452 - # vars set to reflect https://dev.gentoo.org/~idella4/
2453 - # first instance of UPS_VER (usptream ver)
2454 - UPS_VER=
2455 - SEC_VER=
2456 - QEMU_VER=4
2457 - # xen-tools's gentoo patches tarball
2458 - GENTOO_VER=6
2459 - # xen-tools's gentoo patches version which apply to this specific ebuild
2460 - GENTOO_GPV=0
2461 - # xen-tools ovmf's patches
2462 - OVMF_VER=2
2463 -
2464 - SEABIOS_VER=1.8.2
2465 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
2466 - OVMF_PV=20151110
2467 -
2468 - [[ -n ${UPSTREAM_VER} ]] && \
2469 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
2470 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
2471 - [[ -n ${SECURITY_VER} ]] && \
2472 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz
2473 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.gz"
2474 - [[ -n ${GENTOO_VER} ]] && \
2475 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
2476 - [[ -n ${OVMF_VER} ]] && \
2477 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
2478 -
2479 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
2480 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
2481 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
2482 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
2483 - ${OVMF_PATCHSET_URI} )
2484 - ${UPSTREAM_PATCHSET_URI}
2485 - ${SECURITY_PATCHSET_URI}
2486 - ${GENTOO_PATCHSET_URI}"
2487 -
2488 - S="${WORKDIR}/xen-${MY_PV}"
2489 -fi
2490 -
2491 -DESCRIPTION="Xen tools including QEMU and xl"
2492 -HOMEPAGE="http://xen.org/"
2493 -DOCS=( README docs/README.xen-bugtool )
2494 -
2495 -LICENSE="GPL-2"
2496 -SLOT="0/${MAJOR_V}"
2497 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
2498 -# >=dev-lang/ocaml-4 stable
2499 -# Masked in profiles/eapi-5-files instead
2500 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
2501 -
2502 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
2503 - ${PYTHON_REQUIRED_USE}
2504 - pygrub? ( python )
2505 - ovmf? ( hvm )
2506 - qemu? ( !system-qemu )"
2507 -
2508 -COMMON_DEPEND="
2509 - dev-libs/lzo:2
2510 - dev-libs/glib:2
2511 - dev-libs/yajl
2512 - dev-libs/libaio
2513 - dev-libs/libgcrypt:0
2514 - sys-libs/zlib
2515 -"
2516 -
2517 -DEPEND="${COMMON_DEPEND}
2518 - dev-python/lxml[${PYTHON_USEDEP}]
2519 - x86? ( sys-devel/dev86
2520 - sys-power/iasl )
2521 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
2522 - ${PYTHON_DEPS}
2523 - api? ( dev-libs/libxml2
2524 - net-misc/curl )
2525 - ovmf? ( $(python_gen_impl_dep sqlite) )
2526 - !amd64? ( >=sys-apps/dtc-1.4.0 )
2527 - amd64? ( sys-devel/bin86
2528 - system-seabios? ( sys-firmware/seabios )
2529 - sys-firmware/ipxe
2530 - sys-devel/dev86
2531 - sys-power/iasl )
2532 - dev-lang/perl
2533 - app-misc/pax-utils
2534 - doc? (
2535 - app-doc/doxygen
2536 - dev-python/markdown[${PYTHON_USEDEP}]
2537 - dev-tex/latex2html[png,gif]
2538 - media-gfx/graphviz
2539 - dev-tex/xcolor
2540 - media-gfx/transfig
2541 - dev-texlive/texlive-latexextra
2542 - virtual/latex-base
2543 - dev-tex/latexmk
2544 - dev-texlive/texlive-latex
2545 - dev-texlive/texlive-pictures
2546 - dev-texlive/texlive-latexrecommended
2547 - )
2548 - hvm? ( x11-proto/xproto
2549 - !net-libs/libiscsi )
2550 - qemu? (
2551 - x11-libs/pixman
2552 - sdl? ( media-libs/libsdl[X] )
2553 - )
2554 - system-qemu? ( app-emulation/qemu[xen] )
2555 - ocaml? ( dev-ml/findlib
2556 - >=dev-lang/ocaml-4 )"
2557 -
2558 -RDEPEND="${COMMON_DEPEND}
2559 - sys-apps/iproute2[-minimal]
2560 - net-misc/bridge-utils
2561 - screen? (
2562 - app-misc/screen
2563 - app-admin/logrotate
2564 - )"
2565 -
2566 -# hvmloader is used to bootstrap a fully virtualized kernel
2567 -# Approved by QA team in bug #144032
2568 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
2569 - usr/share/qemu-xen/qemu/s390-ccw.img"
2570 -
2571 -RESTRICT="test"
2572 -
2573 -pkg_setup() {
2574 - python_setup
2575 - export "CONFIG_LOMOUNT=y"
2576 -
2577 - #bug 522642, disable compile tools/tests
2578 - export "CONFIG_TESTS=n"
2579 -
2580 - if has_version dev-libs/libgcrypt:0; then
2581 - export "CONFIG_GCRYPT=y"
2582 - fi
2583 -
2584 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
2585 - if use x86 && use amd64; then
2586 - die "Confusion! Both x86 and amd64 are set in your use flags!"
2587 - elif use x86; then
2588 - export XEN_TARGET_ARCH="x86_32"
2589 - elif use amd64 ; then
2590 - export XEN_TARGET_ARCH="x86_64"
2591 - elif use arm; then
2592 - export XEN_TARGET_ARCH="arm32"
2593 - elif use arm64; then
2594 - export XEN_TARGET_ARCH="arm64"
2595 - else
2596 - die "Unsupported architecture!"
2597 - fi
2598 - fi
2599 -}
2600 -
2601 -src_prepare() {
2602 - # Upstream's patchset
2603 - if [[ -n ${UPSTREAM_VER} ]]; then
2604 - einfo "Try to apply Xen Upstream patch set"
2605 - EPATCH_SUFFIX="patch" \
2606 - EPATCH_FORCE="yes" \
2607 - EPATCH_OPTS="-p1" \
2608 - epatch "${WORKDIR}"/patches-upstream \
2609 - "${WORKDIR}"/libexec.patch
2610 - fi
2611 -
2612 - # Security patchset
2613 - if [[ -n ${SECURITY_VER} ]]; then
2614 - einfo "Try to apply Xen Security patch set"
2615 - # apply main xen patches
2616 - # Two parallel systems, both work side by side
2617 - # Over time they may concdense into one. This will suffice for now
2618 - EPATCH_SUFFIX="patch"
2619 - EPATCH_FORCE="yes"
2620 -
2621 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
2622 - epatch $i
2623 - done
2624 -
2625 - # apply qemu-xen/upstream patches
2626 - pushd "${S}"/tools/qemu-xen/ > /dev/null
2627 - for i in ${XEN_SECURITY_QEMUU}; do
2628 - epatch "${WORKDIR}"/patches-security/qemuu/$i
2629 - done
2630 -
2631 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
2632 - epatch $i
2633 - done
2634 - popd > /dev/null
2635 -
2636 - # apply qemu-traditional patches
2637 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
2638 -
2639 - for i in "${WORKDIR}"/qemu-patches/qemut/*.patch; do
2640 - epatch $i
2641 - done
2642 - popd > /dev/null
2643 - fi
2644 -
2645 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
2646 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
2647 - pushd tools/firmware/ > /dev/null
2648 - ln -s seabios-dir-remote seabios-dir || die
2649 - popd > /dev/null
2650 -
2651 - # Gentoo's patchset
2652 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
2653 - einfo "Try to apply Gentoo specific patch set"
2654 - source "${FILESDIR}"/gentoo-patches.conf
2655 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
2656 - for i in ${!_gpv}; do
2657 - EPATCH_SUFFIX="patch" \
2658 - EPATCH_FORCE="yes" \
2659 - epatch "${WORKDIR}"/patches-gentoo/$i
2660 - done
2661 - fi
2662 -
2663 - # Ovmf's patchset
2664 - if use ovmf; then
2665 - if [[ -n ${OVMF_VER} ]];then
2666 - einfo "Try to apply Ovmf patch set"
2667 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
2668 - EPATCH_SUFFIX="patch" \
2669 - EPATCH_FORCE="yes" \
2670 - EPATCH_OPTS="-p1" \
2671 - epatch "${WORKDIR}"/patches-ovmf
2672 - popd > /dev/null
2673 - fi
2674 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
2675 - fi
2676 -
2677 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
2678 -
2679 - # Fix texi2html build error with new texi2html, qemu.doc.html
2680 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
2681 -
2682 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
2683 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
2684 - -i tools/firmware/Makefile || die
2685 -
2686 - # Drop .config, fixes to gcc-4.6
2687 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
2688 -
2689 - # if the user *really* wants to use their own custom-cflags, let them
2690 - if use custom-cflags; then
2691 - einfo "User wants their own CFLAGS - removing defaults"
2692 -
2693 - # try and remove all the default cflags
2694 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
2695 - -exec sed \
2696 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
2697 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
2698 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
2699 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
2700 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
2701 - -i {} + || die "failed to re-set custom-cflags"
2702 - else
2703 - unset CFLAGS
2704 - unset LDFLAGS
2705 - unset ASFLAGS
2706 - unset CPPFLAGS
2707 - fi
2708 -
2709 - if ! use pygrub; then
2710 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
2711 - fi
2712 -
2713 - if ! use python; then
2714 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
2715 - fi
2716 -
2717 - if ! use hvm; then
2718 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
2719 - # Bug 351648
2720 - elif ! use x86 && ! has x86 $(get_all_abis); then
2721 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
2722 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
2723 - export CPATH="${WORKDIR}"/extra-headers
2724 - fi
2725 -
2726 - if use qemu; then
2727 - if use sdl; then
2728 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
2729 - tools/Makefile || die
2730 - else
2731 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
2732 - tools/qemu-xen-traditional/xen-setup || die
2733 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
2734 - tools/Makefile || die
2735 - fi
2736 - else
2737 - # Don't bother with qemu, only needed for fully virtualised guests
2738 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
2739 - fi
2740 -
2741 - # Reset bash completion dir; Bug 472438
2742 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
2743 - -i Config.mk || die
2744 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
2745 -
2746 - # xencommons, Bug #492332, sed lighter weight than patching
2747 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
2748 - -i tools/hotplug/Linux/init.d/xencommons.in || die
2749 -
2750 - # respect multilib, usr/lib/libcacard.so.0.0.0
2751 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
2752 - -i tools/qemu-xen/configure || die
2753 -
2754 - #bug 518136, don't build 32bit exactuable for nomultilib profile
2755 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
2756 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
2757 - fi
2758 -
2759 - # use /var instead of /var/lib, consistat with previous ebuild
2760 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
2761 - m4/paths.m4 configure tools/configure || die
2762 - # use /run instead of /var/run
2763 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
2764 - m4/paths.m4 configure tools/configure || die
2765 -
2766 - # uncomment lines in xl.conf
2767 - sed -e 's:^#autoballoon=:autoballoon=:' \
2768 - -e 's:^#lockfile=:lockfile=:' \
2769 - -e 's:^#vif.default.script=:vif.default.script=:' \
2770 - -i tools/examples/xl.conf || die
2771 -
2772 - # Bug #575868 converted to a sed statement, typo of one char
2773 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
2774 -
2775 - epatch_user
2776 -}
2777 -
2778 -src_configure() {
2779 - local myconf="--prefix=${PREFIX}/usr \
2780 - --libdir=${PREFIX}/usr/$(get_libdir) \
2781 - --libexecdir=${PREFIX}/usr/libexec \
2782 - --disable-werror \
2783 - --disable-xen \
2784 - --enable-tools \
2785 - --enable-docs \
2786 - $(use_with system-qemu) \
2787 - $(use_enable pam) \
2788 - $(use_enable api xenapi) \
2789 - $(use_enable ovmf) \
2790 - $(use_enable ocaml ocamltools) \
2791 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
2792 - "
2793 -
2794 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
2795 - use qemu || myconf+=" --with-system-qemu"
2796 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
2797 - econf ${myconf}
2798 -}
2799 -
2800 -src_compile() {
2801 - export VARTEXFONTS="${T}/fonts"
2802 - local myopt
2803 - use debug && myopt="${myopt} debug=y"
2804 -
2805 - if test-flag-CC -fno-strict-overflow; then
2806 - append-flags -fno-strict-overflow
2807 - fi
2808 -
2809 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
2810 -
2811 - use doc && emake -C docs txt html
2812 - emake -C docs man-pages
2813 -}
2814 -
2815 -src_install() {
2816 - # Override auto-detection in the build system, bug #382573
2817 - export INITD_DIR=/tmp/init.d
2818 - export CONFIG_LEAF_DIR=../tmp/default
2819 -
2820 - # Let the build system compile installed Python modules.
2821 - local PYTHONDONTWRITEBYTECODE
2822 - export PYTHONDONTWRITEBYTECODE
2823 -
2824 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
2825 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
2826 -
2827 - # Fix the remaining Python shebangs.
2828 - python_fix_shebang "${D}"
2829 -
2830 - # Remove RedHat-specific stuff
2831 - rm -rf "${D}"tmp || die
2832 -
2833 - if use doc; then
2834 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
2835 -
2836 - dohtml -r docs/
2837 - docinto pdf
2838 - dodoc ${DOCS[@]}
2839 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
2840 - fi
2841 -
2842 - rm -rf "${D}"/usr/share/doc/xen/
2843 - doman docs/man?/*
2844 -
2845 - newconfd "${FILESDIR}"/xendomains.confd xendomains
2846 - newconfd "${FILESDIR}"/xenstored.confd xenstored
2847 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
2848 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
2849 - newinitd "${FILESDIR}"/xenstored.initd xenstored
2850 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
2851 - newinitd "${FILESDIR}"/xencommons.initd xencommons
2852 - newconfd "${FILESDIR}"/xencommons.confd xencommons
2853 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
2854 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
2855 -
2856 - if use screen; then
2857 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
2858 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
2859 - keepdir /var/log/xen-consoles
2860 - fi
2861 -
2862 - # For -static-libs wrt Bug 384355
2863 - if ! use static-libs; then
2864 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
2865 - fi
2866 -
2867 - # for xendomains
2868 - keepdir /etc/xen/auto
2869 -
2870 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
2871 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
2872 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
2873 -}
2874 -
2875 -pkg_postinst() {
2876 - elog "Official Xen Guide and the offical wiki page:"
2877 - elog "https://wiki.gentoo.org/wiki/Xen"
2878 - elog "http://wiki.xen.org/wiki/Main_Page"
2879 - elog ""
2880 - elog "Recommended to utilise the xencommons script to config sytem At boot"
2881 - elog "Add by use of rc-update on completion of the install"
2882 -
2883 - if ! use hvm; then
2884 - echo
2885 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
2886 - elog "support enable the hvm use flag."
2887 - elog "An x86 or amd64 system is required to build HVM support."
2888 - fi
2889 -
2890 - if use qemu; then
2891 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
2892 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
2893 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
2894 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
2895 - fi
2896 -}
2897
2898 diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
2899 deleted file mode 100644
2900 index 0b7d40f..0000000
2901 --- a/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
2902 +++ /dev/null
2903 @@ -1,458 +0,0 @@
2904 -# Copyright 1999-2016 Gentoo Foundation
2905 -# Distributed under the terms of the GNU General Public License v2
2906 -# $Id$
2907 -
2908 -EAPI=5
2909 -
2910 -PYTHON_COMPAT=( python2_7 )
2911 -PYTHON_REQ_USE='ncurses,xml,threads'
2912 -
2913 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
2914 -
2915 -MY_PV=${PV/_/-}
2916 -MAJOR_V="$(get_version_component_range 1-2)"
2917 -
2918 -if [[ $PV == *9999 ]]; then
2919 - inherit git-r3
2920 - KEYWORDS=""
2921 - REPO="xen.git"
2922 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
2923 - S="${WORKDIR}/${REPO}"
2924 -else
2925 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
2926 - UPSTREAM_VER=0
2927 - SECURITY_VER=12
2928 - # xen-tools's gentoo patches tarball
2929 - GENTOO_VER=6
2930 - # xen-tools's gentoo patches version which apply to this specific ebuild
2931 - GENTOO_GPV=0
2932 - # xen-tools ovmf's patches
2933 - OVMF_VER=2
2934 -
2935 - SEABIOS_VER=1.8.2
2936 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
2937 - OVMF_PV=20151110
2938 -
2939 - [[ -n ${UPSTREAM_VER} ]] && \
2940 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
2941 - [[ -n ${SECURITY_VER} ]] && \
2942 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
2943 - [[ -n ${GENTOO_VER} ]] && \
2944 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
2945 - [[ -n ${OVMF_VER} ]] && \
2946 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
2947 -
2948 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
2949 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
2950 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
2951 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
2952 - ${OVMF_PATCHSET_URI} )
2953 - ${UPSTREAM_PATCHSET_URI}
2954 - ${SECURITY_PATCHSET_URI}
2955 - ${GENTOO_PATCHSET_URI}"
2956 -
2957 - S="${WORKDIR}/xen-${MY_PV}"
2958 -fi
2959 -
2960 -DESCRIPTION="Xen tools including QEMU and xl"
2961 -HOMEPAGE="http://xen.org/"
2962 -DOCS=( README docs/README.xen-bugtool )
2963 -
2964 -LICENSE="GPL-2"
2965 -SLOT="0/${MAJOR_V}"
2966 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
2967 -# >=dev-lang/ocaml-4 stable
2968 -# Masked in profiles/eapi-5-files instead
2969 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
2970 -
2971 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
2972 - ${PYTHON_REQUIRED_USE}
2973 - pygrub? ( python )
2974 - ovmf? ( hvm )
2975 - qemu? ( !system-qemu )"
2976 -
2977 -COMMON_DEPEND="
2978 - dev-libs/lzo:2
2979 - dev-libs/glib:2
2980 - dev-libs/yajl
2981 - dev-libs/libaio
2982 - dev-libs/libgcrypt:0
2983 - sys-libs/zlib
2984 -"
2985 -
2986 -DEPEND="${COMMON_DEPEND}
2987 - dev-python/lxml[${PYTHON_USEDEP}]
2988 - x86? ( sys-devel/dev86
2989 - sys-power/iasl )
2990 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
2991 - ${PYTHON_DEPS}
2992 - api? ( dev-libs/libxml2
2993 - net-misc/curl )
2994 - ovmf? ( $(python_gen_impl_dep sqlite) )
2995 - !amd64? ( >=sys-apps/dtc-1.4.0 )
2996 - amd64? ( sys-devel/bin86
2997 - system-seabios? ( sys-firmware/seabios )
2998 - sys-firmware/ipxe
2999 - sys-devel/dev86
3000 - sys-power/iasl )
3001 - dev-lang/perl
3002 - app-misc/pax-utils
3003 - doc? (
3004 - app-doc/doxygen
3005 - dev-python/markdown[${PYTHON_USEDEP}]
3006 - dev-tex/latex2html[png,gif]
3007 - media-gfx/graphviz
3008 - dev-tex/xcolor
3009 - media-gfx/transfig
3010 - dev-texlive/texlive-latexextra
3011 - virtual/latex-base
3012 - dev-tex/latexmk
3013 - dev-texlive/texlive-latex
3014 - dev-texlive/texlive-pictures
3015 - dev-texlive/texlive-latexrecommended
3016 - )
3017 - hvm? ( x11-proto/xproto
3018 - !net-libs/libiscsi )
3019 - qemu? (
3020 - x11-libs/pixman
3021 - sdl? ( media-libs/libsdl[X] )
3022 - )
3023 - system-qemu? ( app-emulation/qemu[xen] )
3024 - ocaml? ( dev-ml/findlib
3025 - >=dev-lang/ocaml-4 )"
3026 -
3027 -RDEPEND="${COMMON_DEPEND}
3028 - sys-apps/iproute2[-minimal]
3029 - net-misc/bridge-utils
3030 - screen? (
3031 - app-misc/screen
3032 - app-admin/logrotate
3033 - )"
3034 -
3035 -# hvmloader is used to bootstrap a fully virtualized kernel
3036 -# Approved by QA team in bug #144032
3037 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
3038 - usr/share/qemu-xen/qemu/s390-ccw.img"
3039 -
3040 -RESTRICT="test"
3041 -
3042 -pkg_setup() {
3043 - python_setup
3044 - export "CONFIG_LOMOUNT=y"
3045 -
3046 - #bug 522642, disable compile tools/tests
3047 - export "CONFIG_TESTS=n"
3048 -
3049 - if has_version dev-libs/libgcrypt:0; then
3050 - export "CONFIG_GCRYPT=y"
3051 - fi
3052 -
3053 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
3054 - if use x86 && use amd64; then
3055 - die "Confusion! Both x86 and amd64 are set in your use flags!"
3056 - elif use x86; then
3057 - export XEN_TARGET_ARCH="x86_32"
3058 - elif use amd64 ; then
3059 - export XEN_TARGET_ARCH="x86_64"
3060 - elif use arm; then
3061 - export XEN_TARGET_ARCH="arm32"
3062 - elif use arm64; then
3063 - export XEN_TARGET_ARCH="arm64"
3064 - else
3065 - die "Unsupported architecture!"
3066 - fi
3067 - fi
3068 -}
3069 -
3070 -src_prepare() {
3071 - # Upstream's patchset
3072 - if [[ -n ${UPSTREAM_VER} ]]; then
3073 - einfo "Try to apply Xen Upstream patch set"
3074 - EPATCH_SUFFIX="patch" \
3075 - EPATCH_FORCE="yes" \
3076 - EPATCH_OPTS="-p1" \
3077 - epatch "${WORKDIR}"/patches-upstream
3078 - fi
3079 -
3080 - # Security patchset
3081 - if [[ -n ${SECURITY_VER} ]]; then
3082 - einfo "Try to apply Xen Security patch set"
3083 - # apply main xen patches
3084 - # Two parallel systems, both work side by side
3085 - # Over time they may concdense into one. This will suffice for now
3086 - EPATCH_SUFFIX="patch"
3087 - EPATCH_FORCE="yes"
3088 -
3089 - source "${WORKDIR}"/patches-security/${PV}.conf
3090 -
3091 - for i in ${XEN_SECURITY_MAIN}; do
3092 - epatch "${WORKDIR}"/patches-security/xen/$i
3093 - done
3094 -
3095 - # apply qemu-xen/upstream patches
3096 - pushd "${S}"/tools/qemu-xen/ > /dev/null
3097 - for i in ${XEN_SECURITY_QEMUU}; do
3098 - epatch "${WORKDIR}"/patches-security/qemuu/$i
3099 - done
3100 - popd > /dev/null
3101 -
3102 - # apply qemu-traditional patches
3103 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
3104 - for i in ${XEN_SECURITY_QEMUT}; do
3105 - epatch "${WORKDIR}"/patches-security/qemut/$i
3106 - done
3107 - popd > /dev/null
3108 - fi
3109 -
3110 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
3111 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
3112 - pushd tools/firmware/ > /dev/null
3113 - ln -s seabios-dir-remote seabios-dir || die
3114 - popd > /dev/null
3115 -
3116 - # Gentoo's patchset
3117 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
3118 - einfo "Try to apply Gentoo specific patch set"
3119 - source "${FILESDIR}"/gentoo-patches.conf
3120 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
3121 - for i in ${!_gpv}; do
3122 - EPATCH_SUFFIX="patch" \
3123 - EPATCH_FORCE="yes" \
3124 - epatch "${WORKDIR}"/patches-gentoo/$i
3125 - done
3126 - fi
3127 -
3128 - # Ovmf's patchset
3129 - if use ovmf; then
3130 - if [[ -n ${OVMF_VER} ]];then
3131 - einfo "Try to apply Ovmf patch set"
3132 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
3133 - EPATCH_SUFFIX="patch" \
3134 - EPATCH_FORCE="yes" \
3135 - EPATCH_OPTS="-p1" \
3136 - epatch "${WORKDIR}"/patches-ovmf
3137 - popd > /dev/null
3138 - fi
3139 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
3140 - fi
3141 -
3142 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
3143 -
3144 - # Fix texi2html build error with new texi2html, qemu.doc.html
3145 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
3146 -
3147 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
3148 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
3149 - -i tools/firmware/Makefile || die
3150 -
3151 - # Drop .config, fixes to gcc-4.6
3152 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
3153 -
3154 - # if the user *really* wants to use their own custom-cflags, let them
3155 - if use custom-cflags; then
3156 - einfo "User wants their own CFLAGS - removing defaults"
3157 -
3158 - # try and remove all the default cflags
3159 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
3160 - -exec sed \
3161 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
3162 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
3163 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
3164 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
3165 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
3166 - -i {} + || die "failed to re-set custom-cflags"
3167 - else
3168 - unset CFLAGS
3169 - unset LDFLAGS
3170 - unset ASFLAGS
3171 - unset CPPFLAGS
3172 - fi
3173 -
3174 - if ! use pygrub; then
3175 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
3176 - fi
3177 -
3178 - if ! use python; then
3179 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
3180 - fi
3181 -
3182 - if ! use hvm; then
3183 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
3184 - # Bug 351648
3185 - elif ! use x86 && ! has x86 $(get_all_abis); then
3186 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
3187 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
3188 - export CPATH="${WORKDIR}"/extra-headers
3189 - fi
3190 -
3191 - if use qemu; then
3192 - if use sdl; then
3193 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
3194 - tools/Makefile || die
3195 - else
3196 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
3197 - tools/qemu-xen-traditional/xen-setup || die
3198 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
3199 - tools/Makefile || die
3200 - fi
3201 - else
3202 - # Don't bother with qemu, only needed for fully virtualised guests
3203 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
3204 - fi
3205 -
3206 - # Reset bash completion dir; Bug 472438
3207 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
3208 - -i Config.mk || die
3209 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
3210 -
3211 - # xencommons, Bug #492332, sed lighter weight than patching
3212 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
3213 - -i tools/hotplug/Linux/init.d/xencommons.in || die
3214 -
3215 - # respect multilib, usr/lib/libcacard.so.0.0.0
3216 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
3217 - -i tools/qemu-xen/configure || die
3218 -
3219 - #bug 518136, don't build 32bit exactuable for nomultilib profile
3220 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
3221 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
3222 - fi
3223 -
3224 - # use /var instead of /var/lib, consistat with previous ebuild
3225 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
3226 - m4/paths.m4 configure tools/configure || die
3227 - # use /run instead of /var/run
3228 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
3229 - m4/paths.m4 configure tools/configure || die
3230 -
3231 - # uncomment lines in xl.conf
3232 - sed -e 's:^#autoballoon=:autoballoon=:' \
3233 - -e 's:^#lockfile=:lockfile=:' \
3234 - -e 's:^#vif.default.script=:vif.default.script=:' \
3235 - -i tools/examples/xl.conf || die
3236 -
3237 - # Bug #575868 converted to a sed statement, typo of one char
3238 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
3239 -
3240 - epatch_user
3241 -}
3242 -
3243 -src_configure() {
3244 - local myconf="--prefix=${PREFIX}/usr \
3245 - --libdir=${PREFIX}/usr/$(get_libdir) \
3246 - --libexecdir=${PREFIX}/usr/libexec \
3247 - --disable-werror \
3248 - --disable-xen \
3249 - --enable-tools \
3250 - --enable-docs \
3251 - $(use_with system-qemu) \
3252 - $(use_enable pam) \
3253 - $(use_enable api xenapi) \
3254 - $(use_enable ovmf) \
3255 - $(use_enable ocaml ocamltools) \
3256 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
3257 - "
3258 -
3259 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
3260 - use qemu || myconf+=" --with-system-qemu"
3261 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
3262 - econf ${myconf}
3263 -}
3264 -
3265 -src_compile() {
3266 - export VARTEXFONTS="${T}/fonts"
3267 - local myopt
3268 - use debug && myopt="${myopt} debug=y"
3269 -
3270 - if test-flag-CC -fno-strict-overflow; then
3271 - append-flags -fno-strict-overflow
3272 - fi
3273 -
3274 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
3275 -
3276 - use doc && emake -C docs txt html
3277 - emake -C docs man-pages
3278 -}
3279 -
3280 -src_install() {
3281 - # Override auto-detection in the build system, bug #382573
3282 - export INITD_DIR=/tmp/init.d
3283 - export CONFIG_LEAF_DIR=../tmp/default
3284 -
3285 - # Let the build system compile installed Python modules.
3286 - local PYTHONDONTWRITEBYTECODE
3287 - export PYTHONDONTWRITEBYTECODE
3288 -
3289 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
3290 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
3291 -
3292 - # Fix the remaining Python shebangs.
3293 - python_fix_shebang "${D}"
3294 -
3295 - # Remove RedHat-specific stuff
3296 - rm -rf "${D}"tmp || die
3297 -
3298 - if use doc; then
3299 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
3300 -
3301 - dohtml -r docs/
3302 - docinto pdf
3303 - dodoc ${DOCS[@]}
3304 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
3305 - fi
3306 -
3307 - rm -rf "${D}"/usr/share/doc/xen/
3308 - doman docs/man?/*
3309 -
3310 - newconfd "${FILESDIR}"/xendomains.confd xendomains
3311 - newconfd "${FILESDIR}"/xenstored.confd xenstored
3312 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
3313 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
3314 - newinitd "${FILESDIR}"/xenstored.initd xenstored
3315 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
3316 - newinitd "${FILESDIR}"/xencommons.initd xencommons
3317 - newconfd "${FILESDIR}"/xencommons.confd xencommons
3318 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
3319 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
3320 -
3321 - if use screen; then
3322 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
3323 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
3324 - keepdir /var/log/xen-consoles
3325 - fi
3326 -
3327 - # For -static-libs wrt Bug 384355
3328 - if ! use static-libs; then
3329 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
3330 - fi
3331 -
3332 - # for xendomains
3333 - keepdir /etc/xen/auto
3334 -
3335 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
3336 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
3337 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
3338 -}
3339 -
3340 -pkg_postinst() {
3341 - elog "Official Xen Guide and the offical wiki page:"
3342 - elog "https://wiki.gentoo.org/wiki/Xen"
3343 - elog "http://wiki.xen.org/wiki/Main_Page"
3344 - elog ""
3345 - elog "Recommended to utilise the xencommons script to config sytem At boot"
3346 - elog "Add by use of rc-update on completion of the install"
3347 -
3348 - if ! use hvm; then
3349 - echo
3350 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
3351 - elog "support enable the hvm use flag."
3352 - elog "An x86 or amd64 system is required to build HVM support."
3353 - fi
3354 -
3355 - if use qemu; then
3356 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
3357 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
3358 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
3359 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
3360 - fi
3361 -}
3362
3363 diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
3364 deleted file mode 100644
3365 index a63bbda..0000000
3366 --- a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
3367 +++ /dev/null
3368 @@ -1,475 +0,0 @@
3369 -# Copyright 1999-2016 Gentoo Foundation
3370 -# Distributed under the terms of the GNU General Public License v2
3371 -# $Id$
3372 -
3373 -EAPI=5
3374 -
3375 -PYTHON_COMPAT=( python2_7 )
3376 -PYTHON_REQ_USE='ncurses,xml,threads'
3377 -
3378 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
3379 -
3380 -MY_PV=${PV/_/-}
3381 -MAJOR_V="$(get_version_component_range 1-2)"
3382 -
3383 -if [[ $PV == *9999 ]]; then
3384 - inherit git-r3
3385 - KEYWORDS=""
3386 - REPO="xen.git"
3387 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
3388 - S="${WORKDIR}/${REPO}"
3389 -else
3390 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
3391 - UPSTREAM_VER=
3392 - SECURITY_VER=
3393 - # vars set to reflect https://dev.gentoo.org/~idella4/
3394 - # first instance of UPS_VER (usptream ver)
3395 - UPS_VER=
3396 - SEC_VER=
3397 - QEMU_VER=
3398 - # xen-tools's gentoo patches tarball
3399 - GENTOO_VER=6
3400 - # xen-tools's gentoo patches version which apply to this specific ebuild
3401 - GENTOO_GPV=0
3402 - # xen-tools ovmf's patches
3403 - OVMF_VER=2
3404 -
3405 - SEABIOS_VER=1.8.2
3406 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
3407 - OVMF_PV=20151110
3408 -
3409 - [[ -n ${UPSTREAM_VER} ]] && \
3410 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
3411 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
3412 - [[ -n ${SECURITY_VER} ]] && \
3413 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
3414 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
3415 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
3416 - [[ -n ${GENTOO_VER} ]] && \
3417 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
3418 - [[ -n ${OVMF_VER} ]] && \
3419 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
3420 -
3421 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
3422 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
3423 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
3424 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
3425 - ${OVMF_PATCHSET_URI} )
3426 - ${UPSTREAM_PATCHSET_URI}
3427 - ${SECURITY_PATCHSET_URI}
3428 - ${GENTOO_PATCHSET_URI}"
3429 -
3430 - S="${WORKDIR}/xen-${MY_PV}"
3431 -fi
3432 -
3433 -DESCRIPTION="Xen tools including QEMU and xl"
3434 -HOMEPAGE="http://xen.org/"
3435 -DOCS=( README docs/README.xen-bugtool )
3436 -
3437 -LICENSE="GPL-2"
3438 -SLOT="0/${MAJOR_V}"
3439 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
3440 -# >=dev-lang/ocaml-4 stable
3441 -# Masked in profiles/eapi-5-files instead
3442 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
3443 -
3444 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
3445 - ${PYTHON_REQUIRED_USE}
3446 - pygrub? ( python )
3447 - ovmf? ( hvm )
3448 - qemu? ( !system-qemu )"
3449 -
3450 -COMMON_DEPEND="
3451 - dev-libs/lzo:2
3452 - dev-libs/glib:2
3453 - dev-libs/yajl
3454 - dev-libs/libaio
3455 - dev-libs/libgcrypt:0
3456 - sys-libs/zlib
3457 -"
3458 -
3459 -DEPEND="${COMMON_DEPEND}
3460 - dev-python/lxml[${PYTHON_USEDEP}]
3461 - x86? ( sys-devel/dev86
3462 - sys-power/iasl )
3463 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
3464 - ${PYTHON_DEPS}
3465 - api? ( dev-libs/libxml2
3466 - net-misc/curl )
3467 - ovmf? ( $(python_gen_impl_dep sqlite) )
3468 - !amd64? ( >=sys-apps/dtc-1.4.0 )
3469 - amd64? ( sys-devel/bin86
3470 - system-seabios? ( sys-firmware/seabios )
3471 - sys-firmware/ipxe
3472 - sys-devel/dev86
3473 - sys-power/iasl )
3474 - dev-lang/perl
3475 - app-misc/pax-utils
3476 - doc? (
3477 - app-doc/doxygen
3478 - dev-python/markdown[${PYTHON_USEDEP}]
3479 - dev-tex/latex2html[png,gif]
3480 - media-gfx/graphviz
3481 - dev-tex/xcolor
3482 - media-gfx/transfig
3483 - dev-texlive/texlive-latexextra
3484 - virtual/latex-base
3485 - dev-tex/latexmk
3486 - dev-texlive/texlive-latex
3487 - dev-texlive/texlive-pictures
3488 - dev-texlive/texlive-latexrecommended
3489 - )
3490 - hvm? ( x11-proto/xproto
3491 - !net-libs/libiscsi )
3492 - qemu? (
3493 - x11-libs/pixman
3494 - sdl? ( media-libs/libsdl[X] )
3495 - )
3496 - system-qemu? ( app-emulation/qemu[xen] )
3497 - ocaml? ( dev-ml/findlib
3498 - >=dev-lang/ocaml-4 )"
3499 -
3500 -RDEPEND="${COMMON_DEPEND}
3501 - sys-apps/iproute2[-minimal]
3502 - net-misc/bridge-utils
3503 - screen? (
3504 - app-misc/screen
3505 - app-admin/logrotate
3506 - )"
3507 -
3508 -# hvmloader is used to bootstrap a fully virtualized kernel
3509 -# Approved by QA team in bug #144032
3510 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
3511 - usr/share/qemu-xen/qemu/s390-ccw.img"
3512 -
3513 -RESTRICT="test"
3514 -
3515 -pkg_setup() {
3516 - python-single-r1_pkg_setup
3517 - export "CONFIG_LOMOUNT=y"
3518 -
3519 - #bug 522642, disable compile tools/tests
3520 - export "CONFIG_TESTS=n"
3521 -
3522 - if has_version dev-libs/libgcrypt:0; then
3523 - export "CONFIG_GCRYPT=y"
3524 - fi
3525 -
3526 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
3527 - if use x86 && use amd64; then
3528 - die "Confusion! Both x86 and amd64 are set in your use flags!"
3529 - elif use x86; then
3530 - export XEN_TARGET_ARCH="x86_32"
3531 - elif use amd64 ; then
3532 - export XEN_TARGET_ARCH="x86_64"
3533 - elif use arm; then
3534 - export XEN_TARGET_ARCH="arm32"
3535 - elif use arm64; then
3536 - export XEN_TARGET_ARCH="arm64"
3537 - else
3538 - die "Unsupported architecture!"
3539 - fi
3540 - fi
3541 -}
3542 -
3543 -src_prepare() {
3544 - # Upstream's patchset
3545 - if [[ -n ${UPSTREAM_VER} ]]; then
3546 - einfo "Try to apply Xen Upstream patch set"
3547 - EPATCH_SUFFIX="patch" \
3548 - EPATCH_FORCE="yes" \
3549 - EPATCH_OPTS="-p1" \
3550 - epatch "${WORKDIR}"/patches-upstream \
3551 - "${WORKDIR}"/libexec.patch
3552 - fi
3553 -
3554 - # Security patchset
3555 - if [[ -n ${SECURITY_VER} ]]; then
3556 - einfo "Try to apply Xen Security patch set"
3557 - source "${WORKDIR}"/patches-security/${PV}.conf
3558 - # apply main xen patches
3559 - # Two parallel systems, both work side by side
3560 - # Over time they may concdense into one. This will suffice for now
3561 - EPATCH_SUFFIX="patch"
3562 - EPATCH_FORCE="yes"
3563 - for i in ${XEN_SECURITY_MAIN}; do
3564 - epatch "${WORKDIR}"/patches-security/xen/$i
3565 - done
3566 -
3567 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
3568 - epatch $i
3569 - done
3570 -
3571 - # apply qemu-traditional patches
3572 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
3573 - for i in ${XEN_SECURITY_QEMUT}; do
3574 - epatch "${WORKDIR}"/patches-security/qemut/$i
3575 - done
3576 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
3577 - epatch $i
3578 - done
3579 - popd > /dev/null
3580 -
3581 - # apply qemu-xen/upstream patches
3582 - pushd "${S}"/tools/qemu-xen/ > /dev/null
3583 - for i in ${XEN_SECURITY_QEMUU}; do
3584 - epatch "${WORKDIR}"/patches-security/qemuu/$i
3585 - done
3586 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
3587 - epatch $i
3588 - done
3589 - popd > /dev/null
3590 - fi
3591 -
3592 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
3593 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
3594 - pushd tools/firmware/ > /dev/null
3595 - ln -s seabios-dir-remote seabios-dir || die
3596 - popd > /dev/null
3597 -
3598 - # Gentoo's patchset
3599 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
3600 - einfo "Try to apply Gentoo specific patch set"
3601 - source "${FILESDIR}"/gentoo-patches.conf
3602 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
3603 - for i in ${!_gpv}; do
3604 - EPATCH_SUFFIX="patch" \
3605 - EPATCH_FORCE="yes" \
3606 - epatch "${WORKDIR}"/patches-gentoo/$i
3607 - done
3608 - fi
3609 -
3610 - # Ovmf's patchset
3611 - if use ovmf; then
3612 - if [[ -n ${OVMF_VER} ]];then
3613 - einfo "Try to apply Ovmf patch set"
3614 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
3615 - EPATCH_SUFFIX="patch" \
3616 - EPATCH_FORCE="yes" \
3617 - EPATCH_OPTS="-p1" \
3618 - epatch "${WORKDIR}"/patches-ovmf
3619 - popd > /dev/null
3620 - fi
3621 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
3622 - fi
3623 -
3624 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
3625 -
3626 - # Fix texi2html build error with new texi2html, qemu.doc.html
3627 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
3628 -
3629 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
3630 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
3631 - -i tools/firmware/Makefile || die
3632 -
3633 - # Drop .config, fixes to gcc-4.6
3634 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
3635 -
3636 - # if the user *really* wants to use their own custom-cflags, let them
3637 - if use custom-cflags; then
3638 - einfo "User wants their own CFLAGS - removing defaults"
3639 -
3640 - # try and remove all the default cflags
3641 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
3642 - -exec sed \
3643 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
3644 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
3645 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
3646 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
3647 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
3648 - -i {} + || die "failed to re-set custom-cflags"
3649 - else
3650 - unset CFLAGS
3651 - unset LDFLAGS
3652 - unset ASFLAGS
3653 - unset CPPFLAGS
3654 - fi
3655 -
3656 - if ! use pygrub; then
3657 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
3658 - fi
3659 -
3660 - if ! use python; then
3661 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
3662 - fi
3663 -
3664 - if ! use hvm; then
3665 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
3666 - # Bug 351648
3667 - elif ! use x86 && ! has x86 $(get_all_abis); then
3668 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
3669 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
3670 - export CPATH="${WORKDIR}"/extra-headers
3671 - fi
3672 -
3673 - if use qemu; then
3674 - if use sdl; then
3675 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
3676 - tools/Makefile || die
3677 - else
3678 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
3679 - tools/qemu-xen-traditional/xen-setup || die
3680 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
3681 - tools/Makefile || die
3682 - fi
3683 - else
3684 - # Don't bother with qemu, only needed for fully virtualised guests
3685 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
3686 - fi
3687 -
3688 - # Reset bash completion dir; Bug 472438
3689 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
3690 - -i Config.mk || die
3691 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
3692 -
3693 - # xencommons, Bug #492332, sed lighter weight than patching
3694 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
3695 - -i tools/hotplug/Linux/init.d/xencommons.in || die
3696 -
3697 - # respect multilib, usr/lib/libcacard.so.0.0.0
3698 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
3699 - -i tools/qemu-xen/configure || die
3700 -
3701 - #bug 518136, don't build 32bit exactuable for nomultilib profile
3702 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
3703 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
3704 - fi
3705 -
3706 - # use /var instead of /var/lib, consistat with previous ebuild
3707 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
3708 - m4/paths.m4 configure tools/configure || die
3709 - # use /run instead of /var/run
3710 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
3711 - m4/paths.m4 configure tools/configure || die
3712 -
3713 - # uncomment lines in xl.conf
3714 - sed -e 's:^#autoballoon=:autoballoon=:' \
3715 - -e 's:^#lockfile=:lockfile=:' \
3716 - -e 's:^#vif.default.script=:vif.default.script=:' \
3717 - -i tools/examples/xl.conf || die
3718 -
3719 - # Bug #575868 converted to a sed statement, typo of one char
3720 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
3721 -
3722 - epatch_user
3723 -}
3724 -
3725 -src_configure() {
3726 - local myconf="--prefix=${PREFIX}/usr \
3727 - --libdir=${PREFIX}/usr/$(get_libdir) \
3728 - --libexecdir=${PREFIX}/usr/libexec \
3729 - --disable-werror \
3730 - --disable-xen \
3731 - --enable-tools \
3732 - --enable-docs \
3733 - $(use_with system-qemu) \
3734 - $(use_enable pam) \
3735 - $(use_enable api xenapi) \
3736 - $(use_enable ovmf) \
3737 - $(use_enable ocaml ocamltools) \
3738 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
3739 - "
3740 -
3741 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
3742 - use qemu || myconf+=" --with-system-qemu"
3743 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
3744 - econf ${myconf}
3745 -}
3746 -
3747 -src_compile() {
3748 - export VARTEXFONTS="${T}/fonts"
3749 - local myopt
3750 - use debug && myopt="${myopt} debug=y"
3751 -
3752 - if test-flag-CC -fno-strict-overflow; then
3753 - append-flags -fno-strict-overflow
3754 - fi
3755 -
3756 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
3757 -
3758 - use doc && emake -C docs txt html
3759 - emake -C docs man-pages
3760 -}
3761 -
3762 -src_install() {
3763 - # Override auto-detection in the build system, bug #382573
3764 - export INITD_DIR=/tmp/init.d
3765 - export CONFIG_LEAF_DIR=../tmp/default
3766 -
3767 - # Let the build system compile installed Python modules.
3768 - local PYTHONDONTWRITEBYTECODE
3769 - export PYTHONDONTWRITEBYTECODE
3770 -
3771 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
3772 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
3773 -
3774 - # Fix the remaining Python shebangs.
3775 - python_fix_shebang "${D}"
3776 -
3777 - # Remove RedHat-specific stuff
3778 - rm -rf "${D}"tmp || die
3779 -
3780 - if use doc; then
3781 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
3782 -
3783 - dohtml -r docs/
3784 - docinto pdf
3785 - dodoc ${DOCS[@]}
3786 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
3787 - fi
3788 -
3789 - rm -rf "${D}"/usr/share/doc/xen/
3790 - doman docs/man?/*
3791 -
3792 - newconfd "${FILESDIR}"/xendomains.confd xendomains
3793 - newconfd "${FILESDIR}"/xenstored.confd xenstored
3794 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
3795 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
3796 - newinitd "${FILESDIR}"/xenstored.initd xenstored
3797 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
3798 - newinitd "${FILESDIR}"/xencommons.initd xencommons
3799 - newconfd "${FILESDIR}"/xencommons.confd xencommons
3800 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
3801 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
3802 -
3803 - if use screen; then
3804 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
3805 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
3806 - keepdir /var/log/xen-consoles
3807 - fi
3808 -
3809 - # For -static-libs wrt Bug 384355
3810 - if ! use static-libs; then
3811 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
3812 - fi
3813 -
3814 - # for xendomains
3815 - keepdir /etc/xen/auto
3816 -
3817 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
3818 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
3819 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
3820 -}
3821 -
3822 -pkg_postinst() {
3823 - elog "Official Xen Guide and the offical wiki page:"
3824 - elog "https://wiki.gentoo.org/wiki/Xen"
3825 - elog "http://wiki.xen.org/wiki/Main_Page"
3826 - elog ""
3827 - elog "Recommended to utilise the xencommons script to config sytem At boot"
3828 - elog "Add by use of rc-update on completion of the install"
3829 -
3830 - if ! use hvm; then
3831 - echo
3832 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
3833 - elog "support enable the hvm use flag."
3834 - elog "An x86 or amd64 system is required to build HVM support."
3835 - fi
3836 -
3837 - if use qemu; then
3838 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
3839 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
3840 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
3841 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
3842 - fi
3843 -}
3844
3845 diff --git a/app-emulation/xen-tools/xen-tools-4.6.3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3.ebuild
3846 deleted file mode 100644
3847 index 62d7661..0000000
3848 --- a/app-emulation/xen-tools/xen-tools-4.6.3.ebuild
3849 +++ /dev/null
3850 @@ -1,458 +0,0 @@
3851 -# Copyright 1999-2016 Gentoo Foundation
3852 -# Distributed under the terms of the GNU General Public License v2
3853 -# $Id$
3854 -
3855 -EAPI=5
3856 -
3857 -PYTHON_COMPAT=( python2_7 )
3858 -PYTHON_REQ_USE='ncurses,xml,threads'
3859 -
3860 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
3861 -
3862 -MY_PV=${PV/_/-}
3863 -MAJOR_V="$(get_version_component_range 1-2)"
3864 -
3865 -if [[ $PV == *9999 ]]; then
3866 - inherit git-r3
3867 - KEYWORDS=""
3868 - REPO="xen.git"
3869 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
3870 - S="${WORKDIR}/${REPO}"
3871 -else
3872 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
3873 - UPSTREAM_VER=
3874 - SECURITY_VER=
3875 - # xen-tools's gentoo patches tarball
3876 - GENTOO_VER=6
3877 - # xen-tools's gentoo patches version which apply to this specific ebuild
3878 - GENTOO_GPV=0
3879 - # xen-tools ovmf's patches
3880 - OVMF_VER=2
3881 -
3882 - SEABIOS_VER=1.8.2
3883 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
3884 - OVMF_PV=20151110
3885 -
3886 - [[ -n ${UPSTREAM_VER} ]] && \
3887 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
3888 - [[ -n ${SECURITY_VER} ]] && \
3889 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
3890 - [[ -n ${GENTOO_VER} ]] && \
3891 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
3892 - [[ -n ${OVMF_VER} ]] && \
3893 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
3894 -
3895 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
3896 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
3897 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
3898 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
3899 - ${OVMF_PATCHSET_URI} )
3900 - ${UPSTREAM_PATCHSET_URI}
3901 - ${SECURITY_PATCHSET_URI}
3902 - ${GENTOO_PATCHSET_URI}"
3903 -
3904 - S="${WORKDIR}/xen-${MY_PV}"
3905 -fi
3906 -
3907 -DESCRIPTION="Xen tools including QEMU and xl"
3908 -HOMEPAGE="http://xen.org/"
3909 -DOCS=( README docs/README.xen-bugtool )
3910 -
3911 -LICENSE="GPL-2"
3912 -SLOT="0/${MAJOR_V}"
3913 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
3914 -# >=dev-lang/ocaml-4 stable
3915 -# Masked in profiles/eapi-5-files instead
3916 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
3917 -
3918 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
3919 - ${PYTHON_REQUIRED_USE}
3920 - pygrub? ( python )
3921 - ovmf? ( hvm )
3922 - qemu? ( !system-qemu )"
3923 -
3924 -COMMON_DEPEND="
3925 - dev-libs/lzo:2
3926 - dev-libs/glib:2
3927 - dev-libs/yajl
3928 - dev-libs/libaio
3929 - dev-libs/libgcrypt:0
3930 - sys-libs/zlib
3931 -"
3932 -
3933 -DEPEND="${COMMON_DEPEND}
3934 - dev-python/lxml[${PYTHON_USEDEP}]
3935 - x86? ( sys-devel/dev86
3936 - sys-power/iasl )
3937 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
3938 - ${PYTHON_DEPS}
3939 - api? ( dev-libs/libxml2
3940 - net-misc/curl )
3941 - ovmf? ( $(python_gen_impl_dep sqlite) )
3942 - !amd64? ( >=sys-apps/dtc-1.4.0 )
3943 - amd64? ( sys-devel/bin86
3944 - system-seabios? ( sys-firmware/seabios )
3945 - sys-firmware/ipxe
3946 - sys-devel/dev86
3947 - sys-power/iasl )
3948 - dev-lang/perl
3949 - app-misc/pax-utils
3950 - doc? (
3951 - app-doc/doxygen
3952 - dev-python/markdown[${PYTHON_USEDEP}]
3953 - dev-tex/latex2html[png,gif]
3954 - media-gfx/graphviz
3955 - dev-tex/xcolor
3956 - media-gfx/transfig
3957 - dev-texlive/texlive-latexextra
3958 - virtual/latex-base
3959 - dev-tex/latexmk
3960 - dev-texlive/texlive-latex
3961 - dev-texlive/texlive-pictures
3962 - dev-texlive/texlive-latexrecommended
3963 - )
3964 - hvm? ( x11-proto/xproto
3965 - !net-libs/libiscsi )
3966 - qemu? (
3967 - x11-libs/pixman
3968 - sdl? ( media-libs/libsdl[X] )
3969 - )
3970 - system-qemu? ( app-emulation/qemu[xen] )
3971 - ocaml? ( dev-ml/findlib
3972 - >=dev-lang/ocaml-4 )"
3973 -
3974 -RDEPEND="${COMMON_DEPEND}
3975 - sys-apps/iproute2[-minimal]
3976 - net-misc/bridge-utils
3977 - screen? (
3978 - app-misc/screen
3979 - app-admin/logrotate
3980 - )"
3981 -
3982 -# hvmloader is used to bootstrap a fully virtualized kernel
3983 -# Approved by QA team in bug #144032
3984 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
3985 - usr/share/qemu-xen/qemu/s390-ccw.img"
3986 -
3987 -RESTRICT="test"
3988 -
3989 -pkg_setup() {
3990 - python_setup
3991 - export "CONFIG_LOMOUNT=y"
3992 -
3993 - #bug 522642, disable compile tools/tests
3994 - export "CONFIG_TESTS=n"
3995 -
3996 - if has_version dev-libs/libgcrypt:0; then
3997 - export "CONFIG_GCRYPT=y"
3998 - fi
3999 -
4000 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
4001 - if use x86 && use amd64; then
4002 - die "Confusion! Both x86 and amd64 are set in your use flags!"
4003 - elif use x86; then
4004 - export XEN_TARGET_ARCH="x86_32"
4005 - elif use amd64 ; then
4006 - export XEN_TARGET_ARCH="x86_64"
4007 - elif use arm; then
4008 - export XEN_TARGET_ARCH="arm32"
4009 - elif use arm64; then
4010 - export XEN_TARGET_ARCH="arm64"
4011 - else
4012 - die "Unsupported architecture!"
4013 - fi
4014 - fi
4015 -}
4016 -
4017 -src_prepare() {
4018 - # Upstream's patchset
4019 - if [[ -n ${UPSTREAM_VER} ]]; then
4020 - einfo "Try to apply Xen Upstream patch set"
4021 - EPATCH_SUFFIX="patch" \
4022 - EPATCH_FORCE="yes" \
4023 - EPATCH_OPTS="-p1" \
4024 - epatch "${WORKDIR}"/patches-upstream
4025 - fi
4026 -
4027 - # Security patchset
4028 - if [[ -n ${SECURITY_VER} ]]; then
4029 - einfo "Try to apply Xen Security patch set"
4030 - # apply main xen patches
4031 - # Two parallel systems, both work side by side
4032 - # Over time they may concdense into one. This will suffice for now
4033 - EPATCH_SUFFIX="patch"
4034 - EPATCH_FORCE="yes"
4035 -
4036 - source "${WORKDIR}"/patches-security/${PV}.conf
4037 -
4038 - for i in ${XEN_SECURITY_MAIN}; do
4039 - epatch "${WORKDIR}"/patches-security/xen/$i
4040 - done
4041 -
4042 - # apply qemu-xen/upstream patches
4043 - pushd "${S}"/tools/qemu-xen/ > /dev/null
4044 - for i in ${XEN_SECURITY_QEMUU}; do
4045 - epatch "${WORKDIR}"/patches-security/qemuu/$i
4046 - done
4047 - popd > /dev/null
4048 -
4049 - # apply qemu-traditional patches
4050 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
4051 - for i in ${XEN_SECURITY_QEMUT}; do
4052 - epatch "${WORKDIR}"/patches-security/qemut/$i
4053 - done
4054 - popd > /dev/null
4055 - fi
4056 -
4057 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
4058 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
4059 - pushd tools/firmware/ > /dev/null
4060 - ln -s seabios-dir-remote seabios-dir || die
4061 - popd > /dev/null
4062 -
4063 - # Gentoo's patchset
4064 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
4065 - einfo "Try to apply Gentoo specific patch set"
4066 - source "${FILESDIR}"/gentoo-patches.conf
4067 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
4068 - for i in ${!_gpv}; do
4069 - EPATCH_SUFFIX="patch" \
4070 - EPATCH_FORCE="yes" \
4071 - epatch "${WORKDIR}"/patches-gentoo/$i
4072 - done
4073 - fi
4074 -
4075 - # Ovmf's patchset
4076 - if use ovmf; then
4077 - if [[ -n ${OVMF_VER} ]];then
4078 - einfo "Try to apply Ovmf patch set"
4079 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
4080 - EPATCH_SUFFIX="patch" \
4081 - EPATCH_FORCE="yes" \
4082 - EPATCH_OPTS="-p1" \
4083 - epatch "${WORKDIR}"/patches-ovmf
4084 - popd > /dev/null
4085 - fi
4086 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
4087 - fi
4088 -
4089 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
4090 -
4091 - # Fix texi2html build error with new texi2html, qemu.doc.html
4092 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
4093 -
4094 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
4095 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
4096 - -i tools/firmware/Makefile || die
4097 -
4098 - # Drop .config, fixes to gcc-4.6
4099 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
4100 -
4101 - # if the user *really* wants to use their own custom-cflags, let them
4102 - if use custom-cflags; then
4103 - einfo "User wants their own CFLAGS - removing defaults"
4104 -
4105 - # try and remove all the default cflags
4106 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
4107 - -exec sed \
4108 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
4109 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
4110 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
4111 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
4112 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
4113 - -i {} + || die "failed to re-set custom-cflags"
4114 - else
4115 - unset CFLAGS
4116 - unset LDFLAGS
4117 - unset ASFLAGS
4118 - unset CPPFLAGS
4119 - fi
4120 -
4121 - if ! use pygrub; then
4122 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
4123 - fi
4124 -
4125 - if ! use python; then
4126 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
4127 - fi
4128 -
4129 - if ! use hvm; then
4130 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
4131 - # Bug 351648
4132 - elif ! use x86 && ! has x86 $(get_all_abis); then
4133 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
4134 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
4135 - export CPATH="${WORKDIR}"/extra-headers
4136 - fi
4137 -
4138 - if use qemu; then
4139 - if use sdl; then
4140 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
4141 - tools/Makefile || die
4142 - else
4143 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
4144 - tools/qemu-xen-traditional/xen-setup || die
4145 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
4146 - tools/Makefile || die
4147 - fi
4148 - else
4149 - # Don't bother with qemu, only needed for fully virtualised guests
4150 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
4151 - fi
4152 -
4153 - # Reset bash completion dir; Bug 472438
4154 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
4155 - -i Config.mk || die
4156 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
4157 -
4158 - # xencommons, Bug #492332, sed lighter weight than patching
4159 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
4160 - -i tools/hotplug/Linux/init.d/xencommons.in || die
4161 -
4162 - # respect multilib, usr/lib/libcacard.so.0.0.0
4163 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
4164 - -i tools/qemu-xen/configure || die
4165 -
4166 - #bug 518136, don't build 32bit exactuable for nomultilib profile
4167 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
4168 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
4169 - fi
4170 -
4171 - # use /var instead of /var/lib, consistat with previous ebuild
4172 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
4173 - m4/paths.m4 configure tools/configure || die
4174 - # use /run instead of /var/run
4175 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
4176 - m4/paths.m4 configure tools/configure || die
4177 -
4178 - # uncomment lines in xl.conf
4179 - sed -e 's:^#autoballoon=:autoballoon=:' \
4180 - -e 's:^#lockfile=:lockfile=:' \
4181 - -e 's:^#vif.default.script=:vif.default.script=:' \
4182 - -i tools/examples/xl.conf || die
4183 -
4184 - # Bug #575868 converted to a sed statement, typo of one char
4185 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
4186 -
4187 - epatch_user
4188 -}
4189 -
4190 -src_configure() {
4191 - local myconf="--prefix=${PREFIX}/usr \
4192 - --libdir=${PREFIX}/usr/$(get_libdir) \
4193 - --libexecdir=${PREFIX}/usr/libexec \
4194 - --disable-werror \
4195 - --disable-xen \
4196 - --enable-tools \
4197 - --enable-docs \
4198 - $(use_with system-qemu) \
4199 - $(use_enable pam) \
4200 - $(use_enable api xenapi) \
4201 - $(use_enable ovmf) \
4202 - $(use_enable ocaml ocamltools) \
4203 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
4204 - "
4205 -
4206 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
4207 - use qemu || myconf+=" --with-system-qemu"
4208 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
4209 - econf ${myconf}
4210 -}
4211 -
4212 -src_compile() {
4213 - export VARTEXFONTS="${T}/fonts"
4214 - local myopt
4215 - use debug && myopt="${myopt} debug=y"
4216 -
4217 - if test-flag-CC -fno-strict-overflow; then
4218 - append-flags -fno-strict-overflow
4219 - fi
4220 -
4221 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
4222 -
4223 - use doc && emake -C docs txt html
4224 - emake -C docs man-pages
4225 -}
4226 -
4227 -src_install() {
4228 - # Override auto-detection in the build system, bug #382573
4229 - export INITD_DIR=/tmp/init.d
4230 - export CONFIG_LEAF_DIR=../tmp/default
4231 -
4232 - # Let the build system compile installed Python modules.
4233 - local PYTHONDONTWRITEBYTECODE
4234 - export PYTHONDONTWRITEBYTECODE
4235 -
4236 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
4237 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
4238 -
4239 - # Fix the remaining Python shebangs.
4240 - python_fix_shebang "${D}"
4241 -
4242 - # Remove RedHat-specific stuff
4243 - rm -rf "${D}"tmp || die
4244 -
4245 - if use doc; then
4246 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
4247 -
4248 - dohtml -r docs/
4249 - docinto pdf
4250 - dodoc ${DOCS[@]}
4251 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
4252 - fi
4253 -
4254 - rm -rf "${D}"/usr/share/doc/xen/
4255 - doman docs/man?/*
4256 -
4257 - newconfd "${FILESDIR}"/xendomains.confd xendomains
4258 - newconfd "${FILESDIR}"/xenstored.confd xenstored
4259 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
4260 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
4261 - newinitd "${FILESDIR}"/xenstored.initd xenstored
4262 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
4263 - newinitd "${FILESDIR}"/xencommons.initd xencommons
4264 - newconfd "${FILESDIR}"/xencommons.confd xencommons
4265 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
4266 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
4267 -
4268 - if use screen; then
4269 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
4270 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
4271 - keepdir /var/log/xen-consoles
4272 - fi
4273 -
4274 - # For -static-libs wrt Bug 384355
4275 - if ! use static-libs; then
4276 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
4277 - fi
4278 -
4279 - # for xendomains
4280 - keepdir /etc/xen/auto
4281 -
4282 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
4283 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
4284 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
4285 -}
4286 -
4287 -pkg_postinst() {
4288 - elog "Official Xen Guide and the offical wiki page:"
4289 - elog "https://wiki.gentoo.org/wiki/Xen"
4290 - elog "http://wiki.xen.org/wiki/Main_Page"
4291 - elog ""
4292 - elog "Recommended to utilise the xencommons script to config sytem At boot"
4293 - elog "Add by use of rc-update on completion of the install"
4294 -
4295 - if ! use hvm; then
4296 - echo
4297 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
4298 - elog "support enable the hvm use flag."
4299 - elog "An x86 or amd64 system is required to build HVM support."
4300 - fi
4301 -
4302 - if use qemu; then
4303 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
4304 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
4305 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
4306 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
4307 - fi
4308 -}
4309
4310 diff --git a/app-emulation/xen-tools/xen-tools-4.7.0.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0.ebuild
4311 deleted file mode 100644
4312 index 62d7661..0000000
4313 --- a/app-emulation/xen-tools/xen-tools-4.7.0.ebuild
4314 +++ /dev/null
4315 @@ -1,458 +0,0 @@
4316 -# Copyright 1999-2016 Gentoo Foundation
4317 -# Distributed under the terms of the GNU General Public License v2
4318 -# $Id$
4319 -
4320 -EAPI=5
4321 -
4322 -PYTHON_COMPAT=( python2_7 )
4323 -PYTHON_REQ_USE='ncurses,xml,threads'
4324 -
4325 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
4326 -
4327 -MY_PV=${PV/_/-}
4328 -MAJOR_V="$(get_version_component_range 1-2)"
4329 -
4330 -if [[ $PV == *9999 ]]; then
4331 - inherit git-r3
4332 - KEYWORDS=""
4333 - REPO="xen.git"
4334 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
4335 - S="${WORKDIR}/${REPO}"
4336 -else
4337 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
4338 - UPSTREAM_VER=
4339 - SECURITY_VER=
4340 - # xen-tools's gentoo patches tarball
4341 - GENTOO_VER=6
4342 - # xen-tools's gentoo patches version which apply to this specific ebuild
4343 - GENTOO_GPV=0
4344 - # xen-tools ovmf's patches
4345 - OVMF_VER=2
4346 -
4347 - SEABIOS_VER=1.8.2
4348 - # OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
4349 - OVMF_PV=20151110
4350 -
4351 - [[ -n ${UPSTREAM_VER} ]] && \
4352 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
4353 - [[ -n ${SECURITY_VER} ]] && \
4354 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
4355 - [[ -n ${GENTOO_VER} ]] && \
4356 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
4357 - [[ -n ${OVMF_VER} ]] && \
4358 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
4359 -
4360 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
4361 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
4362 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
4363 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
4364 - ${OVMF_PATCHSET_URI} )
4365 - ${UPSTREAM_PATCHSET_URI}
4366 - ${SECURITY_PATCHSET_URI}
4367 - ${GENTOO_PATCHSET_URI}"
4368 -
4369 - S="${WORKDIR}/xen-${MY_PV}"
4370 -fi
4371 -
4372 -DESCRIPTION="Xen tools including QEMU and xl"
4373 -HOMEPAGE="http://xen.org/"
4374 -DOCS=( README docs/README.xen-bugtool )
4375 -
4376 -LICENSE="GPL-2"
4377 -SLOT="0/${MAJOR_V}"
4378 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
4379 -# >=dev-lang/ocaml-4 stable
4380 -# Masked in profiles/eapi-5-files instead
4381 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
4382 -
4383 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
4384 - ${PYTHON_REQUIRED_USE}
4385 - pygrub? ( python )
4386 - ovmf? ( hvm )
4387 - qemu? ( !system-qemu )"
4388 -
4389 -COMMON_DEPEND="
4390 - dev-libs/lzo:2
4391 - dev-libs/glib:2
4392 - dev-libs/yajl
4393 - dev-libs/libaio
4394 - dev-libs/libgcrypt:0
4395 - sys-libs/zlib
4396 -"
4397 -
4398 -DEPEND="${COMMON_DEPEND}
4399 - dev-python/lxml[${PYTHON_USEDEP}]
4400 - x86? ( sys-devel/dev86
4401 - sys-power/iasl )
4402 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
4403 - ${PYTHON_DEPS}
4404 - api? ( dev-libs/libxml2
4405 - net-misc/curl )
4406 - ovmf? ( $(python_gen_impl_dep sqlite) )
4407 - !amd64? ( >=sys-apps/dtc-1.4.0 )
4408 - amd64? ( sys-devel/bin86
4409 - system-seabios? ( sys-firmware/seabios )
4410 - sys-firmware/ipxe
4411 - sys-devel/dev86
4412 - sys-power/iasl )
4413 - dev-lang/perl
4414 - app-misc/pax-utils
4415 - doc? (
4416 - app-doc/doxygen
4417 - dev-python/markdown[${PYTHON_USEDEP}]
4418 - dev-tex/latex2html[png,gif]
4419 - media-gfx/graphviz
4420 - dev-tex/xcolor
4421 - media-gfx/transfig
4422 - dev-texlive/texlive-latexextra
4423 - virtual/latex-base
4424 - dev-tex/latexmk
4425 - dev-texlive/texlive-latex
4426 - dev-texlive/texlive-pictures
4427 - dev-texlive/texlive-latexrecommended
4428 - )
4429 - hvm? ( x11-proto/xproto
4430 - !net-libs/libiscsi )
4431 - qemu? (
4432 - x11-libs/pixman
4433 - sdl? ( media-libs/libsdl[X] )
4434 - )
4435 - system-qemu? ( app-emulation/qemu[xen] )
4436 - ocaml? ( dev-ml/findlib
4437 - >=dev-lang/ocaml-4 )"
4438 -
4439 -RDEPEND="${COMMON_DEPEND}
4440 - sys-apps/iproute2[-minimal]
4441 - net-misc/bridge-utils
4442 - screen? (
4443 - app-misc/screen
4444 - app-admin/logrotate
4445 - )"
4446 -
4447 -# hvmloader is used to bootstrap a fully virtualized kernel
4448 -# Approved by QA team in bug #144032
4449 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
4450 - usr/share/qemu-xen/qemu/s390-ccw.img"
4451 -
4452 -RESTRICT="test"
4453 -
4454 -pkg_setup() {
4455 - python_setup
4456 - export "CONFIG_LOMOUNT=y"
4457 -
4458 - #bug 522642, disable compile tools/tests
4459 - export "CONFIG_TESTS=n"
4460 -
4461 - if has_version dev-libs/libgcrypt:0; then
4462 - export "CONFIG_GCRYPT=y"
4463 - fi
4464 -
4465 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
4466 - if use x86 && use amd64; then
4467 - die "Confusion! Both x86 and amd64 are set in your use flags!"
4468 - elif use x86; then
4469 - export XEN_TARGET_ARCH="x86_32"
4470 - elif use amd64 ; then
4471 - export XEN_TARGET_ARCH="x86_64"
4472 - elif use arm; then
4473 - export XEN_TARGET_ARCH="arm32"
4474 - elif use arm64; then
4475 - export XEN_TARGET_ARCH="arm64"
4476 - else
4477 - die "Unsupported architecture!"
4478 - fi
4479 - fi
4480 -}
4481 -
4482 -src_prepare() {
4483 - # Upstream's patchset
4484 - if [[ -n ${UPSTREAM_VER} ]]; then
4485 - einfo "Try to apply Xen Upstream patch set"
4486 - EPATCH_SUFFIX="patch" \
4487 - EPATCH_FORCE="yes" \
4488 - EPATCH_OPTS="-p1" \
4489 - epatch "${WORKDIR}"/patches-upstream
4490 - fi
4491 -
4492 - # Security patchset
4493 - if [[ -n ${SECURITY_VER} ]]; then
4494 - einfo "Try to apply Xen Security patch set"
4495 - # apply main xen patches
4496 - # Two parallel systems, both work side by side
4497 - # Over time they may concdense into one. This will suffice for now
4498 - EPATCH_SUFFIX="patch"
4499 - EPATCH_FORCE="yes"
4500 -
4501 - source "${WORKDIR}"/patches-security/${PV}.conf
4502 -
4503 - for i in ${XEN_SECURITY_MAIN}; do
4504 - epatch "${WORKDIR}"/patches-security/xen/$i
4505 - done
4506 -
4507 - # apply qemu-xen/upstream patches
4508 - pushd "${S}"/tools/qemu-xen/ > /dev/null
4509 - for i in ${XEN_SECURITY_QEMUU}; do
4510 - epatch "${WORKDIR}"/patches-security/qemuu/$i
4511 - done
4512 - popd > /dev/null
4513 -
4514 - # apply qemu-traditional patches
4515 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
4516 - for i in ${XEN_SECURITY_QEMUT}; do
4517 - epatch "${WORKDIR}"/patches-security/qemut/$i
4518 - done
4519 - popd > /dev/null
4520 - fi
4521 -
4522 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
4523 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
4524 - pushd tools/firmware/ > /dev/null
4525 - ln -s seabios-dir-remote seabios-dir || die
4526 - popd > /dev/null
4527 -
4528 - # Gentoo's patchset
4529 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
4530 - einfo "Try to apply Gentoo specific patch set"
4531 - source "${FILESDIR}"/gentoo-patches.conf
4532 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
4533 - for i in ${!_gpv}; do
4534 - EPATCH_SUFFIX="patch" \
4535 - EPATCH_FORCE="yes" \
4536 - epatch "${WORKDIR}"/patches-gentoo/$i
4537 - done
4538 - fi
4539 -
4540 - # Ovmf's patchset
4541 - if use ovmf; then
4542 - if [[ -n ${OVMF_VER} ]];then
4543 - einfo "Try to apply Ovmf patch set"
4544 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
4545 - EPATCH_SUFFIX="patch" \
4546 - EPATCH_FORCE="yes" \
4547 - EPATCH_OPTS="-p1" \
4548 - epatch "${WORKDIR}"/patches-ovmf
4549 - popd > /dev/null
4550 - fi
4551 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
4552 - fi
4553 -
4554 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
4555 -
4556 - # Fix texi2html build error with new texi2html, qemu.doc.html
4557 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
4558 -
4559 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
4560 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
4561 - -i tools/firmware/Makefile || die
4562 -
4563 - # Drop .config, fixes to gcc-4.6
4564 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
4565 -
4566 - # if the user *really* wants to use their own custom-cflags, let them
4567 - if use custom-cflags; then
4568 - einfo "User wants their own CFLAGS - removing defaults"
4569 -
4570 - # try and remove all the default cflags
4571 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
4572 - -exec sed \
4573 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
4574 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
4575 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
4576 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
4577 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
4578 - -i {} + || die "failed to re-set custom-cflags"
4579 - else
4580 - unset CFLAGS
4581 - unset LDFLAGS
4582 - unset ASFLAGS
4583 - unset CPPFLAGS
4584 - fi
4585 -
4586 - if ! use pygrub; then
4587 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
4588 - fi
4589 -
4590 - if ! use python; then
4591 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
4592 - fi
4593 -
4594 - if ! use hvm; then
4595 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
4596 - # Bug 351648
4597 - elif ! use x86 && ! has x86 $(get_all_abis); then
4598 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
4599 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
4600 - export CPATH="${WORKDIR}"/extra-headers
4601 - fi
4602 -
4603 - if use qemu; then
4604 - if use sdl; then
4605 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
4606 - tools/Makefile || die
4607 - else
4608 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
4609 - tools/qemu-xen-traditional/xen-setup || die
4610 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
4611 - tools/Makefile || die
4612 - fi
4613 - else
4614 - # Don't bother with qemu, only needed for fully virtualised guests
4615 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
4616 - fi
4617 -
4618 - # Reset bash completion dir; Bug 472438
4619 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
4620 - -i Config.mk || die
4621 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
4622 -
4623 - # xencommons, Bug #492332, sed lighter weight than patching
4624 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
4625 - -i tools/hotplug/Linux/init.d/xencommons.in || die
4626 -
4627 - # respect multilib, usr/lib/libcacard.so.0.0.0
4628 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
4629 - -i tools/qemu-xen/configure || die
4630 -
4631 - #bug 518136, don't build 32bit exactuable for nomultilib profile
4632 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
4633 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
4634 - fi
4635 -
4636 - # use /var instead of /var/lib, consistat with previous ebuild
4637 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
4638 - m4/paths.m4 configure tools/configure || die
4639 - # use /run instead of /var/run
4640 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
4641 - m4/paths.m4 configure tools/configure || die
4642 -
4643 - # uncomment lines in xl.conf
4644 - sed -e 's:^#autoballoon=:autoballoon=:' \
4645 - -e 's:^#lockfile=:lockfile=:' \
4646 - -e 's:^#vif.default.script=:vif.default.script=:' \
4647 - -i tools/examples/xl.conf || die
4648 -
4649 - # Bug #575868 converted to a sed statement, typo of one char
4650 - sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
4651 -
4652 - epatch_user
4653 -}
4654 -
4655 -src_configure() {
4656 - local myconf="--prefix=${PREFIX}/usr \
4657 - --libdir=${PREFIX}/usr/$(get_libdir) \
4658 - --libexecdir=${PREFIX}/usr/libexec \
4659 - --disable-werror \
4660 - --disable-xen \
4661 - --enable-tools \
4662 - --enable-docs \
4663 - $(use_with system-qemu) \
4664 - $(use_enable pam) \
4665 - $(use_enable api xenapi) \
4666 - $(use_enable ovmf) \
4667 - $(use_enable ocaml ocamltools) \
4668 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
4669 - "
4670 -
4671 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
4672 - use qemu || myconf+=" --with-system-qemu"
4673 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
4674 - econf ${myconf}
4675 -}
4676 -
4677 -src_compile() {
4678 - export VARTEXFONTS="${T}/fonts"
4679 - local myopt
4680 - use debug && myopt="${myopt} debug=y"
4681 -
4682 - if test-flag-CC -fno-strict-overflow; then
4683 - append-flags -fno-strict-overflow
4684 - fi
4685 -
4686 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
4687 -
4688 - use doc && emake -C docs txt html
4689 - emake -C docs man-pages
4690 -}
4691 -
4692 -src_install() {
4693 - # Override auto-detection in the build system, bug #382573
4694 - export INITD_DIR=/tmp/init.d
4695 - export CONFIG_LEAF_DIR=../tmp/default
4696 -
4697 - # Let the build system compile installed Python modules.
4698 - local PYTHONDONTWRITEBYTECODE
4699 - export PYTHONDONTWRITEBYTECODE
4700 -
4701 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
4702 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
4703 -
4704 - # Fix the remaining Python shebangs.
4705 - python_fix_shebang "${D}"
4706 -
4707 - # Remove RedHat-specific stuff
4708 - rm -rf "${D}"tmp || die
4709 -
4710 - if use doc; then
4711 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
4712 -
4713 - dohtml -r docs/
4714 - docinto pdf
4715 - dodoc ${DOCS[@]}
4716 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
4717 - fi
4718 -
4719 - rm -rf "${D}"/usr/share/doc/xen/
4720 - doman docs/man?/*
4721 -
4722 - newconfd "${FILESDIR}"/xendomains.confd xendomains
4723 - newconfd "${FILESDIR}"/xenstored.confd xenstored
4724 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
4725 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
4726 - newinitd "${FILESDIR}"/xenstored.initd xenstored
4727 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
4728 - newinitd "${FILESDIR}"/xencommons.initd xencommons
4729 - newconfd "${FILESDIR}"/xencommons.confd xencommons
4730 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
4731 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
4732 -
4733 - if use screen; then
4734 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
4735 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
4736 - keepdir /var/log/xen-consoles
4737 - fi
4738 -
4739 - # For -static-libs wrt Bug 384355
4740 - if ! use static-libs; then
4741 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
4742 - fi
4743 -
4744 - # for xendomains
4745 - keepdir /etc/xen/auto
4746 -
4747 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
4748 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
4749 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
4750 -}
4751 -
4752 -pkg_postinst() {
4753 - elog "Official Xen Guide and the offical wiki page:"
4754 - elog "https://wiki.gentoo.org/wiki/Xen"
4755 - elog "http://wiki.xen.org/wiki/Main_Page"
4756 - elog ""
4757 - elog "Recommended to utilise the xencommons script to config sytem At boot"
4758 - elog "Add by use of rc-update on completion of the install"
4759 -
4760 - if ! use hvm; then
4761 - echo
4762 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
4763 - elog "support enable the hvm use flag."
4764 - elog "An x86 or amd64 system is required to build HVM support."
4765 - fi
4766 -
4767 - if use qemu; then
4768 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
4769 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
4770 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
4771 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
4772 - fi
4773 -}