summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2013-02-19 20:41:11 +0000
committerDoug Goldstein <cardoe@gentoo.org>2013-02-19 20:41:11 +0000
commit855e186874dd09efd484a90ee43f7890e244913f (patch)
treed9164875a1b76a5f3bec97b2be99bbe3575a9385 /app-emulation
parentupgrades to 4.2.0-r1 mirrored in 4.2.1-r1 (diff)
downloadhistorical-855e186874dd09efd484a90ee43f7890e244913f.tar.gz
historical-855e186874dd09efd484a90ee43f7890e244913f.tar.bz2
historical-855e186874dd09efd484a90ee43f7890e244913f.zip
Bump to fix compile issues with some USE flag combinations and fix for Python bindings.
Package-Manager: portage-2.1.11.50/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/libvirt/ChangeLog8
-rw-r--r--app-emulation/libvirt/Manifest4
-rw-r--r--app-emulation/libvirt/libvirt-1.0.2-r2.ebuild419
3 files changed, 429 insertions, 2 deletions
diff --git a/app-emulation/libvirt/ChangeLog b/app-emulation/libvirt/ChangeLog
index 872b1a3ab35e..4c4609f6235b 100644
--- a/app-emulation/libvirt/ChangeLog
+++ b/app-emulation/libvirt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/libvirt
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.247 2013/02/01 00:07:52 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.248 2013/02/19 20:41:05 cardoe Exp $
+
+*libvirt-1.0.2-r2 (19 Feb 2013)
+
+ 19 Feb 2013; Doug Goldstein <cardoe@gentoo.org> +libvirt-1.0.2-r2.ebuild:
+ Bump to fix compile issues with some USE flag combinations and fix for Python
+ bindings.
01 Feb 2013; Doug Goldstein <cardoe@gentoo.org> libvirt-1.0.2-r1.ebuild:
Fix Xen support after user feedback on bug #454598
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
index 5d46a40e266c..6f382c493a8a 100644
--- a/app-emulation/libvirt/Manifest
+++ b/app-emulation/libvirt/Manifest
@@ -6,12 +6,14 @@ DIST libvirt-0.10.2.1.tar.gz 21300749 SHA256 449628d798b82cb2f24416ef2e38c2d06f1
DIST libvirt-0.10.2.2.tar.gz 21987939 SHA256 05714ba82d8d8cdcadc96fdd393f02ec4a7e975d181b3a06702b83c0444af084 SHA512 e4dbf8d43cfbd2fe9f3f21f114b40a8f78f60d96acbb09178067191bd6e6ca7942212bf30ba2d61315a5c1dbd8cb6bbfd0873fc7bb3f699ace84dcf6c21ded15 WHIRLPOOL a88eb048d65bd70eb24f3130e51eaa57a80bb48ea7b07f591df34051ebba9f2da32f32a3fb0ae07f97490c0f9185673014c5c307aa53a6634f86a24a3085bd32
DIST libvirt-1.0.0.tar.gz 21868950 SHA256 14c8a30ebfb939c82cab5f759a95d09646b43b4210e45490e92459ae65123076 SHA512 b4c3c34b2813f08653b33de5e1ebf030f2eafe77cb6107724494b83643a4e744b3f2c290a1755bcc586c8c7ebe0d8955540d3455736685484e27b07f677dca2c WHIRLPOOL 398af483a630294d7306f2cef95712613a0391da19bd654f5b24aff54d99df8940f79e560a61b3e978f3a62b89778a1b3e6a171188b9a8c42e31e2029a93f3d0
DIST libvirt-1.0.1.tar.gz 22512698 SHA256 4a16c76c46ebc41a6514082b5d95b5d5a0868e7a8cc00ab2e6cc1a23ec6b5a3b SHA512 7a106998565410197b1cca45c68c84661935c96d1cd28888b977691faf29b10af6742f00f0e8baa76b27af4031e6b8b988c2ae83f3cbb5affe3381401fb6859e WHIRLPOOL 3b98c742141a63b3e6384e6fe09b01cec485bfb59fbefe89f3e64450bf66e2441aea43b754f92253e2c3f33f5b5d56975473cc4aa7313d622e40cd3185608ae6
+DIST libvirt-1.0.2-1b2f2439.tar.xz 3184 SHA256 fb7cbd3add0b54927b1be4bc753e0f0279e11f5b85bb692d44fb9b99b85722da SHA512 a45cd0896dbf845472135cb3548eff731f6a6c89af2d90c44094d3c07a8f19c8c8422dc43228a0c4b0c04b1b11bae2bc2a271f02bea598d36b52c42fb60ddc19 WHIRLPOOL bf0760fcf5245d0c3347f1969605fcb3df86c93e183b468c0421b88801db5f0984c4d1ce5a3ebc7b72a53f585d17db7fa984f7fbfa6e8f1d2c65819f3fd3ed27
DIST libvirt-1.0.2.tar.gz 22971729 SHA256 9b8c2752f78658b65ef1c608b3775be0978d60855a9b5e2778f79c113201c179 SHA512 c35b6dc46594a93d4d633ad42df2cf1da7cbbf7327205ba4c608d4f95f0017cb4041518c3dafa3d5ab7dadaafad116779415c843e0d4e67ef1df31bd9a9295e7 WHIRLPOOL cf56954392f263fe686c79e320f238cc657424512bf3b136bd68747777640cd564affc38f7ed077a1e00f2d2511ab607b236a9b6ea4fbc8f089a2a0267b214ce
EBUILD libvirt-0.10.2.1.ebuild 11493 SHA256 8b16eb20d78026ffa2feccea853650da67479ebcb2cd2da43f6e30d740b1c9d4 SHA512 fd3efc36c1358ac9413a319e20efe25a71be62714071e43951bae6bc8e2104d5c86e74a50edfbaabeba43d6c12638b5df198f565e56dbc5ec7c26783300ce2a6 WHIRLPOOL b1a859a1f105ed3e37e8fd59606db8244196b9f4341495aea91fe78d76f8c8cada4bc21fcbe5079639147f8c15fe00c8c02ca6ee60039174f8d6cb2caf434842
EBUILD libvirt-0.10.2.2.ebuild 11622 SHA256 82e89a1ad116af8ad4818e32108f36a739b52b97be5df6f996a26c73aa8b5ea0 SHA512 a2484b229926316ab9735efb8bd6835ed15e773f87c7a25ea387f83ed14812e66f4498faca6989801684f40a01e3f7a53382c953827ca0105ae815ea42b8c189 WHIRLPOOL 51c1ec1d51d3c950ef01b7af02b4808e0c87fe2413eeeef9dc9be189acd771b384a0c60fd0d2a72eeed7709af71a7d1565dd77ba66bef0d87b79e1fa98554779
EBUILD libvirt-1.0.0.ebuild 11574 SHA256 1277354f747515fda62740224ff1d8dd967640d0ad3a3231aa292f8c42dc6e29 SHA512 2c55fe9f0dc27765aed9989ff624d3dd3b31d5d015eb666b53b5c9f8f156c9bd4aa904a0f2a1bc22771aab01d46c2ea56d066adcb6d2add9f18486f0b1bb75bf WHIRLPOOL 73e0d6892b78766ae5e744af6b822fc64e37fe3f4737b495e766f08902c9b26d6f6b833be49397a8aa4f26d37e02de62af3f7365f88ecc39eb3b93d5a5cb2d3c
EBUILD libvirt-1.0.1.ebuild 11798 SHA256 76427bfbe624c6491384d431a254a93fd63403856d1436a03899b9a7223c9c9b SHA512 6d01eaaec0f29c3f00218ca3062f815ccb186cbbd02e123106c7dc35fe88c0bf823a6392915c0309645f43fc384b158e93fd634eeabd1db1131a2bc23405c72e WHIRLPOOL 8d7285f4638a01d397060d076c70bcd273573f9daa6d606726004094dd6139f4bcecabb1c7ac73f5848cd8403ef3b9d1b272a16ea10b72167623602f7a01d32d
EBUILD libvirt-1.0.2-r1.ebuild 11869 SHA256 5a645a17fa224cfb94ec6a5ab2bcb53ef32267146fbf81c8a5936bfc22c1ecc1 SHA512 03cd75c39ce0e73a42f43aa548d9254c8bb3011a45bb6f4c3f7da97c15fd36fb7f02ab04345f50e482bdee05907ad7fe4c71d4cb55d0806a5abb4a4205299d8b WHIRLPOOL 63739f589e7ec40ffcc66f4e54d451bf27c0d529eb0cf60e6a48cce47ed97f578328dbe0dfe27bc1aaddc27eb27224a6ed822f025ea00b7f4b58df030ee96e58
+EBUILD libvirt-1.0.2-r2.ebuild 11794 SHA256 0546ea16459e9854f3c171c93bcbff47daeb3672e2c49c8672edb4ceb3d32d97 SHA512 1362f09a091b3eb672588b0ab3489347d63b7718f898b6485a473a39de08b822ccc631a1f967162a3fc29421b574b00c943b3f333ae6dc25b322e6f85a50c913 WHIRLPOOL be09dc47b16192bef0edecca3e8325e8c15529c87acaf36d8375a80bba9c1c6ba4f0c64d24ae0c4cb3d42992a3879808a46bdb32a0da29ba47b57411a0a58ba9
EBUILD libvirt-9999.ebuild 11519 SHA256 97c4435c5719e3e94658fe3c66366afc37f1bdaffe6221183635212a5061837f SHA512 a152f25c2aa41db942f0d51dd65ae4412b31ae077b3e7ca48dbe721d2792df8fc6dead7bd03fccf2c7e95821b9bb4e167877343b549a4a6949af97fdf9a9b099 WHIRLPOOL 4ecef7a049e9610e7ce891eaa31dbbe41bffaaa08686d9bca23fd5b8770c8690c338a4a78fb64536a295b9cf1f43d379bba2891e391b935519d4f4b269c69d04
-MISC ChangeLog 47421 SHA256 e2d2c3fd13e28dd7cf56aaa741bc9f0fb4ca665591ae6c4e86353477edeb4b51 SHA512 c3548a9ad2f040fa9489a289a8cc82b3b6a6c444f7e38de1b238f17204bc0c17989a406f1d6e18769d3a70e087dd2e9dfc34fd66f0b5e665dfb80a37ae10ee8e WHIRLPOOL 229a98aeec2c3af6b299c51e43b1647a34697192050448b1897764cc38b9549e62d2615d62ce6f7103b391ed16b38c23802eafbfd6761a120cc2e007fc6ffce8
+MISC ChangeLog 47623 SHA256 ba9d77fd4f2627f7c74386fd4c5c2bc3dfee5100d98f64f39305be20ba43df94 SHA512 c953fa4798cd30149045bc6b8f77066769f5cd20c0c208943ba2745ef33383a699cdf8d3810fa1932b3c9bb83ee4ad1459420ada5583b21be8735f317286ddf1 WHIRLPOOL 96d3e76d602c4d1136d2c623b0153608196fbd6fa582c1bc7d22d895c42b7e73484264a852eb8b3d853d6a5d756fad9c4488c6594c9242e4bd406b343c5a53b3
MISC metadata.xml 3433 SHA256 1f1ed0c0f3ff9c388bf84c6877e7f5a9f2913b3d9b4ce71e3f98c64dde4a6084 SHA512 59c1c7df543b79e0de45dd0d30f0c2440a27baf2bf89fb8f4505c8d98ed152bb074cdf136fdb4299247f80099af5a3a2c058c3aa5ce277014128cd7f759a5b4a WHIRLPOOL 76a3e08490084f62049793359c23305565facaea07433227f432cbfdbd7e4a3956ca31a958c5b7634196345e236a5cb9000ff89bc7a22eaa9c98921990119d05
diff --git a/app-emulation/libvirt/libvirt-1.0.2-r2.ebuild b/app-emulation/libvirt/libvirt-1.0.2-r2.ebuild
new file mode 100644
index 000000000000..7e2618d8d068
--- /dev/null
+++ b/app-emulation/libvirt/libvirt-1.0.2-r2.ebuild
@@ -0,0 +1,419 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-1.0.2-r2.ebuild,v 1.1 2013/02/19 20:41:05 cardoe Exp $
+
+EAPI=5
+
+BACKPORTS=1b2f2439
+AUTOTOOLIZE=yes
+
+MY_P="${P/_rc/-rc}"
+
+PYTHON_DEPEND="python? 2:2.5"
+#RESTRICT_PYTHON_ABIS="3.*"
+#SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils python user autotools linux-info
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://libvirt.org/libvirt.git"
+ AUTOTOOLIZE=yes
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz
+ ftp://libvirt.org/libvirt/${MY_P}.tar.gz
+ ${BACKPORTS:+
+ http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+ KEYWORDS="~amd64 ~x86"
+fi
+S="${WORKDIR}/${P%_rc*}"
+
+DESCRIPTION="C toolkit to manipulate virtual machines"
+HOMEPAGE="http://www.libvirt.org/"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="audit avahi +caps firewalld iscsi +libvirtd lvm +lxc +macvtap nfs \
+ nls numa openvz parted pcap phyp policykit python qemu rbd sasl \
+ selinux +udev uml +vepa virtualbox virt-network xen elibc_glibc"
+REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
+ lxc? ( caps libvirtd )
+ openvz? ( libvirtd )
+ qemu? ( libvirtd )
+ uml? ( libvirtd )
+ vepa? ( macvtap )
+ virtualbox? ( libvirtd )
+ xen? ( libvirtd )
+ virt-network? ( libvirtd )
+ firewalld? ( virt-network )"
+
+# gettext.sh command is used by the libvirt command wrappers, and it's
+# non-optional, so put it into RDEPEND.
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
+# package will use 3 by default. Since we don't have slot pinning in an API,
+# we must go with the most recent
+RDEPEND="sys-libs/readline
+ sys-libs/ncurses
+ >=net-misc/curl-7.18.0
+ dev-libs/libgcrypt
+ >=dev-libs/libxml2-2.7.6
+ dev-libs/libnl:3
+ >=net-libs/gnutls-1.0.25
+ net-libs/libssh2
+ sys-apps/dmidecode
+ >=sys-apps/util-linux-2.17
+ sys-devel/gettext
+ >=net-analyzer/netcat6-1.0-r2
+ app-misc/scrub
+ audit? ( sys-process/audit )
+ avahi? ( >=net-dns/avahi-0.6[dbus] )
+ caps? ( sys-libs/libcap-ng )
+ iscsi? ( sys-block/open-iscsi )
+ lxc? ( sys-power/pm-utils )
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
+ nfs? ( net-fs/nfs-utils )
+ numa? (
+ >sys-process/numactl-2.0.2
+ sys-process/numad
+ )
+ openvz? ( sys-kernel/openvz-sources )
+ parted? (
+ >=sys-block/parted-1.8[device-mapper]
+ sys-fs/lvm2
+ )
+ pcap? ( >=net-libs/libpcap-1.0.0 )
+ policykit? ( >=sys-auth/polkit-0.9 )
+ qemu? (
+ >=app-emulation/qemu-0.13.0
+ dev-libs/yajl
+ sys-power/pm-utils
+ )
+ rbd? ( sys-cluster/ceph )
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( >=sys-libs/libselinux-2.0.85 )
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
+ xen? ( app-emulation/xen-tools app-emulation/xen )
+ udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 )
+ virt-network? ( net-dns/dnsmasq
+ >=net-firewall/iptables-1.4.10
+ net-misc/radvd
+ net-firewall/ebtables
+ sys-apps/iproute2[-minimal]
+ firewalld? ( net-firewall/firewalld )
+ )
+ elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )"
+# one? ( dev-libs/xmlrpc-c )
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-text/xhtml1
+ dev-libs/libxslt
+ =dev-lang/python-2*"
+
+LXC_CONFIG_CHECK="
+ ~CGROUPS
+ ~CGROUP_FREEZER
+ ~CGROUP_DEVICE
+ ~CPUSETS
+ ~CGROUP_CPUACCT
+ ~RESOURCE_COUNTERS
+ ~CGROUP_SCHED
+ ~BLK_CGROUP
+ ~NAMESPACES
+ ~UTS_NS
+ ~IPC_NS
+ ~PID_NS
+ ~NET_NS
+ ~DEVPTS_MULTIPLE_INSTANCES
+ ~VETH
+ ~MACVLAN
+ ~POSIX_MQUEUE
+ ~!GRKERNSEC_CHROOT_MOUNT
+ ~!GRKERNSEC_CHROOT_DOUBLE
+ ~!GRKERNSEC_CHROOT_PIVOT
+ ~!GRKERNSEC_CHROOT_CHMOD
+ ~!GRKERNSEC_CHROOT_CAPS
+"
+
+VIRTNET_CONFIG_CHECK="
+ ~BRIDGE_NF_EBTABLES
+ ~NETFILTER_ADVANCED
+ ~NETFILTER_XT_TARGET_CHECKSUM
+"
+
+MACVTAP_CONFIG_CHECK="~MACVTAP"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+
+ enewgroup qemu 77
+ enewuser qemu 77 -1 -1 qemu kvm
+
+ # Some people used the masked ebuild which was not adding the qemu
+ # user to the kvm group originally. This results in VMs failing to
+ # start for some users. bug #430808
+ egetent group kvm | grep -q qemu
+ if [[ $? -ne 0 ]]; then
+ gpasswd -a qemu kvm
+ fi
+
+ # Handle specific kernel versions for different features
+ kernel_is lt 3 5 && LXC_CONFIG_CHECK+=" ~USER_NS"
+ kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" || \
+ LXC_CONFIG_CHECK+=" ~MEMCG"
+
+ CONFIG_CHECK=""
+ use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}"
+ use macvtap && CONFIG_CHECK+="${MACVTAP}"
+ use virt-network && CONFIG_CHECK+="${VIRTNET_CONFIG_CHECK}"
+ if [[ -n ${CONFIG_CHECK} ]]; then
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ touch "${S}/.mailmap"
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
+ epatch
+
+ if [[ ${PV} = *9999* ]]; then
+
+ # git checkouts require bootstrapping to create the configure script.
+ # Additionally the submodules must be cloned to the right locations
+ # bug #377279
+ ./bootstrap || die "bootstrap failed"
+ (
+ git submodule status | sed 's/^[ +-]//;s/ .*//'
+ git hash-object bootstrap.conf
+ ) >.git-module-status
+ fi
+
+ epatch_user
+
+ [[ -n ${AUTOTOOLIZE} ]] && eautoreconf
+
+ # Tweak the init script
+ local avahi_init=
+ local iscsi_init=
+ local rbd_init=
+ local firewalld_init=
+ cp "${FILESDIR}/libvirtd.init-r11" "${S}/libvirtd.init"
+ use avahi && avahi_init='avahi-daemon'
+ use iscsi && iscsi_init='iscsid'
+ use rbd && rbd_init='ceph'
+ use firewalld && firewalld_init='need firewalld'
+
+ sed -e "s/USE_FLAG_FIREWALLD/${firewalld_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_AVAHI/${avahi_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_ISCSI/${iscsi_init}/" -i "${S}/libvirtd.init"
+ sed -e "s/USE_FLAG_RBD/${rbd_init}/" -i "${S}/libvirtd.init"
+}
+
+src_configure() {
+ local myconf=""
+
+ ## enable/disable daemon, otherwise client only utils
+ myconf="${myconf} $(use_with libvirtd)"
+
+ ## enable/disable the daemon using avahi to find VMs
+ myconf="${myconf} $(use_with avahi)"
+
+ ## hypervisors on the local host
+ myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
+ myconf+=" --without-xenapi"
+ if use xen && has_version ">=app-emulation/xen-tools-4.2.0"; then
+ myconf+=" --with-libxl"
+ else
+ myconf+=" --without-libxl"
+ fi
+ myconf="${myconf} $(use_with openvz)"
+ myconf="${myconf} $(use_with lxc)"
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then
+ myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/"
+ else
+ myconf="${myconf} $(use_with virtualbox vbox)"
+ fi
+ myconf="${myconf} $(use_with uml)"
+ myconf="${myconf} $(use_with qemu)"
+ myconf="${myconf} $(use_with qemu yajl)" # Use QMP over HMP
+ myconf="${myconf} $(use_with phyp)"
+ myconf="${myconf} --with-esx"
+ myconf="${myconf} --with-vmware"
+
+ ## additional host drivers
+ myconf="${myconf} $(use_with virt-network network)"
+ myconf="${myconf} --with-storage-fs"
+ myconf="${myconf} $(use_with lvm storage-lvm)"
+ myconf="${myconf} $(use_with iscsi storage-iscsi)"
+ myconf="${myconf} $(use_with parted storage-disk)"
+ myconf="${myconf} $(use_with lvm storage-mpath)"
+ myconf="${myconf} $(use_with rbd storage-rbd)"
+ myconf="${myconf} $(use_with numa numactl)"
+ myconf="${myconf} $(use_with numa numad)"
+ myconf="${myconf} $(use_with selinux)"
+
+ # udev for device support details
+ myconf="${myconf} $(use_with udev)"
+
+ # linux capability support so we don't need privileged accounts
+ myconf="${myconf} $(use_with caps capng)"
+
+ ## auth stuff
+ myconf="${myconf} $(use_with policykit polkit)"
+ myconf="${myconf} $(use_with sasl)"
+
+ # network bits
+ myconf="${myconf} $(use_with macvtap)"
+ myconf="${myconf} $(use_with pcap libpcap)"
+ myconf="${myconf} $(use_with vepa virtualport)"
+ myconf="${myconf} $(use_with firewalld)"
+
+ ## other
+ myconf="${myconf} $(use_enable nls)"
+ myconf="${myconf} $(use_with python)"
+
+ # user privilege bits fir qemu/kvm
+ if use caps; then
+ myconf="${myconf} --with-qemu-user=qemu"
+ myconf="${myconf} --with-qemu-group=qemu"
+ else
+ myconf="${myconf} --with-qemu-user=root"
+ myconf="${myconf} --with-qemu-group=root"
+ fi
+
+ # audit support
+ myconf="${myconf} $(use_with audit)"
+
+ ## stuff we don't yet support
+ myconf="${myconf} --without-netcf"
+
+ # we use udev over hal
+ myconf="${myconf} --without-hal"
+
+ # locking support
+ myconf="${myconf} --without-sanlock"
+
+ # this is a nasty trick to work around the problem in bug
+ # #275073. The reason why we don't solve this properly is that
+ # it'll require us to rebuild autotools (and we don't really want
+ # to do that right now). The proper solution has been sent
+ # upstream and should hopefully land in 0.7.7, in the mean time,
+ # mime the same functionality with this.
+ case ${CHOST} in
+ *cygwin* | *mingw* )
+ ;;
+ *)
+ ac_cv_prog_WINDRES=no
+ ;;
+ esac
+
+ econf \
+ ${myconf} \
+ --disable-static \
+ --docdir=/usr/share/doc/${PF} \
+ --with-remote \
+ --localstatedir=/var
+
+ if [[ ${PV} = *9999* ]]; then
+ # Restore gnulib's config.sub and config.guess
+ # bug #377279
+ (cd .gnulib && git reset --hard > /dev/null)
+ fi
+}
+
+src_test() {
+ # Explicitly allow parallel build of tests
+ export VIR_TEST_DEBUG=1
+ HOME="${T}" emake check || die "tests failed"
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ HTML_DIR=/usr/share/doc/${PF}/html \
+ DOCS_DIR=/usr/share/doc/${PF}/python \
+ EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \
+ || die "emake install failed"
+
+ find "${D}" -name '*.la' -delete || die
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ newinitd "${S}/libvirtd.init" libvirtd || die
+ newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die
+
+ keepdir /var/lib/libvirt/images
+}
+
+pkg_preinst() {
+ # we only ever want to generate this once
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
+ fi
+
+ # We really don't want to use or support old PolicyKit cause it
+ # screws with the new polkit integration
+ if has_version sys-auth/policykit; then
+ rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy
+ fi
+
+ # Only sysctl files ending in .conf work
+ mv "${D}"/etc/sysctl.d/libvirtd "${D}"/etc/sysctl.d/libvirtd.conf
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize libvirt.py
+
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
+ fi
+
+ # support for dropped privileges
+ if use qemu; then
+ fperms 0750 "${EROOT}/var/lib/libvirt/qemu"
+ fperms 0750 "${EROOT}/var/cache/libvirt/qemu"
+ fi
+
+ if use caps && use qemu; then
+ fowners -R qemu:qemu "${EROOT}/var/lib/libvirt/qemu"
+ fowners -R qemu:qemu "${EROOT}/var/cache/libvirt/qemu"
+ elif use qemu; then
+ fowners -R root:root "${EROOT}/var/lib/libvirt/qemu"
+ fowners -R root:root "${EROOT}/var/cache/libvirt/qemu"
+ fi
+
+ if ! use policykit; then
+ elog "To allow normal users to connect to libvirtd you must change the"
+ elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
+ fi
+
+ use libvirtd || return 0
+ # From here, only libvirtd-related instructions, be warned!
+
+ elog
+ elog "For the basic networking support (bridged and routed networks)"
+ elog "you don't need any extra software. For more complex network modes"
+ elog "including but not limited to NATed network, you can enable the"
+ elog "'virt-network' USE flag."
+ elog
+ if has_version net-dns/dnsmasq; then
+ ewarn "If you have a DNS server setup on your machine, you will have"
+ ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
+ ewarn " bind-interfaces"
+ ewarn " interface or except-interface"
+ ewarn
+ ewarn "Otherwise you might have issues with your existing DNS server."
+ fi
+
+ if use caps && use qemu; then
+ elog "libvirt will now start qemu/kvm VMs with non-root privileges."
+ elog "Ensure any resources your VMs use are accessible by qemu:qemu"
+ fi
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup libvirt.py
+}