parent
ce65813912
commit
c847adb4ce
@ -1,52 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/ec2-ami-tools/ec2-ami-tools-1.4.0.5-r3.ebuild,v 1.2 2014/08/10 01:37:43 patrick Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit versionator
|
||||
|
||||
DESCRIPTION="These command-line tools serve as the client interface to the Amazon EC2 web service"
|
||||
HOMEPAGE="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=368&categoryID=88"
|
||||
SRC_URI="http://s3.amazonaws.com/ec2-downloads/${P}.zip"
|
||||
|
||||
LICENSE="Amazon
|
||||
|| ( Ruby GPL-2 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
ruby_slot="1.9"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND="dev-lang/ruby:${ruby_slot}[ssl]
|
||||
net-misc/rsync
|
||||
net-misc/curl"
|
||||
|
||||
src_prepare() {
|
||||
# Simplify the scripts to always run Ruby 19, since Gentoo supports
|
||||
# alternative implementations as well it is not guaranteed that ruby is ruby19.
|
||||
sed -i -e "\$s:^ruby:exec ruby${ruby_slot/./}:" bin/* || die 'Sed failed.'
|
||||
|
||||
# Remove a left behind license file.
|
||||
rm lib/ec2/oem/LICENSE.txt || die 'Removal of LICENSE failed.'
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/*
|
||||
|
||||
insinto /usr
|
||||
doins -r lib
|
||||
|
||||
insinto /etc/ec2/amitools
|
||||
doins etc/ec2/amitools/*
|
||||
|
||||
dodir /etc/env.d
|
||||
echo "EC2_AMITOOL_HOME=/usr" >> "${T}"/99${PN} || die "Can't write environment variable."
|
||||
doenvd "${T}"/99${PN}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Remember to run \`env-update && source /etc/profile\` if you plan"
|
||||
ewarn "to use these tools in a shell before logging out (or restarting"
|
||||
ewarn "your login manager)."
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/mcelog/mcelog-117.ebuild,v 1.1 2015/05/14 00:00:04 hasufell Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit linux-info eutils systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="A tool to log and decode Machine Check Exceptions"
|
||||
HOMEPAGE="http://mcelog.org/"
|
||||
SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="selinux"
|
||||
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mcelog )"
|
||||
|
||||
CONFIG_CHECK="~X86_MCE"
|
||||
|
||||
# TODO: add mce-inject to the tree to support test phase
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
|
||||
"${FILESDIR}"/${PN}-1.0_pre3_p20120918-build.patch \
|
||||
"${FILESDIR}"/${PN}-1.0_pre3_p20120918-bashism.patch
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
insinto /etc/cron.daily
|
||||
newins ${PN}.cron ${PN}
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins ${PN}.logrotate ${PN}
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
|
||||
dodoc *.pdf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "The default configuration set is now installed in /etc/${PN}"
|
||||
einfo "you might want to edit those files."
|
||||
einfo
|
||||
einfo "A sample cronjob is installed into /etc/cron.daily"
|
||||
einfo "without executable bit (system service is the preferred method now)"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/cfv/cfv-1.18.3.ebuild,v 1.5 2012/12/02 22:17:29 swegener Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
PYTHON_DEPEND="2"
|
||||
|
||||
inherit python
|
||||
|
||||
DESCRIPTION="Utility to test and create .sfv, .csv, .crc and md5sum files"
|
||||
HOMEPAGE="http://cfv.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/cfv/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="bittorrent"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="dev-python/python-fchksum
|
||||
bittorrent? (
|
||||
|| (
|
||||
net-p2p/bittorrent
|
||||
net-p2p/bittornado
|
||||
)
|
||||
)"
|
||||
|
||||
src_compile() {
|
||||
true
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin cfv || die "dobin failed"
|
||||
doman cfv.1 || die "doman failed"
|
||||
dodoc README Changelog || die "dodoc failed"
|
||||
python_convert_shebangs -r 2 "${ED}"
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/deltarpm/deltarpm-3.6_pre20110223.ebuild,v 1.1 2012/05/15 08:41:59 pacho Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2:2.7"
|
||||
|
||||
inherit eutils toolchain-funcs python
|
||||
|
||||
SNAPSHOT="20110223"
|
||||
|
||||
DESCRIPTION="tools to create and apply deltarpms"
|
||||
HOMEPAGE="http://gitorious.org/deltarpm/deltarpm"
|
||||
SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}/${PN}-git-${SNAPSHOT}.tar.bz2/70f8884be63614ca7c3fc888cf20ebc8/${PN}-git-${SNAPSHOT}.tar.bz2"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="python"
|
||||
|
||||
DEPEND="sys-libs/zlib
|
||||
app-arch/xz-utils
|
||||
app-arch/bzip2
|
||||
<app-arch/rpm-5"
|
||||
|
||||
S="${WORKDIR}/${PN}-git-${SNAPSHOT}"
|
||||
|
||||
pkg_setup() {
|
||||
if use python; then
|
||||
python_set_active_version 2
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e '/^prefix/s:/local::' \
|
||||
-e '/^mandir/s:/man:/share/man:' \
|
||||
Makefile || die
|
||||
epatch "${FILESDIR}/3.6_pre20110223-build.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
|
||||
|
||||
if use python; then
|
||||
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" python
|
||||
fi
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r1.ebuild,v 1.4 2011/03/05 23:46:44 arfrever Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.*"
|
||||
|
||||
inherit distutils eutils toolchain-funcs versionator
|
||||
|
||||
MY_P="${PN}-$(get_version_component_range 3)"
|
||||
|
||||
DESCRIPTION="Tools for working with the ipkg binary package format"
|
||||
HOMEPAGE="http://www.openembedded.org/"
|
||||
SRC_URI="http://handhelds.org/download/packages/ipkg-utils/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~x86"
|
||||
IUSE="minimal"
|
||||
|
||||
DEPEND="!minimal? (
|
||||
app-crypt/gnupg
|
||||
net-misc/curl
|
||||
)"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
PYTHON_MODNAME="ipkg.py"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-tar_call_fixes.patch"
|
||||
epatch "${FILESDIR}/${P}-hashlib.patch"
|
||||
|
||||
sed '/python setup.py build/d' -i Makefile
|
||||
|
||||
if use minimal; then
|
||||
elog "ipkg-upload is not installed when the \`minimal' USE flag is set. If you"
|
||||
elog "need ipkg-upload then rebuild this package without the \`minimal' USE flag."
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
distutils_src_compile
|
||||
emake CC="$(tc-getCC)" || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
use minimal && rm "${ED}usr/bin/ipkg-upload"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
distutils_pkg_postinst
|
||||
|
||||
elog "Consider installing sys-apps/fakeroot for use with the ipkg-build command,"
|
||||
elog "that makes it possible to build packages as a normal user."
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma/lzma-4.63.ebuild,v 1.3 2012/11/19 12:50:45 jer Exp $
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="LZMA Stream Compressor from the SDK"
|
||||
HOMEPAGE="http://www.7-zip.org/sdk.html"
|
||||
SRC_URI="mirror://sourceforge/sevenzip/${PN}463.tar.bz2"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~arm ~amd64 ~ia64 ~mips ~sparc ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_compile() {
|
||||
cd CPP/7zip/Compress/LZMA_Alone
|
||||
emake -f makefile.gcc \
|
||||
CXX="$(tc-getCXX) ${CXXFLAGS}" \
|
||||
CXX_C="$(tc-getCC) ${CFLAGS}" \
|
||||
|| die "Make failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin CPP/7zip/Compress/LZMA_Alone/lzma lzma_alone|| die
|
||||
dodoc history.txt
|
||||
use doc && dodoc 7zC.txt 7zFormat.txt lzma.txt Methods.txt
|
||||
|
||||
einfo "Starting from app-arch/lzma version 4.63 binary name was changed"
|
||||
einfo "to /usr/bin/lzma_alone to avoid conflict with lzma-utils package"
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/lzma/lzma-4.65.ebuild,v 1.3 2012/11/19 12:50:45 jer Exp $
|
||||
|
||||
inherit toolchain-funcs versionator
|
||||
|
||||
MY_P="${PN}$(replace_all_version_separators '')"
|
||||
DESCRIPTION="LZMA Stream Compressor from the SDK"
|
||||
HOMEPAGE="http://www.7-zip.org/sdk.html"
|
||||
SRC_URI="mirror://sourceforge/sevenzip/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~ia64 ~mips ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
IUSE="doc"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_compile() {
|
||||
cd CPP/7zip/Compress/LZMA_Alone
|
||||
emake -f makefile.gcc \
|
||||
CXX="$(tc-getCXX) ${CXXFLAGS}" \
|
||||
CXX_C="$(tc-getCC) ${CFLAGS}" \
|
||||
|| die "Make failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin CPP/7zip/Compress/LZMA_Alone/lzma lzma_alone || die
|
||||
dodoc history.txt
|
||||
use doc && dodoc 7zC.txt 7zFormat.txt lzma.txt Methods.txt
|
||||
|
||||
einfo "Starting from app-arch/lzma version 4.63 binary name was changed"
|
||||
einfo "to /usr/bin/lzma_alone to avoid conflict with lzma-utils package"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/ppmd/ppmd-9.1_p16.ebuild,v 1.2 2013/03/13 22:06:59 tomwij Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs
|
||||
|
||||
PATCHV="${P##*_p}"
|
||||
MY_P="${P%%_*}"
|
||||
MY_P="${MY_P/-/_}"
|
||||
|
||||
DESCRIPTION="PPM based compressor -- better behaved than bzip2"
|
||||
HOMEPAGE="http://packages.qa.debian.org/p/ppmd.html"
|
||||
SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.gz
|
||||
mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${PATCHV}.debian.tar.gz"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="-alpha -amd64 ~hppa -ia64 ~mips ~ppc ~sparc ~x86 ~x86-interix -amd64-linux -ia64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
S=${WORKDIR}/${PN}-i1
|
||||
|
||||
src_prepare() {
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX=patch epatch "${WORKDIR}"/debian/patches/
|
||||
epatch "${FILESDIR}/${PN}-p10-makefile.patch"
|
||||
sed b/Makefile \
|
||||
-e 's|$(CXX)|& $(CFLAGS) $(LDFLAGS)|g' > Makefile \
|
||||
|| die "sed b/Makefile"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CXX
|
||||
replace-flags -O3 -O2
|
||||
append-flags -fno-inline-functions -fno-exceptions -fno-rtti
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 install DESTDIR="${ED}" || die "failed installing"
|
||||
doman "${WORKDIR}/debian/ppmd.1" || die "failed installing manpage"
|
||||
dodoc "read_me.txt" || die "failed installed readme"
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/threadzip/threadzip-1.2.ebuild,v 1.1 2014/01/29 08:38:18 vapier Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit python-single-r1
|
||||
|
||||
DESCRIPTION="threaded compressor logic for zlib/lzma"
|
||||
HOMEPAGE="http://code.google.com/p/threadzip/"
|
||||
SRC_URI="http://threadzip.googlecode.com/files/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="lzma"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="lzma? ( dev-python/pylzma[${PYTHON_USEDEP}] )"
|
||||
|
||||
src_install() {
|
||||
local x
|
||||
for x in un '' ; do
|
||||
newbin python/thread${x}zip.py thread${x}zip
|
||||
done
|
||||
python_fix_shebang "${ED}"/usr/bin
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
DIST lzma465.tar.bz2 288122 SHA256 c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e SHA512 690f005cfa9d3a65db03baddad57cf8dd79f861ac72d2e1bc18a151f3673d5f8043e3331f5dc3fba713dfd7b01ebf0817a2c0b6a1b22e1f7d8255a42b85ea4ac WHIRLPOOL 34a08888ac6874c1ac4ff181774b02eec993cc90a28531596122183c975c2e29fd9852d066acd24c0fe1f213ae9e03e7daf3fc9417c587043e968d973551027f
|
||||
DIST upx-3.09-src.tar.bz2 884001 SHA256 f61a95694d9b8f8c486ee25c9cceab483b9262a29d6ed31c8d3ae4aca0f55c9a SHA512 5dfc4587cb6e0c1f668f7363eccbda0a329e5438837c22afe5b66e1b7d6a2502ec911013efc1ceb91186b6af2e0a590df2de5260fefde7fba49544ded3e66a25 WHIRLPOOL 760edbbeba8874dbae85d893e2f7b944ea2d3a8862a6c3f21e3a6c27f557f12ed12998a9f6f29c108849ce830e882d51447739365bb033c14c24fa7dad4df972
|
||||
DIST upx-3.91-src.tar.bz2 904747 SHA256 527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c SHA512 7e9a392fe11daf7baf9632f2c448ef9936da7dfab215f86ba417e9f097770949acb653aaabe6cc5ed812efc486cb35e0c1e128c80026b02825713d8b12251cf5 WHIRLPOOL 1e20491528c9c7da50985c4484c0062799a243adebfd8292ea3c136b93d865842e85e164e15f1005d0e821b83aa7162e7113553cafd5f0b584d9b08aa6c7938e
|
||||
EBUILD upx-ucl-3.09.ebuild 1066 SHA256 0399ee01f442d743a9c30992e6fa48a9fe52a88cdec3ace488f67d0bb4dc1eb1 SHA512 8716fdd32add5474530ea4d30b910cc8e35b0ef007cd8c70bafe40feeaaa36bbc644b2f47a90086e6aae84ce6d8a0be2a851248f828e61d98913ad2d8cfdb1f2 WHIRLPOOL 1d393876d6365af3d27275d728ef6f12bd40272a8cc4bcde99191a63e97e1b9a68d051893ccad821fa7b125dbe89d84d2d95451f39b8a6362cad7f2e1bf0a7c3
|
||||
EBUILD upx-ucl-3.91.ebuild 1067 SHA256 a79f7d51ae7545eaa72d9f00abf72a31df811c36d46cc423e6f1d0c7bace479c SHA512 54a05d59191283a6bab9a47e11425ff616da9007e10e2d1a331a04f41f0f342f128c87430b8c0b493042de306aa138fbba2cecf834beba03b0163fb7c026885a WHIRLPOOL 16eadda425f9be44e9e908375fc8d985101cf1f00c549cabec451e52032b2f654d203604bbfe1268ef34cea79cef5968829cb89ad990efa7e887d7ce6989b004
|
||||
MISC ChangeLog 4075 SHA256 7223aa103049516b8ba3c855051dfae0bb9ad641dac109f5895077a0d3c42d68 SHA512 1295130b414bd45c0dded40acacd4322598c2e1ba1398a0367049b79d3e5b34984a631aa0c3f9d49af94c46988e8520309f72fe25b61970a8fc3df19952d97a0 WHIRLPOOL 973563e7d1efdaa8f05409eaaf4232b74be367b27814d528a7a85cba564ad3f73007d522645b66120f1606c2ba32cabea42248e5aee71037bda9707b59f01225
|
||||
MISC ChangeLog 4161 SHA256 4bfbd065d776d329e96fa4da84d8c3ad347b19aed080fa68e551ba7a73b5aa9a SHA512 101250cb23e3de5cd22921f0bbaad317c2150082b68b5b655d41fe68e013605d079a523fc9b4a169c82b3e7468e99a1d5207597766793049bccc8a018e7d33d6 WHIRLPOOL 7c266bd45a13b8c0e20852e0c7e81f47fb8add727abedd54cb9ff3b990866147b71a16598dfb9eb1f524f040f5c17eefaa358c4a572a01b3dc9376231618ea1e
|
||||
MISC metadata.xml 318 SHA256 37f64dccfce1c3615620849d708b17548b8d0e1728742c96d05b5a98d8a3cefd SHA512 347b416609e002129a9958c04ec371bdb54527d720fec459c1a7807dbb1911f9d8888cbca22300f0582cdc709cae68beb6ea11f8196901ccb675f5e25e0d94a5 WHIRLPOOL d244f727b265f9cf8cd2f5bb887679dc14c8918b78ded512a80d38e4de5a4ce3530bfa0f24436554324f3d9ad69d37ebf0afef6c659ca06fb63071d28cafb097
|
||||
|
@ -1,44 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-arch/upx-ucl/upx-ucl-3.09.ebuild,v 1.2 2013/03/13 22:20:37 tomwij Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit eutils toolchain-funcs flag-o-matic
|
||||
|
||||
LZMA_VER=465
|
||||
#LZMA_VER=920
|
||||
MY_P="${P/-ucl}-src"
|
||||
DESCRIPTION="Ultimate Packer for eXecutables (free version using UCL compression and not NRV)"
|
||||
HOMEPAGE="http://upx.sourceforge.net/"
|
||||
SRC_URI="http://upx.sourceforge.net/download/${MY_P}.tar.bz2
|
||||
lzma? ( mirror://sourceforge/sevenzip/lzma${LZMA_VER}.tar.bz2 )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
|
||||
IUSE="lzma zlib"
|
||||
|
||||
RDEPEND=">=dev-libs/ucl-1.02
|
||||
!app-arch/upx
|
||||
!app-arch/upx-bin"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_configure() {
|
||||
use zlib && append-cppflags -DWITH_ZLIB=1
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export CXX
|
||||
emake UPX_LZMADIR="${WORKDIR}" all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin src/upx.out upx
|
||||
dodoc BUGS NEWS PROJECTS README* THANKS TODO doc/*.txt
|
||||
dohtml doc/upx.html
|
||||
doman doc/upx.1
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
From 29236f84aca64be72c97a9b5513457a4e45afbc6 Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Mon, 11 May 2015 16:14:58 +0200
|
||||
Subject: [PATCH] Implement cmd_confirm in terms of cmd_message.
|
||||
|
||||
* pinentry/pinentry.c (cmd_confirm): Implement cmd_confirm in terms of
|
||||
cmd_message.
|
||||
---
|
||||
pinentry/pinentry.c | 22 +---------------------
|
||||
1 file changed, 1 insertion(+), 21 deletions(-)
|
||||
|
||||
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
|
||||
index f28c576..11a8027 100644
|
||||
--- a/pinentry/pinentry.c
|
||||
+++ b/pinentry/pinentry.c
|
||||
@@ -1146,27 +1146,7 @@ cmd_confirm (ASSUAN_CONTEXT ctx, char *line)
|
||||
static int
|
||||
cmd_message (ASSUAN_CONTEXT ctx, char *line)
|
||||
{
|
||||
- int result;
|
||||
-
|
||||
- pinentry.one_button = 1;
|
||||
- pinentry.quality_bar = 0;
|
||||
- pinentry.close_button = 0;
|
||||
- pinentry.locale_err = 0;
|
||||
- pinentry.specific_err = 0;
|
||||
- result = (*pinentry_cmd_handler) (&pinentry);
|
||||
- if (pinentry.error)
|
||||
- {
|
||||
- free (pinentry.error);
|
||||
- pinentry.error = NULL;
|
||||
- }
|
||||
-
|
||||
- if (pinentry.close_button)
|
||||
- assuan_write_status (ctx, "BUTTON_INFO", "close");
|
||||
-
|
||||
- return result ? 0
|
||||
- : (pinentry.specific_err? pinentry.specific_err :
|
||||
- pinentry.locale_err? ASSUAN_Locale_Problem
|
||||
- : 0);
|
||||
+ return cmd_confirm (ctx, "--one-button");
|
||||
}
|
||||
|
||||
/* GETINFO <what>
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 3062742b945f95d72001896f8ba5468b9e63aa9b Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Wed, 13 May 2015 14:20:23 +0200
|
||||
Subject: [PATCH 1/1] Don't interpret the handler's return value as the
|
||||
passphrase's length.
|
||||
|
||||
* pinentry/pinentry.c (cmd_getpin): Don't interpret the return value
|
||||
as the passphrase length. Use strlen instead.
|
||||
---
|
||||
pinentry/pinentry.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
|
||||
index 53216fc..836ee14 100644
|
||||
--- a/pinentry/pinentry.c
|
||||
+++ b/pinentry/pinentry.c
|
||||
@@ -1109,7 +1109,7 @@ cmd_getpin (ASSUAN_CONTEXT ctx, char *line)
|
||||
{
|
||||
if (pinentry.repeat_okay)
|
||||
assuan_write_status (ctx, "PIN_REPEATED", "");
|
||||
- result = assuan_send_data (ctx, pinentry.pin, result);
|
||||
+ result = assuan_send_data (ctx, pinentry.pin, strlen(pinentry.pin));
|
||||
if (!result)
|
||||
result = assuan_send_data (ctx, NULL, 0);
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,104 @@
|
||||
From 496235af8dfd373b54e5610f86bf1cada175ac23 Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Wed, 13 May 2015 21:47:11 +0200
|
||||
Subject: [PATCH 1/1] Fix linking order to work when linked with --as-needed.
|
||||
|
||||
* curses/Makefile.am (LDADD): Add $(COMMON_LIBS) after all of the
|
||||
local objects and object archives.
|
||||
* gnome3/Makefile.am (LDADD): Likewise.
|
||||
* gtk+-2/Makefile.am (LDADD): Likewise.
|
||||
* qt4/Makefile.am (pinentry_qt4_LDADD): Likewise.
|
||||
* tty/Makefile.am (LDADD): Likewise.
|
||||
|
||||
Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
||||
---
|
||||
curses/Makefile.am | 5 ++---
|
||||
gnome3/Makefile.am | 5 ++---
|
||||
gtk+-2/Makefile.am | 5 ++---
|
||||
qt4/Makefile.am | 6 +++---
|
||||
tty/Makefile.am | 4 ++--
|
||||
5 files changed, 11 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/curses/Makefile.am b/curses/Makefile.am
|
||||
index e8ea031..4d764c7 100644
|
||||
--- a/curses/Makefile.am
|
||||
+++ b/curses/Makefile.am
|
||||
@@ -22,9 +22,8 @@
|
||||
bin_PROGRAMS = pinentry-curses
|
||||
|
||||
AM_CPPFLAGS = $(COMMON_CFLAGS) $(NCURSES_INCLUDE) -I$(top_srcdir)/pinentry
|
||||
-LDADD = $(COMMON_LIBS) \
|
||||
- ../pinentry/libpinentry.a ../pinentry/libpinentry-curses.a \
|
||||
+LDADD = ../pinentry/libpinentry.a ../pinentry/libpinentry-curses.a \
|
||||
../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
- $(LIBCAP) $(LIBCURSES) $(LIBICONV)
|
||||
+ $(COMMON_LIBS) $(LIBCAP) $(LIBCURSES) $(LIBICONV)
|
||||
|
||||
pinentry_curses_SOURCES = pinentry-curses.c
|
||||
diff --git a/gnome3/Makefile.am b/gnome3/Makefile.am
|
||||
index 78df706..46639de 100644
|
||||
--- a/gnome3/Makefile.am
|
||||
+++ b/gnome3/Makefile.am
|
||||
@@ -32,8 +32,7 @@ endif
|
||||
AM_CPPFLAGS = $(COMMON_CFLAGS) $(GNOME3CFLAGS) \
|
||||
$(ncurses_include) -I$(top_srcdir)/assuan \
|
||||
-I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
|
||||
-LDADD = $(COMMON_LIBS) \
|
||||
- ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
- $(LIBCAP) $(GNOME3LIBS) $(libcurses)
|
||||
+LDADD = ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
+ $(COMMON_LIBS) $(LIBCAP) $(GNOME3LIBS) $(libcurses)
|
||||
|
||||
pinentry_gnome3_SOURCES = pinentry-gnome3.c
|
||||
diff --git a/gtk+-2/Makefile.am b/gtk+-2/Makefile.am
|
||||
index c98139f..7e37469 100644
|
||||
--- a/gtk+-2/Makefile.am
|
||||
+++ b/gtk+-2/Makefile.am
|
||||
@@ -31,9 +31,8 @@ endif
|
||||
|
||||
AM_CPPFLAGS = $(COMMON_CFLAGS) $(GTK2CFLAGS) $(ncurses_include) \
|
||||
-I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
|
||||
-LDADD = $(COMMON_LIBS) \
|
||||
- ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
- $(LIBCAP) $(GTK2LIBS) $(libcurses)
|
||||
+LDADD = ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
+ $(COMMON_LIBS) $(LIBCAP) $(GTK2LIBS) $(libcurses)
|
||||
|
||||
pinentry_gtk_2_SOURCES = pinentry-gtk-2.c \
|
||||
gtksecentry.c gtksecentry.h gseal-gtk-compat.h
|
||||
diff --git a/qt4/Makefile.am b/qt4/Makefile.am
|
||||
index 31274bb..816aade 100644
|
||||
--- a/qt4/Makefile.am
|
||||
+++ b/qt4/Makefile.am
|
||||
@@ -38,10 +38,10 @@ AM_CPPFLAGS = $(COMMON_CFLAGS) \
|
||||
-I$(top_srcdir) -I$(top_srcdir)/assuan -I$(top_srcdir)/secmem \
|
||||
$(ncurses_include) -I$(top_srcdir)/pinentry
|
||||
AM_CXXFLAGS = $(QT4_CORE_CFLAGS) $(QT4_GUI_CFLAGS)
|
||||
-pinentry_qt4_LDADD = $(COMMON_LIBS) \
|
||||
- $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) \
|
||||
+pinentry_qt4_LDADD = \
|
||||
../pinentry/libpinentry.a $(top_builddir)/assuan/libassuan.a \
|
||||
- $(top_builddir)/secmem/libsecmem.a $(LIBCAP)
|
||||
+ $(top_builddir)/secmem/libsecmem.a \
|
||||
+ $(COMMON_LIBS) $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) $(LIBCAP)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
pinentryconfirm.moc qsecurelineedit.moc pinentrydialog.moc
|
||||
diff --git a/tty/Makefile.am b/tty/Makefile.am
|
||||
index 798c08f..aa805b2 100644
|
||||
--- a/tty/Makefile.am
|
||||
+++ b/tty/Makefile.am
|
||||
@@ -21,8 +21,8 @@
|
||||
bin_PROGRAMS = pinentry-tty
|
||||
|
||||
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)/pinentry
|
||||
-LDADD = $(COMMON_LIBS) ../pinentry/libpinentry.a \
|
||||
+LDADD = ../pinentry/libpinentry.a \
|
||||
../assuan/libassuan.a ../secmem/libsecmem.a \
|
||||
- $(LIBCAP) $(LIBICONV)
|
||||
+ $(COMMON_LIBS) $(LIBCAP) $(LIBICONV)
|
||||
|
||||
pinentry_tty_SOURCES = pinentry-tty.c
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,136 @@
|
||||
From bdd81974633f8e31d582b62999ef9b004bc3b95e Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Wed, 13 May 2015 13:52:03 +0200
|
||||
Subject: [PATCH 1/1] Make the management of pinentry.pin more explicit.
|
||||
|
||||
* pinentry/pinentry.c: Include <assert.h>.
|
||||
(pinentry): Set pin_len to 0.
|
||||
(pinentry_setbufferlen): If len is less than 2048, set it to 2048.
|
||||
Add an assertion.
|
||||
(pinentry_setbuffer_clear): New function that releases the pin buffer.
|
||||
(pinentry_setbuffer_init): New function that initializes the pin
|
||||
buffer.
|
||||
(cmd_getpin): Use pinentry_setbuffer_init and pinentry_setbuffer_clear
|
||||
instead of manual memory management.
|
||||
(cmd_confirm): Use pinentry_setbuffer_clear instead of manual memory
|
||||
management.
|
||||
---
|
||||
pinentry/pinentry.c | 52 +++++++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 39 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
|
||||
index 3a44851..53216fc 100644
|
||||
--- a/pinentry/pinentry.c
|
||||
+++ b/pinentry/pinentry.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <assert.h>
|
||||
#ifndef HAVE_W32CE_SYSTEM
|
||||
# include <locale.h>
|
||||
#endif
|
||||
@@ -67,7 +68,7 @@ struct pinentry pinentry =
|
||||
NULL, /* Not-Ok button. */
|
||||
NULL, /* Cancel button. */
|
||||
NULL, /* PIN. */
|
||||
- 2048, /* PIN length. */
|
||||
+ 0, /* PIN length. */
|
||||
0, /* pin_from_cache. */
|
||||
0, /* Display. */
|
||||
0, /* TTY name. */
|
||||
@@ -354,8 +355,18 @@ char *
|
||||
pinentry_setbufferlen (pinentry_t pin, int len)
|
||||
{
|
||||
char *newp;
|
||||
- if (len < pinentry.pin_len)
|
||||
+
|
||||
+ if (pin->pin_len)
|
||||
+ assert (pin->pin);
|
||||
+ else
|
||||
+ assert (!pin->pin);
|
||||
+
|
||||
+ if (len < 2048)
|
||||
+ len = 2048;
|
||||
+
|
||||
+ if (len <= pin->pin_len)
|
||||
return NULL;
|
||||
+
|
||||
newp = secmem_realloc (pin->pin, len);
|
||||
if (newp)
|
||||
{
|
||||
@@ -371,6 +382,28 @@ pinentry_setbufferlen (pinentry_t pin, int len)
|
||||
return newp;
|
||||
}
|
||||
|
||||
+static void
|
||||
+pinentry_setbuffer_clear (pinentry_t pin)
|
||||
+{
|
||||
+ if (! pin->pin)
|
||||
+ {
|
||||
+ assert (pin->pin_len == 0);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ assert (pin->pin_len > 0);
|
||||
+
|
||||
+ secmem_free (pin->pin);
|
||||
+ pin->pin = NULL;
|
||||
+ pin->pin_len = 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+pinentry_setbuffer_init (pinentry_t pin)
|
||||
+{
|
||||
+ pinentry_setbuffer_clear (pin);
|
||||
+ pinentry_setbufferlen (pin, 0);
|
||||
+}
|
||||
|
||||
/* Initialize the secure memory subsystem, drop privileges and return.
|
||||
Must be called early. */
|
||||
@@ -983,7 +1016,7 @@ cmd_getpin (ASSUAN_CONTEXT ctx, char *line)
|
||||
int set_prompt = 0;
|
||||
int just_read_password_from_cache = 0;
|
||||
|
||||
- pinentry.pin = secmem_malloc (pinentry.pin_len);
|
||||
+ pinentry_setbuffer_init (&pinentry);
|
||||
if (!pinentry.pin)
|
||||
return ASSUAN_Out_Of_Core;
|
||||
|
||||
@@ -1065,11 +1098,7 @@ cmd_getpin (ASSUAN_CONTEXT ctx, char *line)
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
- if (pinentry.pin)
|
||||
- {
|
||||
- secmem_free (pinentry.pin);
|
||||
- pinentry.pin = NULL;
|
||||
- }
|
||||
+ pinentry_setbuffer_clear (&pinentry);
|
||||
if (pinentry.specific_err)
|
||||
return pinentry.specific_err;
|
||||
return pinentry.locale_err? ASSUAN_Locale_Problem: ASSUAN_Canceled;
|
||||
@@ -1094,11 +1123,7 @@ cmd_getpin (ASSUAN_CONTEXT ctx, char *line)
|
||||
password_cache_save (pinentry.keyinfo, pinentry.pin);
|
||||
}
|
||||
|
||||
- if (pinentry.pin)
|
||||
- {
|
||||
- secmem_free (pinentry.pin);
|
||||
- pinentry.pin = NULL;
|
||||
- }
|
||||
+ pinentry_setbuffer_clear (&pinentry);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1122,6 +1147,7 @@ cmd_confirm (ASSUAN_CONTEXT ctx, char *line)
|
||||
pinentry.locale_err = 0;
|
||||
pinentry.specific_err = 0;
|
||||
pinentry.canceled = 0;
|
||||
+ pinentry_setbuffer_clear (&pinentry);
|
||||
result = (*pinentry_cmd_handler) (&pinentry);
|
||||
if (pinentry.error)
|
||||
{
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,32 @@
|
||||
From aa04dac66f2ee949e8789a3c91090b01646f2e57 Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Mon, 11 May 2015 16:14:18 +0200
|
||||
Subject: [PATCH] Fix memory allocation in pinentry_setbufferlen.
|
||||
|
||||
* pinentry/pinentry.c (pinentry_setbufferlen): Set PIN->PIN to a
|
||||
buffer that is LEN bytes large, not 2 * PIN->PIN_LENGTH.
|
||||
---
|
||||
pinentry/pinentry.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
|
||||
index 51c873c..f28c576 100644
|
||||
--- a/pinentry/pinentry.c
|
||||
+++ b/pinentry/pinentry.c
|
||||
@@ -356,11 +356,11 @@ pinentry_setbufferlen (pinentry_t pin, int len)
|
||||
char *newp;
|
||||
if (len < pinentry.pin_len)
|
||||
return NULL;
|
||||
- newp = secmem_realloc (pin->pin, 2 * pin->pin_len);
|
||||
+ newp = secmem_realloc (pin->pin, len);
|
||||
if (newp)
|
||||
{
|
||||
pin->pin = newp;
|
||||
- pin->pin_len *= 2;
|
||||
+ pin->pin_len = len;
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,48 @@
|
||||
From 831782b3b625ca81624fae0ee184da0d2fc46d96 Mon Sep 17 00:00:00 2001
|
||||
From: "Neal H. Walfield" <neal@gnu.org>
|
||||
Date: Mon, 11 May 2015 16:35:12 +0200
|
||||
Subject: [PATCH 1/1] Simplify code.
|
||||
|
||||
* pinentry/pinentry.c (cmd_confirm): Don't use nested ternary
|
||||
expressions.
|
||||
---
|
||||
pinentry/pinentry.c | 23 +++++++++++++++--------
|
||||
1 file changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
|
||||
index 11a8027..3a44851 100644
|
||||
--- a/pinentry/pinentry.c
|
||||
+++ b/pinentry/pinentry.c
|
||||
@@ -1132,14 +1132,21 @@ cmd_confirm (ASSUAN_CONTEXT ctx, char *line)
|
||||
if (pinentry.close_button)
|
||||
assuan_write_status (ctx, "BUTTON_INFO", "close");
|
||||
|
||||
- return result ? 0
|
||||
- : (pinentry.specific_err? pinentry.specific_err :
|
||||
- pinentry.locale_err? ASSUAN_Locale_Problem
|
||||
- : (pinentry.one_button
|
||||
- ? 0
|
||||
- : (pinentry.canceled
|
||||
- ? ASSUAN_Canceled
|
||||
- : ASSUAN_Not_Confirmed)));
|
||||
+ if (result)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (pinentry.specific_err)
|
||||
+ return pinentry.specific_err;
|
||||
+
|
||||
+ if (pinentry.locale_err)
|
||||
+ return ASSUAN_Locale_Problem;
|
||||
+
|
||||
+ if (pinentry.one_button)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (pinentry.canceled)
|
||||
+ return ASSUAN_Canceled;
|
||||
+ return ASSUAN_Not_Confirmed;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
@ -0,0 +1,93 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-crypt/pinentry/pinentry-0.9.2-r1.ebuild,v 1.1 2015/05/14 08:12:20 k_f Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit qmake-utils autotools multilib eutils flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol"
|
||||
HOMEPAGE="http://gnupg.org/aegypten2/index.html"
|
||||
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="clipboard gtk ncurses qt4 caps gnome-keyring static"
|
||||
|
||||
RDEPEND="
|
||||
app-eselect/eselect-pinentry
|
||||
caps? ( sys-libs/libcap )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
ncurses? ( sys-libs/ncurses )
|
||||
qt4? ( >=dev-qt/qtgui-4.4.1:4 )
|
||||
static? ( >=sys-libs/ncurses-5.7-r5[static-libs,-gpm] )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/gettext
|
||||
gtk? ( virtual/pkgconfig )
|
||||
qt4? ( virtual/pkgconfig )
|
||||
gnome-keyring? ( app-crypt/libsecret )
|
||||
"
|
||||
REQUIRED_USE="
|
||||
|| ( ncurses gtk qt4 )
|
||||
gtk? ( !static )
|
||||
qt4? ( !static )
|
||||
static? ( ncurses )
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-0.8.2-ncurses.patch"
|
||||
epatch "${FILESDIR}/${P}-handlers-return.patch"
|
||||
epatch "${FILESDIR}/${P}-gnome3.patch"
|
||||
epatch "${FILESDIR}/${P}-simplify.patch"
|
||||
epatch "${FILESDIR}/${P}-cmd_confirm.patch"
|
||||
epatch "${FILESDIR}/${P}-memory.patch"
|
||||
epatch "${FILESDIR}/${P}-management.patch"
|
||||
epatch "${FILESDIR}/${P}-linking-order.patch"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use static && append-ldflags -static
|
||||
[[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11
|
||||
|
||||
# Issues finding qt on multilib systems
|
||||
export QTLIB="${QTDIR}/$(get_libdir)"
|
||||
|
||||
econf \
|
||||
--enable-pinentry-tty \
|
||||
$(use_enable gtk pinentry-gtk2) \
|
||||
$(use_enable ncurses pinentry-curses) \
|
||||
$(use_enable ncurses fallback-curses) \
|
||||
$(use_enable qt4 pinentry-qt4) \
|
||||
$(use qt4 && use_enable clipboard pinentry-qt4-clipboard) \
|
||||
$(use_with caps libcap) \
|
||||
$(use_enable gnome-keyring libsecret) \
|
||||
$(use_enable gnome-keyring pinentry-gnome3) \
|
||||
MOC="$(qt4_get_bindir)"/moc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
rm -f "${ED}"/usr/bin/pinentry || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! has_version 'app-crypt/pinentry' || has_version '<app-crypt/pinentry-0.7.3'; then
|
||||
elog "We no longer install pinentry-curses and pinentry-qt SUID root by default."
|
||||
elog "Linux kernels >=2.6.9 support memory locking for unprivileged processes."
|
||||
elog "The soft resource limit for memory locking specifies the limit an"
|
||||
elog "unprivileged process may lock into memory. You can also use POSIX"
|
||||
elog "capabilities to allow pinentry to lock memory. To do so activate the caps"
|
||||
elog "USE flag and add the CAP_IPC_LOCK capability to the permitted set of"
|
||||
elog "your users."
|
||||
fi
|
||||
eselect pinentry update ifunset
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
eselect pinentry update ifunset
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
fix already in upstream
|
||||
|
||||
From f17f4989fa193fa8279474c5462289a3cfe69aea Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@chromium.org>
|
||||
Date: Fri, 8 Aug 2014 09:40:25 +0900
|
||||
Subject: [PATCH] linux-user: fix readlink handling with magic exe symlink
|
||||
|
||||
The current code always returns the length of the path when it should
|
||||
be returning the number of bytes it wrote to the output string.
|
||||
|
||||
Further, readlink is not supposed to append a NUL byte, but the current
|
||||
snprintf logic will always do just that.
|
||||
|
||||
Even further, if you pass in a length of 0, you're suppoesd to get back
|
||||
an error (EINVAL), but the current logic just returns 0.
|
||||
|
||||
Further still, if there was an error reading the symlink, we should not
|
||||
go ahead and try to read the target buffer as it is garbage.
|
||||
|
||||
Simple test for the first two issues:
|
||||
$ cat test.c
|
||||
int main() {
|
||||
char buf[50];
|
||||
size_t len;
|
||||
for (len = 0; len < 10; ++len) {
|
||||
memset(buf, '!', sizeof(buf));
|
||||
ssize_t ret = readlink("/proc/self/exe", buf, len);
|
||||
buf[20] = '\0';
|
||||
printf("readlink(/proc/self/exe, {%s}, %zu) = %zi\n", buf, len, ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Now compare the output of the native:
|
||||
$ gcc test.c -o /tmp/x
|
||||
$ /tmp/x
|
||||
$ strace /tmp/x
|
||||
|
||||
With what qemu does:
|
||||
$ armv7a-cros-linux-gnueabi-gcc test.c -o /tmp/x -static
|
||||
$ qemu-arm /tmp/x
|
||||
$ qemu-arm -strace /tmp/x
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier@chromium.org>
|
||||
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
|
||||
---
|
||||
linux-user/syscall.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||
index fccf9f0..7c108ab 100644
|
||||
--- a/linux-user/syscall.c
|
||||
+++ b/linux-user/syscall.c
|
||||
@@ -6636,11 +6636,22 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||
p2 = lock_user(VERIFY_WRITE, arg2, arg3, 0);
|
||||
if (!p || !p2) {
|
||||
ret = -TARGET_EFAULT;
|
||||
+ } else if (!arg3) {
|
||||
+ /* Short circuit this for the magic exe check. */
|
||||
+ ret = -TARGET_EINVAL;
|
||||
} else if (is_proc_myself((const char *)p, "exe")) {
|
||||
char real[PATH_MAX], *temp;
|
||||
temp = realpath(exec_path, real);
|
||||
- ret = temp == NULL ? get_errno(-1) : strlen(real) ;
|
||||
- snprintf((char *)p2, arg3, "%s", real);
|
||||
+ /* Return value is # of bytes that we wrote to the buffer. */
|
||||
+ if (temp == NULL) {
|
||||
+ ret = get_errno(-1);
|
||||
+ } else {
|
||||
+ /* Don't worry about sign mismatch as earlier mapping
|
||||
+ * logic would have thrown a bad address error. */
|
||||
+ ret = MIN(strlen(real), arg3);
|
||||
+ /* We cannot NUL terminate the string. */
|
||||
+ memcpy(p2, real, ret);
|
||||
+ }
|
||||
} else {
|
||||
ret = get_errno(readlink(path(p), p2, arg3));
|
||||
}
|
||||
--
|
||||
2.0.0
|
||||
|
@ -1,50 +0,0 @@
|
||||
https://bugs.gentoo.org/527088
|
||||
|
||||
From e6908bfe8e07f2b452e78e677da1b45b1c0f6829 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Matousek <pmatouse@redhat.com>
|
||||
Date: Mon, 27 Oct 2014 12:41:44 +0100
|
||||
Subject: [PATCH] vnc: sanitize bits_per_pixel from the client
|
||||
|
||||
bits_per_pixel that are less than 8 could result in accessing
|
||||
non-initialized buffers later in the code due to the expectation
|
||||
that bytes_per_pixel value that is used to initialize these buffers is
|
||||
never zero.
|
||||
|
||||
To fix this check that bits_per_pixel from the client is one of the
|
||||
values that the rfb protocol specification allows.
|
||||
|
||||
This is CVE-2014-7815.
|
||||
|
||||
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
|
||||
|
||||
[ kraxel: apply codestyle fix ]
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
ui/vnc.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/ui/vnc.c b/ui/vnc.c
|
||||
index 0fe6eff..8bca597 100644
|
||||
--- a/ui/vnc.c
|
||||
+++ b/ui/vnc.c
|
||||
@@ -2026,6 +2026,16 @@ static void set_pixel_format(VncState *vs,
|
||||
return;
|
||||
}
|
||||
|
||||
+ switch (bits_per_pixel) {
|
||||
+ case 8:
|
||||
+ case 16:
|
||||
+ case 32:
|
||||
+ break;
|
||||
+ default:
|
||||
+ vnc_client_error(vs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
vs->client_pf.rmax = red_max;
|
||||
vs->client_pf.rbits = hweight_long(red_max);
|
||||
vs->client_pf.rshift = red_shift;
|
||||
--
|
||||
2.1.2
|
||||
|
@ -0,0 +1,86 @@
|
||||
https://bugs.gentoo.org/549404
|
||||
|
||||
From e907746266721f305d67bc0718795fedee2e824c Mon Sep 17 00:00:00 2001
|
||||
From: Petr Matousek <pmatouse@redhat.com>
|
||||
Date: Wed, 6 May 2015 09:48:59 +0200
|
||||
Subject: [PATCH] fdc: force the fifo access to be in bounds of the allocated buffer
|
||||
|
||||
During processing of certain commands such as FD_CMD_READ_ID and
|
||||
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
|
||||
get out of bounds leading to memory corruption with values coming
|
||||
from the guest.
|
||||
|
||||
Fix this by making sure that the index is always bounded by the
|
||||
allocated memory.
|
||||
|
||||
This is CVE-2015-3456.
|
||||
|
||||
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
|
||||
Reviewed-by: John Snow <jsnow@redhat.com>
|
||||
Signed-off-by: John Snow <jsnow@redhat.com>
|
||||
---
|
||||
hw/block/fdc.c | 17 +++++++++++------
|
||||
1 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
|
||||
index f72a392..d8a8edd 100644
|
||||
--- a/hw/block/fdc.c
|
||||
+++ b/hw/block/fdc.c
|
||||
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
|
||||
{
|
||||
FDrive *cur_drv;
|
||||
uint32_t retval = 0;
|
||||
- int pos;
|
||||
+ uint32_t pos;
|
||||
|
||||
cur_drv = get_cur_drv(fdctrl);
|
||||
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
|
||||
@@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
|
||||
return 0;
|
||||
}
|
||||
pos = fdctrl->data_pos;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
if (fdctrl->msr & FD_MSR_NONDMA) {
|
||||
- pos %= FD_SECTOR_LEN;
|
||||
if (pos == 0) {
|
||||
if (fdctrl->data_pos != 0)
|
||||
if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) {
|
||||
@@ -1852,10 +1852,13 @@ static void fdctrl_handle_option(FDCtrl *fdctrl, int direction)
|
||||
static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction)
|
||||
{
|
||||
FDrive *cur_drv = get_cur_drv(fdctrl);
|
||||
+ uint32_t pos;
|
||||
|
||||
- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
|
||||
+ pos = fdctrl->data_pos - 1;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
+ if (fdctrl->fifo[pos] & 0x80) {
|
||||
/* Command parameters done */
|
||||
- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) {
|
||||
+ if (fdctrl->fifo[pos] & 0x40) {
|
||||
fdctrl->fifo[0] = fdctrl->fifo[1];
|
||||
fdctrl->fifo[2] = 0;
|
||||
fdctrl->fifo[3] = 0;
|
||||
@@ -1955,7 +1958,7 @@ static uint8_t command_to_handler[256];
|
||||
static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
|
||||
{
|
||||
FDrive *cur_drv;
|
||||
- int pos;
|
||||
+ uint32_t pos;
|
||||
|
||||
/* Reset mode */
|
||||
if (!(fdctrl->dor & FD_DOR_nRESET)) {
|
||||
@@ -2004,7 +2007,9 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
|
||||
}
|
||||
|
||||
FLOPPY_DPRINTF("%s: %02x\n", __func__, value);
|
||||
- fdctrl->fifo[fdctrl->data_pos++] = value;
|
||||
+ pos = fdctrl->data_pos++;
|
||||
+ pos %= FD_SECTOR_LEN;
|
||||
+ fdctrl->fifo[pos] = value;
|
||||
if (fdctrl->data_pos == fdctrl->data_len) {
|
||||
/* We now have all parameters
|
||||
* and will be able to treat the command
|
||||
--
|
||||
1.7.0.4
|
||||
|
@ -1,603 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.1.2-r2.ebuild,v 1.5 2015/04/08 07:30:33 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo pax-utils
|
||||
|
||||
BACKPORTS="20141214"
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2
|
||||
${BACKPORTS:+
|
||||
http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz
|
||||
http://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}"
|
||||
KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth +caps +curl debug +fdt glusterfs \
|
||||
gtk infiniband iscsi +jpeg \
|
||||
kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
|
||||
+png pulseaudio python \
|
||||
rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \
|
||||
static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \
|
||||
virtfs +vnc xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
|
||||
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
|
||||
x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus"
|
||||
|
||||
use_targets="
|
||||
$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
"
|
||||
IUSE+=" ${use_targets}"
|
||||
|
||||
# Require at least one softmmu or user target.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="|| ( ${use_targets} )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
static? ( static-softmmu static-user )
|
||||
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk )
|
||||
virtfs? ( xattr )"
|
||||
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
infiniband? ( sys-infiniband/librdmacm[static-libs(+)] )
|
||||
jpeg? ( virtual/jpeg[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? ( sys-libs/ncurses[static-libs(+)] )
|
||||
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
png? ( media-libs/libpng[static-libs(+)] )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy[static-libs(+)] )
|
||||
spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
tls? ( net-libs/gnutls[static-libs(+)] )
|
||||
usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] )
|
||||
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
|
||||
X86_FIRMWARE_DEPEND="
|
||||
>=sys-firmware/ipxe-1.0.0_p20130624
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.7.5
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
~sys-firmware/vgabios-0.7a
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/seabios
|
||||
sys-firmware/sgabios
|
||||
sys-firmware/vgabios
|
||||
)"
|
||||
CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} )
|
||||
!static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} )
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
accessibility? ( app-accessibility/brltty )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/vte:2.90
|
||||
)
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
opengl? ( virtual/opengl )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
sdl? ( media-libs/libsdl[X] )
|
||||
smartcard? ( dev-libs/nss !app-emulation/libcacard )
|
||||
spice? ( >=app-emulation/spice-protocol-0.12.3 )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6 )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools )"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static-softmmu? ( ${SOFTMMU_LIB_DEPEND} )
|
||||
static-user? ( ${USER_LIB_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )
|
||||
"
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or32
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
|
||||
you have the kernel module loaded before running kvm. The easiest way to
|
||||
ensure that the kernel module is loaded is to load it on boot.\n
|
||||
For AMD CPUs the module is called 'kvm-amd'\n
|
||||
For Intel CPUs the module is called 'kvm-intel'\n
|
||||
Please review /etc/conf.d/modules for how to load these\n\n
|
||||
Make sure your user is in the 'kvm' group\n
|
||||
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
|
||||
|
||||
qemu_support_kvm() {
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
|
||||
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
|
||||
use qemu_softmmu_targets_s390x; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
use nls || rm -f po/*.po
|
||||
|
||||
epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.1.1-readlink-self.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.1.2-vnc-sanitize-bits.patch #527088
|
||||
[[ -n ${BACKPORTS} ]] && \
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \
|
||||
EPATCH_SOURCE="${WORKDIR}/patches" epatch
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir=$2
|
||||
local static_flag="static-${buildtype}"
|
||||
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets as the default configure
|
||||
# options will autoprobe and try to link in a bunch of unused junk.
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_softmmu accessibility brlapi)
|
||||
$(conf_softmmu aio linux-aio)
|
||||
$(conf_softmmu bluetooth bluez)
|
||||
$(conf_softmmu caps cap-ng)
|
||||
$(conf_softmmu curl)
|
||||
$(conf_softmmu fdt)
|
||||
$(conf_softmmu glusterfs)
|
||||
$(conf_softmmu gtk)
|
||||
$(conf_softmmu infiniband rdma)
|
||||
$(conf_softmmu iscsi libiscsi)
|
||||
$(conf_softmmu jpeg vnc-jpeg)
|
||||
$(conf_softmmu kernel_linux kvm)
|
||||
$(conf_softmmu lzo)
|
||||
$(conf_softmmu ncurses curses)
|
||||
$(conf_softmmu nfs libnfs)
|
||||
$(conf_softmmu numa)
|
||||
$(conf_softmmu opengl glx)
|
||||
$(conf_softmmu png vnc-png)
|
||||
$(conf_softmmu rbd)
|
||||
$(conf_softmmu sasl vnc-sasl)
|
||||
$(conf_softmmu sdl)
|
||||
$(conf_softmmu seccomp)
|
||||
$(conf_softmmu smartcard smartcard-nss)
|
||||
$(conf_softmmu snappy)
|
||||
$(conf_softmmu spice)
|
||||
$(conf_softmmu ssh libssh2)
|
||||
$(conf_softmmu tls quorum)
|
||||
$(conf_softmmu tls vnc-tls)
|
||||
$(conf_softmmu tls vnc-ws)
|
||||
$(conf_softmmu usb libusb)
|
||||
$(conf_softmmu usbredir usb-redir)
|
||||
$(conf_softmmu uuid)
|
||||
$(conf_softmmu vde)
|
||||
$(conf_softmmu vhost-net)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_softmmu vnc)
|
||||
$(conf_softmmu xen)
|
||||
$(conf_softmmu xen xen-pci-passthrough)
|
||||
$(conf_softmmu xfs xfsctl)
|
||||
)
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--target-list="${user_targets}"
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--target-list="${softmmu_targets}"
|
||||
--with-system-pixman
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=3.0 )
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
gcc-specs-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
einfo "./configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_export_best
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && \
|
||||
einfo "Building the following softmmu targets: ${softmmu_targets}"
|
||||
|
||||
[[ -n ${user_targets} ]] && \
|
||||
einfo "Building the following user targets: ${user_targets}"
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
mkdir "${S}/softmmu-build"
|
||||
qemu_src_configure "softmmu" "${S}/softmmu-build"
|
||||
fi
|
||||
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
mkdir "${S}/user-build"
|
||||
qemu_src_configure "user" "${S}/user-build"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/kvm_stat"
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets
|
||||
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_dorules "${FILESDIR}"/65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
# Remove the docdir placed qmp-commands.txt
|
||||
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
dodoc docs/qmp/*.txt
|
||||
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the vgabios packaged one
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
qemu_support_kvm && readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if qemu_support_kvm; then
|
||||
readme.gentoo_print_elog
|
||||
ewarn "Migration from qemu-kvm instances and loading qemu-kvm created"
|
||||
ewarn "save states has been removed starting with the 1.6.2 release"
|
||||
ewarn
|
||||
ewarn "It is recommended that you migrate any VMs that may be running"
|
||||
ewarn "on qemu-kvm to a host with a newer qemu and regenerate"
|
||||
ewarn "any saved states with a newer qemu."
|
||||
ewarn
|
||||
ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x"
|
||||
|
||||
if use x86 || use amd64; then
|
||||
ewarn
|
||||
ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer"
|
||||
ewarn "installed. In order to use kvm acceleration, pass the flag"
|
||||
ewarn "-enable-kvm when running your system target."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
if use virtfs && [ -n "${softmmu_targets}" ]; then
|
||||
local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid"
|
||||
fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version sys-firmware/seabios[binary]; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/vgabios)"
|
||||
}
|
@ -1,602 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.1.3.ebuild,v 1.3 2015/04/08 07:30:33 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo pax-utils
|
||||
|
||||
BACKPORTS=""
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2
|
||||
${BACKPORTS:+
|
||||
http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth +caps +curl debug +fdt glusterfs \
|
||||
gtk infiniband iscsi +jpeg \
|
||||
kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
|
||||
+png pulseaudio python \
|
||||
rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \
|
||||
static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \
|
||||
virtfs +vnc xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
|
||||
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
|
||||
x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus"
|
||||
|
||||
use_targets="
|
||||
$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
"
|
||||
IUSE+=" ${use_targets}"
|
||||
|
||||
# Require at least one softmmu or user target.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="|| ( ${use_targets} )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
static? ( static-softmmu static-user )
|
||||
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk )
|
||||
virtfs? ( xattr )"
|
||||
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
infiniband? ( sys-infiniband/librdmacm[static-libs(+)] )
|
||||
jpeg? ( virtual/jpeg[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? ( sys-libs/ncurses[static-libs(+)] )
|
||||
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
png? ( media-libs/libpng[static-libs(+)] )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy[static-libs(+)] )
|
||||
spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
tls? ( net-libs/gnutls[static-libs(+)] )
|
||||
usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] )
|
||||
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
|
||||
X86_FIRMWARE_DEPEND="
|
||||
>=sys-firmware/ipxe-1.0.0_p20130624
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.7.5
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
~sys-firmware/vgabios-0.7a
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/seabios
|
||||
sys-firmware/sgabios
|
||||
sys-firmware/vgabios
|
||||
)"
|
||||
CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} )
|
||||
!static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} )
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
accessibility? ( app-accessibility/brltty )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/vte:2.90
|
||||
)
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
opengl? ( virtual/opengl )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
sdl? ( media-libs/libsdl[X] )
|
||||
smartcard? ( dev-libs/nss !app-emulation/libcacard )
|
||||
spice? ( >=app-emulation/spice-protocol-0.12.3 )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6 )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools )"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static-softmmu? ( ${SOFTMMU_LIB_DEPEND} )
|
||||
static-user? ( ${USER_LIB_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )
|
||||
"
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or32
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
|
||||
you have the kernel module loaded before running kvm. The easiest way to
|
||||
ensure that the kernel module is loaded is to load it on boot.\n
|
||||
For AMD CPUs the module is called 'kvm-amd'\n
|
||||
For Intel CPUs the module is called 'kvm-intel'\n
|
||||
Please review /etc/conf.d/modules for how to load these\n\n
|
||||
Make sure your user is in the 'kvm' group\n
|
||||
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
|
||||
|
||||
qemu_support_kvm() {
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
|
||||
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
|
||||
use qemu_softmmu_targets_s390x; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
use nls || rm -f po/*.po
|
||||
|
||||
epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.1.1-readlink-self.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.1.2-vnc-sanitize-bits.patch #527088
|
||||
[[ -n ${BACKPORTS} ]] && \
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \
|
||||
EPATCH_SOURCE="${WORKDIR}/patches" epatch
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir=$2
|
||||
local static_flag="static-${buildtype}"
|
||||
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets as the default configure
|
||||
# options will autoprobe and try to link in a bunch of unused junk.
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_softmmu accessibility brlapi)
|
||||
$(conf_softmmu aio linux-aio)
|
||||
$(conf_softmmu bluetooth bluez)
|
||||
$(conf_softmmu caps cap-ng)
|
||||
$(conf_softmmu curl)
|
||||
$(conf_softmmu fdt)
|
||||
$(conf_softmmu glusterfs)
|
||||
$(conf_softmmu gtk)
|
||||
$(conf_softmmu infiniband rdma)
|
||||
$(conf_softmmu iscsi libiscsi)
|
||||
$(conf_softmmu jpeg vnc-jpeg)
|
||||
$(conf_softmmu kernel_linux kvm)
|
||||
$(conf_softmmu lzo)
|
||||
$(conf_softmmu ncurses curses)
|
||||
$(conf_softmmu nfs libnfs)
|
||||
$(conf_softmmu numa)
|
||||
$(conf_softmmu opengl glx)
|
||||
$(conf_softmmu png vnc-png)
|
||||
$(conf_softmmu rbd)
|
||||
$(conf_softmmu sasl vnc-sasl)
|
||||
$(conf_softmmu sdl)
|
||||
$(conf_softmmu seccomp)
|
||||
$(conf_softmmu smartcard smartcard-nss)
|
||||
$(conf_softmmu snappy)
|
||||
$(conf_softmmu spice)
|
||||
$(conf_softmmu ssh libssh2)
|
||||
$(conf_softmmu tls quorum)
|
||||
$(conf_softmmu tls vnc-tls)
|
||||
$(conf_softmmu tls vnc-ws)
|
||||
$(conf_softmmu usb libusb)
|
||||
$(conf_softmmu usbredir usb-redir)
|
||||
$(conf_softmmu uuid)
|
||||
$(conf_softmmu vde)
|
||||
$(conf_softmmu vhost-net)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_softmmu vnc)
|
||||
$(conf_softmmu xen)
|
||||
$(conf_softmmu xen xen-pci-passthrough)
|
||||
$(conf_softmmu xfs xfsctl)
|
||||
)
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--target-list="${user_targets}"
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--target-list="${softmmu_targets}"
|
||||
--with-system-pixman
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=3.0 )
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
gcc-specs-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
einfo "./configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_export_best
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && \
|
||||
einfo "Building the following softmmu targets: ${softmmu_targets}"
|
||||
|
||||
[[ -n ${user_targets} ]] && \
|
||||
einfo "Building the following user targets: ${user_targets}"
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
mkdir "${S}/softmmu-build"
|
||||
qemu_src_configure "softmmu" "${S}/softmmu-build"
|
||||
fi
|
||||
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
mkdir "${S}/user-build"
|
||||
qemu_src_configure "user" "${S}/user-build"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/kvm_stat"
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets
|
||||
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_dorules "${FILESDIR}"/65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
# Remove the docdir placed qmp-commands.txt
|
||||
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
dodoc docs/qmp/*.txt
|
||||
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the vgabios packaged one
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
qemu_support_kvm && readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if qemu_support_kvm; then
|
||||
readme.gentoo_print_elog
|
||||
ewarn "Migration from qemu-kvm instances and loading qemu-kvm created"
|
||||
ewarn "save states has been removed starting with the 1.6.2 release"
|
||||
ewarn
|
||||
ewarn "It is recommended that you migrate any VMs that may be running"
|
||||
ewarn "on qemu-kvm to a host with a newer qemu and regenerate"
|
||||
ewarn "any saved states with a newer qemu."
|
||||
ewarn
|
||||
ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x"
|
||||
|
||||
if use x86 || use amd64; then
|
||||
ewarn
|
||||
ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer"
|
||||
ewarn "installed. In order to use kvm acceleration, pass the flag"
|
||||
ewarn "-enable-kvm when running your system target."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
if use virtfs && [ -n "${softmmu_targets}" ]; then
|
||||
local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid"
|
||||
fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version sys-firmware/seabios[binary]; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/vgabios)"
|
||||
}
|
@ -1,601 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.2.0.ebuild,v 1.6 2015/04/08 07:30:33 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo pax-utils
|
||||
|
||||
BACKPORTS=
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2
|
||||
${BACKPORTS:+
|
||||
http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}"
|
||||
KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth +caps +curl debug +fdt glusterfs \
|
||||
gtk infiniband iscsi +jpeg \
|
||||
kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
|
||||
+png pulseaudio python \
|
||||
rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \
|
||||
static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \
|
||||
virtfs +vnc xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
|
||||
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
|
||||
x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus"
|
||||
|
||||
use_targets="
|
||||
$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
"
|
||||
IUSE+=" ${use_targets}"
|
||||
|
||||
# Require at least one softmmu or user target.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="|| ( ${use_targets} )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
static? ( static-softmmu static-user )
|
||||
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk )
|
||||
virtfs? ( xattr )"
|
||||
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
infiniband? ( sys-infiniband/librdmacm[static-libs(+)] )
|
||||
jpeg? ( virtual/jpeg[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? ( sys-libs/ncurses[static-libs(+)] )
|
||||
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
png? ( media-libs/libpng[static-libs(+)] )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy[static-libs(+)] )
|
||||
spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
tls? ( net-libs/gnutls[static-libs(+)] )
|
||||
usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] )
|
||||
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
|
||||
X86_FIRMWARE_DEPEND="
|
||||
>=sys-firmware/ipxe-1.0.0_p20130624
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.7.5
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
~sys-firmware/vgabios-0.7a
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/seabios
|
||||
sys-firmware/sgabios
|
||||
sys-firmware/vgabios
|
||||
)"
|
||||
CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} )
|
||||
!static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} )
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
accessibility? ( app-accessibility/brltty )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/vte:2.90
|
||||
)
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
opengl? ( virtual/opengl )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
sdl? ( media-libs/libsdl[X] )
|
||||
smartcard? ( dev-libs/nss !app-emulation/libcacard )
|
||||
spice? ( >=app-emulation/spice-protocol-0.12.3 )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6 )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools )"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static-softmmu? ( ${SOFTMMU_LIB_DEPEND} )
|
||||
static-user? ( ${USER_LIB_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )
|
||||
"
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or32
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
|
||||
you have the kernel module loaded before running kvm. The easiest way to
|
||||
ensure that the kernel module is loaded is to load it on boot.\n
|
||||
For AMD CPUs the module is called 'kvm-amd'\n
|
||||
For Intel CPUs the module is called 'kvm-intel'\n
|
||||
Please review /etc/conf.d/modules for how to load these\n\n
|
||||
Make sure your user is in the 'kvm' group\n
|
||||
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
|
||||
|
||||
qemu_support_kvm() {
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
|
||||
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
|
||||
use qemu_softmmu_targets_s390x; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
use nls || rm -f po/*.po
|
||||
|
||||
epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch
|
||||
|
||||
[[ -n ${BACKPORTS} ]] && \
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
|
||||
epatch
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir=$2
|
||||
local static_flag="static-${buildtype}"
|
||||
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets as the default configure
|
||||
# options will autoprobe and try to link in a bunch of unused junk.
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_softmmu accessibility brlapi)
|
||||
$(conf_softmmu aio linux-aio)
|
||||
$(conf_softmmu bluetooth bluez)
|
||||
$(conf_softmmu caps cap-ng)
|
||||
$(conf_softmmu curl)
|
||||
$(conf_softmmu fdt)
|
||||
$(conf_softmmu glusterfs)
|
||||
$(conf_softmmu gtk)
|
||||
$(conf_softmmu infiniband rdma)
|
||||
$(conf_softmmu iscsi libiscsi)
|
||||
$(conf_softmmu jpeg vnc-jpeg)
|
||||
$(conf_softmmu kernel_linux kvm)
|
||||
$(conf_softmmu lzo)
|
||||
$(conf_softmmu ncurses curses)
|
||||
$(conf_softmmu nfs libnfs)
|
||||
$(conf_softmmu numa)
|
||||
$(conf_softmmu opengl glx)
|
||||
$(conf_softmmu png vnc-png)
|
||||
$(conf_softmmu rbd)
|
||||
$(conf_softmmu sasl vnc-sasl)
|
||||
$(conf_softmmu sdl)
|
||||
$(conf_softmmu seccomp)
|
||||
$(conf_softmmu smartcard smartcard-nss)
|
||||
$(conf_softmmu snappy)
|
||||
$(conf_softmmu spice)
|
||||
$(conf_softmmu ssh libssh2)
|
||||
$(conf_softmmu tls quorum)
|
||||
$(conf_softmmu tls vnc-tls)
|
||||
$(conf_softmmu tls vnc-ws)
|
||||
$(conf_softmmu usb libusb)
|
||||
$(conf_softmmu usbredir usb-redir)
|
||||
$(conf_softmmu uuid)
|
||||
$(conf_softmmu vde)
|
||||
$(conf_softmmu vhost-net)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_softmmu vnc)
|
||||
$(conf_softmmu xen)
|
||||
$(conf_softmmu xen xen-pci-passthrough)
|
||||
$(conf_softmmu xfs xfsctl)
|
||||
)
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--target-list="${user_targets}"
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--target-list="${softmmu_targets}"
|
||||
--with-system-pixman
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=3.0 )
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
gcc-specs-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
einfo "./configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_export_best
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && \
|
||||
einfo "Building the following softmmu targets: ${softmmu_targets}"
|
||||
|
||||
[[ -n ${user_targets} ]] && \
|
||||
einfo "Building the following user targets: ${user_targets}"
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
mkdir "${S}/softmmu-build"
|
||||
qemu_src_configure "softmmu" "${S}/softmmu-build"
|
||||
fi
|
||||
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
mkdir "${S}/user-build"
|
||||
qemu_src_configure "user" "${S}/user-build"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/kvm_stat"
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets
|
||||
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_dorules "${FILESDIR}"/65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
# Remove the docdir placed qmp-commands.txt
|
||||
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
dodoc docs/qmp/*.txt
|
||||
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the vgabios packaged one
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
qemu_support_kvm && readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if qemu_support_kvm; then
|
||||
readme.gentoo_print_elog
|
||||
ewarn "Migration from qemu-kvm instances and loading qemu-kvm created"
|
||||
ewarn "save states has been removed starting with the 1.6.2 release"
|
||||
ewarn
|
||||
ewarn "It is recommended that you migrate any VMs that may be running"
|
||||
ewarn "on qemu-kvm to a host with a newer qemu and regenerate"
|
||||
ewarn "any saved states with a newer qemu."
|
||||
ewarn
|
||||
ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x"
|
||||
|
||||
if use x86 || use amd64; then
|
||||
ewarn
|
||||
ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer"
|
||||
ewarn "installed. In order to use kvm acceleration, pass the flag"
|
||||
ewarn "-enable-kvm when running your system target."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
if use virtfs && [ -n "${softmmu_targets}" ]; then
|
||||
local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid"
|
||||
fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version sys-firmware/seabios[binary]; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/vgabios)"
|
||||
}
|
@ -1,601 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-2.2.1.ebuild,v 1.2 2015/04/08 07:30:33 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo pax-utils
|
||||
|
||||
BACKPORTS=
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2
|
||||
${BACKPORTS:+
|
||||
http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth +caps +curl debug +fdt glusterfs \
|
||||
gtk infiniband iscsi +jpeg \
|
||||
kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
|
||||
+png pulseaudio python \
|
||||
rbd sasl +seccomp sdl selinux smartcard snappy spice ssh static static-softmmu \
|
||||
static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net \
|
||||
virtfs +vnc xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
|
||||
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
|
||||
x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus"
|
||||
|
||||
use_targets="
|
||||
$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
"
|
||||
IUSE+=" ${use_targets}"
|
||||
|
||||
# Require at least one softmmu or user target.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="|| ( ${use_targets} )
|
||||
${PYTHON_REQUIRED_USE}
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
static? ( static-softmmu static-user )
|
||||
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk )
|
||||
virtfs? ( xattr )"
|
||||
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
infiniband? ( sys-infiniband/librdmacm[static-libs(+)] )
|
||||
jpeg? ( virtual/jpeg[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? ( sys-libs/ncurses[static-libs(+)] )
|
||||
nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
png? ( media-libs/libpng[static-libs(+)] )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy[static-libs(+)] )
|
||||
spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
tls? ( net-libs/gnutls[static-libs(+)] )
|
||||
usb? ( >=dev-libs/libusb-1.0.18[static-libs(+)] )
|
||||
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
|
||||
X86_FIRMWARE_DEPEND="
|
||||
>=sys-firmware/ipxe-1.0.0_p20130624
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.7.5
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
~sys-firmware/vgabios-0.7a
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/seabios
|
||||
sys-firmware/sgabios
|
||||
sys-firmware/vgabios
|
||||
)"
|
||||
CDEPEND="!static-softmmu? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} )
|
||||
!static-user? ( ${USER_LIB_DEPEND//\[static-libs(+)]} )
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
accessibility? ( app-accessibility/brltty )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/vte:2.90
|
||||
)
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
opengl? ( virtual/opengl )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
sdl? ( media-libs/libsdl[X] )
|
||||
smartcard? ( dev-libs/nss !app-emulation/libcacard )
|
||||
spice? ( >=app-emulation/spice-protocol-0.12.3 )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6 )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools )"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static-softmmu? ( ${SOFTMMU_LIB_DEPEND} )
|
||||
static-user? ( ${USER_LIB_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )
|
||||
"
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or32
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
|
||||
you have the kernel module loaded before running kvm. The easiest way to
|
||||
ensure that the kernel module is loaded is to load it on boot.\n
|
||||
For AMD CPUs the module is called 'kvm-amd'\n
|
||||
For Intel CPUs the module is called 'kvm-intel'\n
|
||||
Please review /etc/conf.d/modules for how to load these\n\n
|
||||
Make sure your user is in the 'kvm' group\n
|
||||
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
|
||||
|
||||
qemu_support_kvm() {
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
|
||||
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
|
||||
use qemu_softmmu_targets_s390x; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
python_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
use nls || rm -f po/*.po
|
||||
|
||||
epatch "${FILESDIR}"/qemu-1.7.0-cflags.patch
|
||||
[[ -n ${BACKPORTS} ]] && \
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
|
||||
epatch
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir=$2
|
||||
local static_flag="static-${buildtype}"
|
||||
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets as the default configure
|
||||
# options will autoprobe and try to link in a bunch of unused junk.
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_softmmu accessibility brlapi)
|
||||
$(conf_softmmu aio linux-aio)
|
||||
$(conf_softmmu bluetooth bluez)
|
||||
$(conf_softmmu caps cap-ng)
|
||||
$(conf_softmmu curl)
|
||||
$(conf_softmmu fdt)
|
||||
$(conf_softmmu glusterfs)
|
||||
$(conf_softmmu gtk)
|
||||
$(conf_softmmu infiniband rdma)
|
||||
$(conf_softmmu iscsi libiscsi)
|
||||
$(conf_softmmu jpeg vnc-jpeg)
|
||||
$(conf_softmmu kernel_linux kvm)
|
||||
$(conf_softmmu lzo)
|
||||
$(conf_softmmu ncurses curses)
|
||||
$(conf_softmmu nfs libnfs)
|
||||
$(conf_softmmu numa)
|
||||
$(conf_softmmu opengl glx)
|
||||
$(conf_softmmu png vnc-png)
|
||||
$(conf_softmmu rbd)
|
||||
$(conf_softmmu sasl vnc-sasl)
|
||||
$(conf_softmmu sdl)
|
||||
$(conf_softmmu seccomp)
|
||||
$(conf_softmmu smartcard smartcard-nss)
|
||||
$(conf_softmmu snappy)
|
||||
$(conf_softmmu spice)
|
||||
$(conf_softmmu ssh libssh2)
|
||||
$(conf_softmmu tls quorum)
|
||||
$(conf_softmmu tls vnc-tls)
|
||||
$(conf_softmmu tls vnc-ws)
|
||||
$(conf_softmmu usb libusb)
|
||||
$(conf_softmmu usbredir usb-redir)
|
||||
$(conf_softmmu uuid)
|
||||
$(conf_softmmu vde)
|
||||
$(conf_softmmu vhost-net)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_softmmu vnc)
|
||||
$(conf_softmmu xen)
|
||||
$(conf_softmmu xen xen-pci-passthrough)
|
||||
$(conf_softmmu xfs xfsctl)
|
||||
)
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--target-list="${user_targets}"
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--target-list="${softmmu_targets}"
|
||||
--with-system-pixman
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=3.0 )
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
gcc-specs-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
einfo "./configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_export_best
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && \
|
||||
einfo "Building the following softmmu targets: ${softmmu_targets}"
|
||||
|
||||
[[ -n ${user_targets} ]] && \
|
||||
einfo "Building the following user targets: ${user_targets}"
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
mkdir "${S}/softmmu-build"
|
||||
qemu_src_configure "softmmu" "${S}/softmmu-build"
|
||||
fi
|
||||
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
mkdir "${S}/user-build"
|
||||
qemu_src_configure "user" "${S}/user-build"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/kvm_stat"
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets
|
||||
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_dorules "${FILESDIR}"/65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
# Remove the docdir placed qmp-commands.txt
|
||||
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/qmp/"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
dodoc docs/qmp/*.txt
|
||||
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the vgabios packaged one
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
qemu_support_kvm && readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if qemu_support_kvm; then
|
||||
readme.gentoo_print_elog
|
||||
ewarn "Migration from qemu-kvm instances and loading qemu-kvm created"
|
||||
ewarn "save states has been removed starting with the 1.6.2 release"
|
||||
ewarn
|
||||
ewarn "It is recommended that you migrate any VMs that may be running"
|
||||
ewarn "on qemu-kvm to a host with a newer qemu and regenerate"
|
||||
ewarn "any saved states with a newer qemu."
|
||||
ewarn
|
||||
ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x"
|
||||
|
||||
if use x86 || use amd64; then
|
||||
ewarn
|
||||
ewarn "The /usr/bin/kvm and /usr/bin/qemu-kvm wrappers are no longer"
|
||||
ewarn "installed. In order to use kvm acceleration, pass the flag"
|
||||
ewarn "-enable-kvm when running your system target."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
if use virtfs && [ -n "${softmmu_targets}" ]; then
|
||||
local virtfs_caps="cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_setgid,cap_mknod,cap_setuid"
|
||||
fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version sys-firmware/seabios[binary]; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/vgabios)"
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/gnomecatalog/gnomecatalog-0.3.4.2.ebuild,v 1.5 2014/08/10 18:04:58 slyfox Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2:2.6"
|
||||
PYTHON_USE_WITH="sqlite,xml"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
DESCRIPTION="Cataloging software for CDs and DVDs"
|
||||
HOMEPAGE="http://gnomecatalog.sf.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-python/gconf-python:2
|
||||
dev-python/gnome-vfs-python:2
|
||||
dev-python/kaa-metadata
|
||||
dev-python/libgnome-python:2
|
||||
dev-python/pygobject:2
|
||||
>=dev-python/pygtk-2.4:2
|
||||
dev-python/pyvorbis
|
||||
>=gnome-base/libglade-2:2.0
|
||||
>=x11-libs/gtk+-2.4:2"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
# Fix importing from a single folder in /media
|
||||
epatch "${FILESDIR}/${P}-dbus.patch"
|
||||
|
||||
# Use sqlite3 instead of pysqlite2, bug #452126.
|
||||
sed -i -e 's:from pysqlite2 import dbapi2:import sqlite3:' \
|
||||
gnomecatalog/storage.py || die
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/hachoir-subfile/hachoir-subfile-0.5.3.ebuild,v 1.5 2010/12/26 14:33:44 arfrever Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Find subfile in any binary stream"
|
||||
HOMEPAGE="http://bitbucket.org/haypo/hachoir/wiki/hachoir-subfile http://pypi.python.org/pypi/hachoir-subfile"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-python/hachoir-core-1.1
|
||||
>=dev-python/hachoir-parser-1.1
|
||||
>=dev-python/hachoir-regex-1.0.1"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools"
|
||||
RESTRICT_PYTHON_ABIS="3.*"
|
||||
|
||||
DISTUTILS_GLOBAL_OPTIONS=("--setuptools")
|
||||
PYTHON_MODNAME="${PN/-/_}"
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/hachoir-urwid/hachoir-urwid-1.1.ebuild,v 1.3 2012/02/26 08:32:38 patrick Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
PYTHON_USE_WITH="ncurses"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Binary file explorer using Hachoir and urwid libraries"
|
||||
HOMEPAGE="http://bitbucket.org/haypo/hachoir/wiki/hachoir-urwid http://pypi.python.org/pypi/hachoir-urwid"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-python/hachoir-core-1.2
|
||||
>=dev-python/hachoir-parser-1.0
|
||||
>=dev-python/urwid-0.9.4"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools"
|
||||
|
||||
DISTUTILS_GLOBAL_OPTIONS=("--setuptools")
|
||||
PYTHON_MODNAME="${PN/-/_}"
|
@ -1,16 +0,0 @@
|
||||
src/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index b73ccc2..990f835 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -29,7 +29,7 @@ AM_LDFLAGS = -static
|
||||
|
||||
klavaro_LDADD = @GTK_LIBS@ \
|
||||
-lgmodule-2.0 \
|
||||
- $(top_srcdir)/gtkdatabox/libgtkdatabox.la
|
||||
+ $(top_builddir)/gtkdatabox/libgtkdatabox.la
|
||||
|
||||
if IS_POSIX
|
||||
AM_CFLAGS += -export-dynamic
|
@ -1,15 +0,0 @@
|
||||
gtkdatabox/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gtkdatabox/Makefile.am b/gtkdatabox/Makefile.am
|
||||
index 503f753..d972de9 100644
|
||||
--- a/gtkdatabox/Makefile.am
|
||||
+++ b/gtkdatabox/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: Makefile.am 4 2008-06-22 09:19:11Z rbock $
|
||||
|
||||
-lib_LTLIBRARIES = libgtkdatabox.la
|
||||
+noinst_LTLIBRARIES = libgtkdatabox.la
|
||||
libgtkdatabox_la_SOURCES= \
|
||||
gtkdatabox.c\
|
||||
gtkdatabox_marshal.c\
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/klavaro/klavaro-3.0.0.ebuild,v 1.2 2014/01/29 15:02:17 kensington Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
AUTOTOOLS_AUTORECONF=yes
|
||||
|
||||
inherit autotools-utils versionator
|
||||
|
||||
MY_P="${PN}-$(delete_version_separator 2)"
|
||||
|
||||
DESCRIPTION="Another free touch typing tutor program"
|
||||
HOMEPAGE="http://klavaro.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/project/${PN}/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+static-libs"
|
||||
|
||||
RDEPEND="
|
||||
net-misc/curl
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/pango
|
||||
"
|
||||
# gtk+3 version needed
|
||||
# x11-libs/gtkdatabox
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/intltool
|
||||
>=sys-devel/gettext-0.18.3
|
||||
dev-util/gtk-builder-convert
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-out-of-source.patch
|
||||
"${FILESDIR}"/${P}-static.patch
|
||||
)
|
||||
|
||||
S="${WORKDIR}"/${MY_P}
|
@ -1,24 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/ganyremote/ganyremote-6.2.ebuild,v 1.1 2013/07/25 00:57:50 creffett Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit base eutils
|
||||
|
||||
DESCRIPTION="Gnome frontend to Anyremote"
|
||||
HOMEPAGE="http://anyremote.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/anyremote/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="bluetooth"
|
||||
|
||||
DEPEND=">=app-mobilephone/anyremote-6.0[bluetooth=]
|
||||
dev-python/pygtk
|
||||
bluetooth? ( dev-python/pybluez )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README )
|
@ -1,27 +1,20 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX mdbtools-0.6_pre1-as-needed.patch 482 SHA256 38d06663bc41ced3e094d4a78d6a0b81909b08720bec2696ef7431fb90519416 SHA512 e2ffbb01eb8f70c383deeeab14101ee9c3f07cce2b5d490c571f54960a2db3df0067f47c8d138d4fe8734d18de5f62fed3b37b168f7f752aa15ccfda06566a2a WHIRLPOOL a6d80445bb9a8eb678cf816d29f776d812f932956d9642cfb020df49d5ea783381d5ec3d6f201b7b6100d902faa3e2f3d8adfcd68010df42a95b343de7a6fd5b
|
||||
AUX mdbtools-0.6_pre1-gcc34.patch 1571 SHA256 63a2f8d06d905274c3dfb60373b7a4c967534a06b864dc3e73e2a92ed8b0f633 SHA512 0b00afb738bf420c7ab50c1315610d6226dd76f764aa0575ffb58c74c2ed74d0e9d6aed04e675b7a03818145f8beb7c1ab2c1d938848e0aeae4e526c3a730db5 WHIRLPOOL bced5cf91b0fae4eca24893272e07dd25828d5e370daabede8ce84eaa4c98d65948098adfa7a75961a8d254cb23ff35c220b832e9ec0d19eae67fd15b44f1ebc
|
||||
AUX mdbtools-0.6_pre1-gcc41.patch 498 SHA256 58ab3afcf6e3a97570db7980cf81792b21c84e9074afdc7826c2789306122a63 SHA512 7c60ba2523a6be3c7295579df99dcec0df5b0c8e51805c1a2020be1ab073f00c41e556ddde6cf8023ad77ca9a5ca53118655ad1f79d6998b9ab0d173f88b5705 WHIRLPOOL 63203c6b86b9b4ec2261f8b639b50b69b31254f46d618713eea8eede8a4427af17c928ed8479f23084d719b07d9c96334c3bba4ff03d3b59036c8f3f6f7a62b2
|
||||
AUX mdbtools-0.6_pre1-strlen.patch 284 SHA256 a1ba4bde512318dc6db254f5ab04df94644970106fc950e316877734502f40b5 SHA512 7f328cf1885d1c7b876bb511d555c36003f493014b838f2515ba9b84476eb720f0c64da017d22449ea0c077ea27c5d0d6d456bc50dd1235127ffe8efb47d8332 WHIRLPOOL 7e2d3089e8709d8aa192873a297fdbd60baa63321ff23f8c4ba8a8fe92cc1c64795ac7c79260ac39a173c680c8f263463c3d0fff01873e071cf41594a47f2908
|
||||
AUX mdbtools-0.6_pre2-as-needed.patch 482 SHA256 38d06663bc41ced3e094d4a78d6a0b81909b08720bec2696ef7431fb90519416 SHA512 e2ffbb01eb8f70c383deeeab14101ee9c3f07cce2b5d490c571f54960a2db3df0067f47c8d138d4fe8734d18de5f62fed3b37b168f7f752aa15ccfda06566a2a WHIRLPOOL a6d80445bb9a8eb678cf816d29f776d812f932956d9642cfb020df49d5ea783381d5ec3d6f201b7b6100d902faa3e2f3d8adfcd68010df42a95b343de7a6fd5b
|
||||
AUX mdbtools-0.6_pre2-gcc34.patch 1468 SHA256 ae0f0ea67b9bcc8851073acba54297268f00a31a0d286b59680f7a28f15ba108 SHA512 66c9ef00fd1ac6dd23f05e243765df5facfafaeb40ddb3343b7c84b3f27edddb1039dbb0d3b231c6cd5aab66c9be127fd96dc7ac7d386fb190f025827583c929 WHIRLPOOL c478a3c333658541b68d0861a08476bc4c0893b56ee8349d699e26f6507a876c8019b2446cd21bbd2113810e8aced9589631ac146edc667c9a70a9352edaa61b
|
||||
AUX mdbtools-0.6_pre2-haveiconv-fix.patch 660 SHA256 e7fc8f4809968f0cfc8e890d8dc6ca98abd51f1c243d25276e566f88f9461887 SHA512 3f286d6d4814a56025bf69fd3c639821604877f20e86ead312af4c8d2a17dd1428e4afa0f01017f4e1a283f8784bb4141db4f612cc4b887fcbd491e5fb3ac447 WHIRLPOOL b3e50f006d8f880ebfa5e248ca732a0125b759617e39a9bea0c5183b75e53d1fb0985df990576b4e6fedb1f005ecd36d7f315fdd492e7a92bfe14d7897eb83fa
|
||||
AUX mdbtools-0.6_pre2-odbc_definitions.patch 4060 SHA256 d3381970ce81ebf4663f00424af02cb5544f7c5095abba87117813182789f6b1 SHA512 ea6d962988a51ef2c2e9b69d75ed526ad9b9916812f965fc1a80881d3dbe98a61fae0b07cbad2966bc59b587055d1adceff668bce4a8f82c910b8263c607421a WHIRLPOOL e2162876e4153eaaf60d655ef430f31e999e67b62979fbd46fc31116b7fc3f1139a76ba960967d85e2ba8f17883836bba4dbc8cc422e56a3e03e717c2229d066
|
||||
AUX mdbtools-0.6_pre2-parallel-make.patch 655 SHA256 406acd023f0af39a0d2b2b25284efd5e01defffbfade6c17ee9dcacdaa29e15a SHA512 cd2f5284b4ea9e302207317a40f56c35eb2ca94cf9bc59c3f11c8cfc42833e75befb2064e8c8e91333037525d75d0613920bb2421e4c3058a6f19932a46c222a WHIRLPOOL b92287cd93aacddb6fce25e3fcc8fc1288bc72534d6b46bf05264a353a1fe531522399ec5d346dae0f68723c7ca8ff8d79b236faa984e3e1ec7d1d0837d89a10
|
||||
AUX mdbtools-0.7.1-parallel-make.patch 513 SHA256 def6502ecc1d21ba17829de1c4f42194fb78eb39185189b2b4d13d13bfdf5e38 SHA512 946139271a757a8beeeb03a909104bc348cbc081a9ef6dde7f739865c775cce06717de57560a49b5055d5196b1f3985824b80b728f139cf7684c0ba847f4bd85 WHIRLPOOL 0a164f299d58f950d842fcc63f1ff67d1a967e86d4ed746d5884358060c3a0ab3c97e96aadcb26982b213695fa323f2b0cab8d083faf80da2257d08e51a68f3d
|
||||
DIST mdbtools-0.7.1.tar.gz 277257 SHA256 dcf310dc7b07e7ad2f9f6be16047dc81312cfe1ab1bd94d0fa739c8059af0b16 SHA512 bbad415c59a3f54c11bcd04971220b1370046c5dfd7300d1f23e597615a1df6af850c6f767e78033676d486d87a11c72dfdb141abbee8378337c3fda9a450b75 WHIRLPOOL 0e25f7d5a2108575bc3fdf2930ceedc21844412fb7947c504f2538b185f8f623712c31ca9102660446731dc19fb431217aa70c7ee658f07d951966921fc2fc7a
|
||||
DIST mdbtools-cvs-20050624.tar.gz 306961 SHA256 471034a00f9441e34b3a236ce07bdb766fea0bd140fc69a3d8a9c7225bf573b3 SHA512 6b0dabbd2442a50b91ed058ae65c02b85c8622e3773e08f7f9249a6a5fe0b43a22d7343ef19c79b77277c215652091e19e46d1a3f7896a5a9b556a5d3f544d74 WHIRLPOOL 91268a6258198e1bfc8b83cb5681cd0f29582dbd711fc3ba6e7d950e38b933c8d9b91c0b6e53fdccdecfc75b6ffc22d7762e95a413ee1e6b04018dc4b0c322f4
|
||||
EBUILD mdbtools-0.6_pre2-r2.ebuild 1988 SHA256 91efe472217d7ad4aded62d7f8828988c1122c5eeb865d1f8775cd53fea05aea SHA512 df1fd5be97be414d7c5fd15379f275741268f89d6746f02ec198b084f6840d55bff10d58dd1ad8d1cf5f67aed8fa8b22e0a30c3c8bd809f5d0582e473c726636 WHIRLPOOL ade2efea1ba50a7863cb754718d136344176fc1654dcdf8c911b93d195e5f0453b9687fd76f9f65eab2fc3adaa3fea4e48785edfdb5edf9c0a3d19b8b5990804
|
||||
EBUILD mdbtools-0.7.1-r1.ebuild 1256 SHA256 2420777e40ad5542c945ff7a7e1bf85be058c49c7ad2aa26016f751b92fb977b SHA512 197f42415df750543bc0488e9d6c40c36653f9a5441d19b871396e45be39e8809a385bf534bd7eecf583c9e05654f2b1a51fc686f1af7e0758a205c0024b6506 WHIRLPOOL 7c7a9b1de4b61078e72e84faa21e186500562a30d945c0804b770880ad938b69c18b46c07c7c0d62a9c59204398f3b58c0aeaed07150affe5d9ee5f6940b2048
|
||||
EBUILD mdbtools-0.7.1.ebuild 1222 SHA256 58767eabd0e447d6db6f224374a82a81691443b4ad122604efa49251c9235b55 SHA512 417469949bf52395a3d2c2bea4d5d6ca92c454895604374868dbf275f0cad9b23ed1eac1de41433d02820269b5fb12ea6b2c36024e1e1b5d73249e75af26d54b WHIRLPOOL 83176602a26900f8c21501f62c83aec45547043781240cb243f15ab56b70efb586ce638d3e43d8e359550f9784a278be76fdf9cbba4268c6696f1bb1bc553b91
|
||||
MISC ChangeLog 9579 SHA256 88e20ea55410552d49c3d08891cf43219c909447a1c0f74ccfb5ab6ff98b006e SHA512 ef18c2352b5279c57e5d774f994b1c98995da2c31b9c8d944b6b14d6384fa490ea910f48bff5a56f2805b9a8b8cde03f05a8aee6830aeb01a1493ac76368b829 WHIRLPOOL 98e089ab8b1ba7927c15ee6ceeb3e56546ac18b3e61b587191b12c5adbd35952ff08badb93e6ba2b42535661159c6d0bfa1958554d5e84b3fdaf28874cf30264
|
||||
MISC ChangeLog 9676 SHA256 d9a4ad65f8bdc31cb4f208edd7c1f88ef5de7028ee41402496bca5e36f7323d7 SHA512 8264161c6b7006190f3dd33af820c8a6965ac2c378a5614547956e46e661f453d561beaeea31277dec91c1090ca4b95f8198d15201bf96895ba06c529e7c4f9b WHIRLPOOL 12447f4afe18cc0d1c2cd2e0872e11d61b978cc70e9288adce0654440807b6000ada18bd04b9d17714d2953f52236cd188eba2b01fefceab639d82275f174281
|
||||
MISC metadata.xml 481 SHA256 e66bcca97272fab6ff14c8cf5a37d5ad5941ac1de2c16ec8d83ef56c8a616f87 SHA512 5fad42d6a14c140968c0155e5a1909a8fd007ba646fffb1c1ff1bfa98b6d8f81782aebf28a20fcce48b727b1d51d6adc1c5aa1fcc20d5e1535e51c3725da111e WHIRLPOOL 53ff3b6479b5201b31b4a5733392340185ce20980b095f9d05c5aa87003596c6d68c3cf683ec2208f1f7027d24a47bb45c483184e83324d029de275b7a8ebe27
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
|
||||
iEYEAREIAAYFAlVDCdAACgkQVWmRsqeSphMmOgCeMWXO3aeCeGE2xafsbcsQcGTK
|
||||
SjoAnA1b+dIvpp0hlLKuJ7vkQDAxI1ND
|
||||
=YViL
|
||||
iQEcBAEBCAAGBQJVVIjaAAoJECo/aRed92672L4H/1arf1Bx7aQCIs+ixYm4xMqc
|
||||
0akQrbi7rIBi2Z4Dnma66EoxexCdHuoTMgSONt2s7iWzpoBmMu1Mg+3e75jXSMNp
|
||||
Q0eNnI5zT1bDDL3uGC6cPhQ45jkQFAE/QWPHHTfGnx6VToANd2wcBiIkuls2OTla
|
||||
Wn7JuBu5WcwwxvmQWcDQVl9uX2AjtsKVc8FBbkfVXOEYWRZd25/VTjiuXbPhE1mG
|
||||
vZDKIbO58Yw+ZSFFPYGTTMtcMD2t2zvuVCBhi7vhDu2BAFsiyT8FH/leCJnCOj29
|
||||
R0ph+dNVd9t4SPw6ddeVwvhRo3P5OhTJ10tztYAF9HrX4qRnTLXWyNMDAjrfWZY=
|
||||
=Su+t
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- src/odbc/Makefile.am.orig 2006-07-26 14:05:55.000000000 +0200
|
||||
+++ src/odbc/Makefile.am 2006-07-26 14:06:02.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
$(patsubst %.c, %.lo, $(SQLSOURCES))) \
|
||||
$(patsubst %, $(MDBDIR)/%, \
|
||||
$(patsubst %.c, %.lo, $(MDBSOURCES)))
|
||||
-LIBS = @LEXLIB@ $(GLIB_LIBS) $(ODBC_LIBS)
|
||||
+LIBS = @LEXLIB@ $(GLIB_LIBS) $(ODBC_LIBS) -lm
|
||||
unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la
|
||||
|
||||
## Need blank statement to avoid compiling odbc.c
|
@ -1,35 +0,0 @@
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/gmdb2/sql.c mdbtools-0.6pre1/src/gmdb2/sql.c
|
||||
--- mdbtools-0.6pre1-orig/src/gmdb2/sql.c 2004-02-13 13:49:52.000000000 -0500
|
||||
+++ mdbtools-0.6pre1/src/gmdb2/sql.c 2005-10-18 08:00:19.088362686 -0400
|
||||
@@ -38,6 +38,8 @@
|
||||
|
||||
void gmdb_sql_tree_populate(MdbHandle *mdb, GladeXML *xml);
|
||||
void gmdb_sql_load_query(GladeXML *xml, gchar *file_path);
|
||||
+void gmdb_sql_save_as_cb(GtkWidget *w, GladeXML *xml);
|
||||
+void gmdb_sql_save_query(GladeXML *xml, gchar *file_path);
|
||||
|
||||
void
|
||||
gmdb_sql_close_all()
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/gmdb2/table_export.c mdbtools-0.6pre1/src/gmdb2/table_export.c
|
||||
--- mdbtools-0.6pre1-orig/src/gmdb2/table_export.c 2003-01-14 12:37:44.000000000 -0500
|
||||
+++ mdbtools-0.6pre1/src/gmdb2/table_export.c 2005-10-18 08:00:19.089362678 -0400
|
||||
@@ -37,6 +37,8 @@
|
||||
#define NEVER "Never"
|
||||
#define AUTOMAT "Automatic (where necessary)"
|
||||
|
||||
+void gmdb_table_export_populate_dialog(GladeXML *xml);
|
||||
+
|
||||
void
|
||||
gmdb_print_quote(FILE *outfile, int need_quote, char quotechar, char *colsep, char *str)
|
||||
{
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/odbc/odbc.c mdbtools-0.6pre1/src/odbc/odbc.c
|
||||
--- mdbtools-0.6pre1-orig/src/odbc/odbc.c 2004-05-30 04:06:43.000000000 -0400
|
||||
+++ mdbtools-0.6pre1/src/odbc/odbc.c 2005-10-18 08:00:19.090362669 -0400
|
||||
@@ -46,6 +46,7 @@
|
||||
static SQLRETURN SQL_API _SQLFreeConnect(SQLHDBC hdbc);
|
||||
static SQLRETURN SQL_API _SQLFreeEnv(SQLHENV henv);
|
||||
static SQLRETURN SQL_API _SQLFreeStmt(SQLHSTMT hstmt, SQLUSMALLINT fOption);
|
||||
+static void bind_columns(struct _hstmt *stmt);
|
||||
|
||||
static void bind_columns (struct _hstmt*);
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -ur mdbtools-0.6pre1-orig/include/mdbtools.h mdbtools-0.6pre1/include/mdbtools.h
|
||||
--- mdbtools-0.6pre1-orig/include/mdbtools.h 2006-05-28 18:01:32.000000000 -0400
|
||||
+++ mdbtools-0.6pre1/include/mdbtools.h 2006-05-28 18:04:33.000000000 -0400
|
||||
@@ -147,7 +147,7 @@
|
||||
#define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3)
|
||||
|
||||
/* hash to store registered backends */
|
||||
-extern GHashTable *mdb_backends;
|
||||
+static GHashTable *mdb_backends;
|
||||
|
||||
/* forward declarations */
|
||||
typedef struct mdbindex MdbIndex;
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- src/extras/mdbsupport.c.orig 2007-05-13 11:55:43.000000000 +0200
|
||||
+++ src/extras/mdbsupport.c 2007-05-13 11:55:57.000000000 +0200
|
||||
@@ -1,6 +1,7 @@
|
||||
/* support routines for code generated by the util programs */
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
void dump_int (int i)
|
||||
{
|
@ -1,11 +0,0 @@
|
||||
--- src/odbc/Makefile.am.orig 2006-07-26 14:05:55.000000000 +0200
|
||||
+++ src/odbc/Makefile.am 2006-07-26 14:06:02.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
$(patsubst %.c, %.lo, $(SQLSOURCES))) \
|
||||
$(patsubst %, $(MDBDIR)/%, \
|
||||
$(patsubst %.c, %.lo, $(MDBSOURCES)))
|
||||
-LIBS = @LEXLIB@ $(GLIB_LIBS) $(ODBC_LIBS)
|
||||
+LIBS = @LEXLIB@ $(GLIB_LIBS) $(ODBC_LIBS) -lm
|
||||
unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la
|
||||
|
||||
## Need blank statement to avoid compiling odbc.c
|
@ -1,35 +0,0 @@
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/gmdb2/sql.c mdbtools-0.6pre1/src/gmdb2/sql.c
|
||||
--- src/gmdb2/sql.c 2004-02-13 13:49:52.000000000 -0500
|
||||
+++ src/gmdb2/sql.c 2005-10-18 08:00:19.088362686 -0400
|
||||
@@ -38,6 +38,8 @@
|
||||
|
||||
static void gmdb_sql_tree_populate(MdbHandle *mdb, GladeXML *xml);
|
||||
static void gmdb_sql_load_query(GladeXML *xml, gchar *file_path);
|
||||
+void gmdb_sql_save_as_cb(GtkWidget *w, GladeXML *xml);
|
||||
+void gmdb_sql_save_query(GladeXML *xml, gchar *file_path);
|
||||
|
||||
void
|
||||
gmdb_sql_close_all()
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/gmdb2/table_export.c mdbtools-0.6pre1/src/gmdb2/table_export.c
|
||||
--- src/gmdb2/table_export.c 2003-01-14 12:37:44.000000000 -0500
|
||||
+++ src/gmdb2/table_export.c 2005-10-18 08:00:19.089362678 -0400
|
||||
@@ -37,6 +37,8 @@
|
||||
#define NEVER "Never"
|
||||
#define AUTOMAT "Automatic (where necessary)"
|
||||
|
||||
+void gmdb_table_export_populate_dialog(GladeXML *xml);
|
||||
+
|
||||
void
|
||||
gmdb_print_quote(FILE *outfile, int need_quote, char quotechar, char *colsep, char *str)
|
||||
{
|
||||
diff -Naur mdbtools-0.6pre1-orig/src/odbc/odbc.c mdbtools-0.6pre1/src/odbc/odbc.c
|
||||
--- src/odbc/odbc.c 2004-05-30 04:06:43.000000000 -0400
|
||||
+++ src/odbc/odbc.c 2005-10-18 08:00:19.090362669 -0400
|
||||
@@ -46,6 +46,7 @@
|
||||
static SQLRETURN SQL_API _SQLFreeConnect(SQLHDBC hdbc);
|
||||
static SQLRETURN SQL_API _SQLFreeEnv(SQLHENV henv);
|
||||
static SQLRETURN SQL_API _SQLFreeStmt(SQLHSTMT hstmt, SQLUSMALLINT fOption);
|
||||
+static void bind_columns(struct _hstmt *stmt);
|
||||
|
||||
static void bind_columns (struct _hstmt*);
|
||||
|
@ -1,22 +0,0 @@
|
||||
diff -u -r mdbtools/src/libmdb/file.c mdbtools.fix/src/libmdb/file.c
|
||||
--- mdbtools/src/libmdb/file.c 2005-06-28 13:53:40.000000000 +0900
|
||||
+++ mdbtools.fix/src/libmdb/file.c 2009-09-09 04:02:47.000000000 +0900
|
||||
@@ -17,6 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
#include "mdbtools.h"
|
||||
|
||||
#ifdef DMALLOC
|
||||
diff -u -r mdbtools/src/libmdb/iconv.c mdbtools.fix/src/libmdb/iconv.c
|
||||
--- mdbtools/src/libmdb/iconv.c 2005-09-08 08:27:43.000000000 +0900
|
||||
+++ mdbtools.fix/src/libmdb/iconv.c 2009-09-09 04:00:36.000000000 +0900
|
||||
@@ -17,6 +17,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
#include "mdbtools.h"
|
||||
#include "errno.h"
|
||||
|
@ -1,146 +0,0 @@
|
||||
--- mdbtools-cvs-20050624/src/odbc/odbc.c.orig 2010-05-24 10:20:59.000000000 -0400
|
||||
+++ mdbtools-cvs-20050624/src/odbc/odbc.c 2010-05-25 17:28:05.000000000 -0400
|
||||
@@ -210,7 +210,7 @@
|
||||
SQLHSTMT hstmt,
|
||||
SQLUSMALLINT ipar,
|
||||
SQLSMALLINT FAR *pfSqlType,
|
||||
- SQLUINTEGER FAR *pcbParamDef,
|
||||
+ SQLULEN FAR *pcbParamDef,
|
||||
SQLSMALLINT FAR *pibScale,
|
||||
SQLSMALLINT FAR *pfNullable)
|
||||
{
|
||||
@@ -221,8 +221,8 @@
|
||||
SQLRETURN SQL_API SQLExtendedFetch(
|
||||
SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fFetchType,
|
||||
- SQLINTEGER irow,
|
||||
- SQLUINTEGER FAR *pcrow,
|
||||
+ SQLLEN irow,
|
||||
+ SQLULEN FAR *pcrow,
|
||||
SQLUSMALLINT FAR *rgfRowStatus)
|
||||
{
|
||||
struct _hstmt *stmt = (struct _hstmt *) hstmt;
|
||||
@@ -297,8 +297,8 @@
|
||||
|
||||
SQLRETURN SQL_API SQLParamOptions(
|
||||
SQLHSTMT hstmt,
|
||||
- SQLUINTEGER crow,
|
||||
- SQLUINTEGER FAR *pirow)
|
||||
+ SQLULEN crow,
|
||||
+ SQLULEN FAR *pirow)
|
||||
{
|
||||
TRACE("SQLParamOptions");
|
||||
return SQL_SUCCESS;
|
||||
@@ -347,7 +347,7 @@
|
||||
|
||||
SQLRETURN SQL_API SQLSetPos(
|
||||
SQLHSTMT hstmt,
|
||||
- SQLUSMALLINT irow,
|
||||
+ SQLSETPOSIROW irow,
|
||||
SQLUSMALLINT fOption,
|
||||
SQLUSMALLINT fLock)
|
||||
{
|
||||
@@ -398,11 +398,11 @@
|
||||
SQLSMALLINT fParamType,
|
||||
SQLSMALLINT fCType,
|
||||
SQLSMALLINT fSqlType,
|
||||
- SQLUINTEGER cbColDef,
|
||||
+ SQLULEN cbColDef,
|
||||
SQLSMALLINT ibScale,
|
||||
SQLPOINTER rgbValue,
|
||||
- SQLINTEGER cbValueMax,
|
||||
- SQLINTEGER FAR *pcbValue)
|
||||
+ SQLLEN cbValueMax,
|
||||
+ SQLLEN FAR *pcbValue)
|
||||
{
|
||||
struct _hstmt *stmt;
|
||||
|
||||
@@ -502,8 +502,8 @@
|
||||
SQLUSMALLINT icol,
|
||||
SQLSMALLINT fCType,
|
||||
SQLPOINTER rgbValue,
|
||||
- SQLINTEGER cbValueMax,
|
||||
- SQLINTEGER FAR *pcbValue)
|
||||
+ SQLLEN cbValueMax,
|
||||
+ SQLLEN FAR *pcbValue)
|
||||
{
|
||||
struct _hstmt *stmt = (struct _hstmt *) hstmt;
|
||||
struct _sql_bind_info *cur, *newitem;
|
||||
@@ -594,7 +594,7 @@
|
||||
SQLSMALLINT cbColNameMax,
|
||||
SQLSMALLINT FAR *pcbColName,
|
||||
SQLSMALLINT FAR *pfSqlType,
|
||||
- SQLUINTEGER FAR *pcbColDef, /* precision */
|
||||
+ SQLULEN FAR *pcbColDef, /* precision */
|
||||
SQLSMALLINT FAR *pibScale,
|
||||
SQLSMALLINT FAR *pfNullable)
|
||||
{
|
||||
@@ -649,7 +649,7 @@
|
||||
SQLPOINTER rgbDesc,
|
||||
SQLSMALLINT cbDescMax,
|
||||
SQLSMALLINT FAR *pcbDesc,
|
||||
- SQLINTEGER FAR *pfDesc)
|
||||
+ SQLLEN FAR *pfDesc)
|
||||
{
|
||||
int namelen, i;
|
||||
struct _hstmt *stmt;
|
||||
@@ -969,7 +969,7 @@
|
||||
|
||||
SQLRETURN SQL_API SQLRowCount(
|
||||
SQLHSTMT hstmt,
|
||||
- SQLINTEGER FAR *pcrow)
|
||||
+ SQLLEN FAR *pcrow)
|
||||
{
|
||||
struct _hstmt *stmt=(struct _hstmt *)hstmt;
|
||||
|
||||
@@ -1002,10 +1002,10 @@
|
||||
SQLUSMALLINT ipar,
|
||||
SQLSMALLINT fCType,
|
||||
SQLSMALLINT fSqlType,
|
||||
- SQLUINTEGER cbParamDef,
|
||||
+ SQLULEN cbParamDef,
|
||||
SQLSMALLINT ibScale,
|
||||
SQLPOINTER rgbValue,
|
||||
- SQLINTEGER FAR *pcbValue)
|
||||
+ SQLLEN FAR *pcbValue)
|
||||
{
|
||||
TRACE("SQLSetParam");
|
||||
return SQL_SUCCESS;
|
||||
@@ -1125,8 +1125,8 @@
|
||||
SQLUSMALLINT icol,
|
||||
SQLSMALLINT fCType,
|
||||
SQLPOINTER rgbValue,
|
||||
- SQLINTEGER cbValueMax,
|
||||
- SQLINTEGER FAR *pcbValue)
|
||||
+ SQLLEN cbValueMax,
|
||||
+ SQLLEN FAR *pcbValue)
|
||||
{
|
||||
struct _hstmt *stmt;
|
||||
struct _hdbc *dbc;
|
||||
@@ -1457,7 +1457,7 @@
|
||||
SQLRETURN SQL_API SQLPutData(
|
||||
SQLHSTMT hstmt,
|
||||
SQLPOINTER rgbValue,
|
||||
- SQLINTEGER cbValue)
|
||||
+ SQLLEN cbValue)
|
||||
{
|
||||
TRACE("SQLPutData");
|
||||
return SQL_SUCCESS;
|
||||
@@ -1466,7 +1466,7 @@
|
||||
SQLRETURN SQL_API SQLSetConnectOption(
|
||||
SQLHDBC hdbc,
|
||||
SQLUSMALLINT fOption,
|
||||
- SQLUINTEGER vParam)
|
||||
+ SQLULEN vParam)
|
||||
{
|
||||
TRACE("SQLSetConnectOption");
|
||||
return SQL_SUCCESS;
|
||||
@@ -1475,7 +1475,7 @@
|
||||
SQLRETURN SQL_API SQLSetStmtOption(
|
||||
SQLHSTMT hstmt,
|
||||
SQLUSMALLINT fOption,
|
||||
- SQLUINTEGER vParam)
|
||||
+ SQLULEN vParam)
|
||||
{
|
||||
TRACE("SQLSetStmtOption");
|
||||
return SQL_SUCCESS;
|
@ -1,18 +0,0 @@
|
||||
--- mdbtools-cvs-20050624.orig/src/sql/Makefile.am 2005-01-15 06:02:06.000000000 +0100
|
||||
+++ mdbtools-cvs-20050624/src/sql/Makefile.am 2010-01-12 13:04:01.000000000 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
lib_LTLIBRARIES = libmdbsql.la
|
||||
-libmdbsql_la_SOURCES= mdbsql.c parser.y lexer.l
|
||||
+libmdbsql_la_SOURCES= mdbsql.c parser.y lexer.l parser.h
|
||||
libmdbsql_la_LDFLAGS = -version-info 1:0:0
|
||||
DISTCLEANFILES = parser.c parser.h lexer.c
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
|
||||
@@ -7,5 +7,8 @@
|
||||
LDADD = ../libmdb/libmdb.la
|
||||
YACC = @YACC@ -d
|
||||
|
||||
+parser.h: parser.lo
|
||||
+lexer.lo: parser.h
|
||||
+
|
||||
dist-hook:
|
||||
rm -f $(distdir)/parser.c $(distdir)/parser.h $(distdir)/lexer.c
|
@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-office/mdbtools/mdbtools-0.6_pre2-r2.ebuild,v 1.10 2012/05/03 20:00:39 jdhore Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
# Will fail with 1.10+ because of config.rpath
|
||||
WANT_AUTOMAKE="1.9"
|
||||
|
||||
inherit eutils autotools
|
||||
|
||||
MY_P=${P/_/}
|
||||
S="${WORKDIR}/${PN}-cvs-20050624"
|
||||
|
||||
DESCRIPTION="A set of libraries and utilities for reading Microsoft Access database (MDB) files"
|
||||
HOMEPAGE="http://sourceforge.net/projects/mdbtools"
|
||||
SRC_URI="mirror://gentoo/${PN}-cvs-20050624.tar.gz"
|
||||
|
||||
IUSE="gnome odbc static-libs"
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2
|
||||
sys-libs/ncurses
|
||||
sys-libs/readline
|
||||
gnome? (
|
||||
>=gnome-base/libglade-2
|
||||
>=gnome-base/libgnomeui-2 )
|
||||
odbc? ( >=dev-db/unixODBC-2.0 )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/flex-2.5.0
|
||||
>=sys-devel/bison-1.35"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-gcc34.patch
|
||||
epatch "${FILESDIR}"/${P}-as-needed.patch
|
||||
epatch "${FILESDIR}"/${P}-haveiconv-fix.patch
|
||||
epatch "${FILESDIR}"/${P}-parallel-make.patch
|
||||
epatch "${FILESDIR}"/${P}-odbc_definitions.patch
|
||||
|
||||
# This is necessary since the upstream tarball was created with a
|
||||
# buggy libtool, and the .so suffix in library names is lost in
|
||||
# some platforms (e.g. amd64). Starting with libtool 2.2.4 it is
|
||||
# also necessary to remove the acinclude.m4 file since it contains
|
||||
# an old libtool.m4 that is obsolete, #227257.
|
||||
rm "${S}"/acinclude.m4
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
use odbc && myconf="${myconf} --with-unixodbc=/usr"
|
||||
|
||||
econf ${myconf} \
|
||||
$(use_enable static-libs static) || die "configure failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "Installation failed"
|
||||
dodoc COPYING* NEWS README* TODO AUTHORS HACKING ChangeLog
|
||||
|
||||
# add a compat symlink (gmdb2 is not compiled if gnome USE flag is disabled)
|
||||
use gnome && dosym gmdb2 /usr/bin/gmdb
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/build-docbook-catalog/build-docbook-catalog-1.19.1-r1.ebuild,v 1.2 2014/01/18 11:46:00 vapier Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="DocBook XML catalog auto-updater"
|
||||
HOMEPAGE="http://sources.gentoo.org/gentoo-src/build-docbook-catalog/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.xz
|
||||
http://dev.gentoo.org/~floppym/distfiles/${P}.tar.xz
|
||||
http://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="userland_BSD kernel_linux"
|
||||
|
||||
RDEPEND="kernel_linux? ( sys-apps/util-linux )
|
||||
!kernel_linux? ( app-misc/getopt )
|
||||
!<app-text/docbook-xsl-stylesheets-1.73.1
|
||||
userland_BSD? ( sys-apps/flock )
|
||||
dev-libs/libxml2"
|
||||
DEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
if use prefix ; then
|
||||
sed -i -e "/^\(ROOTCONFDIR\|DOCBOOKDIR\)=/s:=/:=${EPREFIX}/:" build-docbook-catalog || die
|
||||
sed -i -e "/^\(SYSCONFDIR\|PREFIX\) = /s:= /:= ${EPREFIX}/:" Makefile || die
|
||||
if use !kernel_linux ; then
|
||||
sed -i -e '/opts=/s/getopt/getopt-long/' build-docbook-catalog || die
|
||||
fi
|
||||
epatch "${FILESDIR}"/${P}-no-flock.patch # obsoletes flock requirement
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# New version -> regen files
|
||||
build-docbook-catalog
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/html-xml-utils/html-xml-utils-6.0.ebuild,v 1.6 2014/08/10 18:23:58 slyfox Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="A number of simple utilities for manipulating HTML and XML files"
|
||||
SRC_URI="http://www.w3.org/Tools/HTML-XML-utils/${P}.tar.gz"
|
||||
HOMEPAGE="http://www.w3.org/Tools/HTML-XML-utils/"
|
||||
|
||||
LICENSE="W3C"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE=""
|
@ -1,121 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/stardict/stardict-3.0.5.ebuild,v 1.3 2015/03/03 06:02:53 dlan Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
# NOTE: Even though the *.dict.dz are the same as dictd/freedict's files,
|
||||
# their indexes seem to be in a different format. So we'll keep them
|
||||
# seperate for now.
|
||||
|
||||
# NOTE: Festival plugin crashes, bug 188684. Disable for now.
|
||||
|
||||
GNOME2_LA_PUNT=yes
|
||||
GCONF_DEBUG=no
|
||||
|
||||
inherit eutils gnome2
|
||||
|
||||
DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
|
||||
HOMEPAGE="http://stardict-4.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}-4/${P}.tar.bz2
|
||||
pronounce? ( http://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
|
||||
qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
|
||||
|
||||
LICENSE="CPL-1.0 GPL-3 LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="espeak gucharmap qqwry pronounce spell tools"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND=">=dev-libs/glib-2.16:2=
|
||||
dev-libs/libsigc++:2=
|
||||
sys-libs/zlib:=
|
||||
>=x11-libs/gtk+-2.20:2=
|
||||
gucharmap? ( >=gnome-extra/gucharmap-2.22.1:0 )
|
||||
spell? ( >=app-text/enchant-1.2 )
|
||||
tools? (
|
||||
dev-libs/libpcre:=
|
||||
dev-libs/libxml2:=
|
||||
virtual/mysql
|
||||
)"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
espeak? ( >=app-accessibility/espeak-1.29 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-text/docbook-xml-dtd:4.3
|
||||
app-text/gnome-doc-utils
|
||||
dev-libs/libxslt
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_configure() {
|
||||
# Hint: EXTRA_ECONF="--enable-gnome-support" and manual install of
|
||||
# libbonobo-2, libgnome-2, libgnomeui-2, gconf-2 and orbit-2 will
|
||||
# give you GNOME 2.x support, that is otherwise considered deprecated
|
||||
# because of the deep GNOME 2.x core library dependencies
|
||||
gnome2_src_configure \
|
||||
$(use_enable tools) \
|
||||
--disable-scrollkeeper \
|
||||
$(use_enable spell) \
|
||||
$(use_enable gucharmap) \
|
||||
--disable-festival \
|
||||
$(use_enable espeak) \
|
||||
$(use_enable qqwry) \
|
||||
--disable-updateinfo \
|
||||
--disable-gnome-support \
|
||||
--disable-gpe-support \
|
||||
--disable-schemas-install
|
||||
}
|
||||
|
||||
src_install() {
|
||||
gnome2_src_install
|
||||
|
||||
dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
|
||||
|
||||
if use qqwry; then
|
||||
insinto /usr/share/${PN}/data
|
||||
doins ../QQWry.Dat
|
||||
fi
|
||||
|
||||
if use pronounce; then
|
||||
docinto WyabdcRealPeopleTTS
|
||||
dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
|
||||
rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
|
||||
insinto /usr/share
|
||||
doins -r ../WyabdcRealPeopleTTS
|
||||
fi
|
||||
|
||||
# noinst_PROGRAMS with ${PN}_ prefix from tools/src/Makefile.am wrt #292773
|
||||
if use tools; then
|
||||
local app
|
||||
local apps="${PN}-editor pydict2dic olddic2newdic oxford2dic directory2dic
|
||||
dictd2dic wquick2dic ec50 directory2treedic treedict2dir jdictionary mova
|
||||
xmlinout soothill kanjidic2 powerword kdic 21tech 21shiji buddhist
|
||||
tabfile cedict edict duden ${PN}-dict-update degb2utf frgb2utf
|
||||
jpgb2utf gmx2utf rucn kingsoft wikipedia wikipediaImage babylon
|
||||
${PN}2txt ${PN}-verify fest2dict i2e2dict downloadwiki
|
||||
ooo2dict myspell2dic exc2i2e dictbuilder tabfile2sql KangXi Unihan
|
||||
xiaoxuetang-ja wubi ydp2dict wordnet lingvosound2resdb
|
||||
resdatabase2dir dir2resdatabase ${PN}-index sd2foldoc ${PN}-text2bin
|
||||
${PN}-bin2text ${PN}-repair"
|
||||
|
||||
for app in ${apps}; do
|
||||
newbin tools/src/${app} ${PN}_${app}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
|
||||
elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
|
||||
elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
|
||||
elog '"echo %s | festival --tts"'
|
||||
elog
|
||||
elog "You will now need to install ${PN} dictionary files. If"
|
||||
elog "you have not, execute the below to get a list of dictionaries:"
|
||||
elog
|
||||
elog " emerge -s ${PN}-"
|
||||
|
||||
gnome2_pkg_postinst
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue