summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2009-11-20 13:15:10 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2009-11-20 13:15:10 +0000
commit435bfecd747672c9dde829b24fea63cd535c1221 (patch)
tree3b043c30bf879ad0d2d2dae4342978b11876a783 /app-emulation
parentamd64/x86 stable, bug #293708 (diff)
downloadgentoo-2-435bfecd747672c9dde829b24fea63cd535c1221.tar.gz
gentoo-2-435bfecd747672c9dde829b24fea63cd535c1221.tar.bz2
gentoo-2-435bfecd747672c9dde829b24fea63cd535c1221.zip
Move modprobe config file to new location, Bug #275151. Remove deprecated NAME=%k from udev rule.
(Portage version: 2.2_rc50/cvs/Linux i686)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/kqemu/ChangeLog9
-rw-r--r--app-emulation/kqemu/kqemu-1.4.0_pre1-r1.ebuild97
2 files changed, 105 insertions, 1 deletions
diff --git a/app-emulation/kqemu/ChangeLog b/app-emulation/kqemu/ChangeLog
index 42b4c43857b6..e213674f69cd 100644
--- a/app-emulation/kqemu/ChangeLog
+++ b/app-emulation/kqemu/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-emulation/kqemu
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/kqemu/ChangeLog,v 1.28 2009/09/23 15:33:38 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/kqemu/ChangeLog,v 1.29 2009/11/20 13:15:10 zzam Exp $
+
+*kqemu-1.4.0_pre1-r1 (20 Nov 2009)
+
+ 20 Nov 2009; Matthias Schwarzott <zzam@gentoo.org>
+ +kqemu-1.4.0_pre1-r1.ebuild:
+ Move modprobe config file to new location, Bug #275151. Remove deprecated
+ NAME=%k from udev rule.
23 Sep 2009; Patrick Lauer <patrick@gentoo.org> kqemu-0.7.2.ebuild:
Remove virtual/libc
diff --git a/app-emulation/kqemu/kqemu-1.4.0_pre1-r1.ebuild b/app-emulation/kqemu/kqemu-1.4.0_pre1-r1.ebuild
new file mode 100644
index 000000000000..f201bf03a739
--- /dev/null
+++ b/app-emulation/kqemu/kqemu-1.4.0_pre1-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/kqemu/kqemu-1.4.0_pre1-r1.ebuild,v 1.1 2009/11/20 13:15:10 zzam Exp $
+
+inherit eutils flag-o-matic linux-mod toolchain-funcs
+
+MY_PV=${PV/_/}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator kernel fast execution module"
+HOMEPAGE="http://bellard.org/qemu/"
+SRC_URI="http://bellard.org/qemu/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="strip"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND=""
+RDEPEND=""
+
+pkg_setup() {
+ MODULE_NAMES="kqemu(misc:${S})"
+ linux-mod_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' kqemu-linux.c
+ sed -e 's:-Werror::' -i common/Makefile #260876
+ sed -e '/^CC/d;/^HOST_CC/d;' \
+ -e 's/\(^MON_CC=\).*/\1$(CC)/' \
+ -e "s/\(^MON_LD=\).*/\1$(tc-getLD)/" \
+ -e 's/^\(TOOLS_CFLAGS.*\)/\1 $(CFLAGS)/' \
+ -e 's/^\(MON_CFLAGS.*\)/\1 $(CFLAGS)/' \
+ -e 's/^\(KERNEL_CFLAGS.*\)/\1 $(CFLAGS)/' \
+ -e 's/^CFLAGS=\(.*\)/CFLAGS+=\1/' \
+ -i common/Makefile
+ epatch "${FILESDIR}/${P}-missing-sched-header.patch"
+}
+
+src_compile() {
+ filter-flags -fpie -fstack-protector
+
+ ./configure --kernel-path="${KV_DIR}" \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --extra-cflags="${CFLAGS}" \
+ --extra-ldflags="${LDFLAGS}" \
+ || die "could not configure"
+
+ make || die "Make failed"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # udev rule
+ dodir /etc/udev/rules.d/
+ echo 'KERNEL=="kqemu*", GROUP="qemu", MODE="0660"' > ${D}/etc/udev/rules.d/48-qemu.rules
+
+ # Module doc
+ dodoc "${S}/README"
+ dohtml "${S}/kqemu-doc.html"
+
+ # module params
+ dodir /etc/modprobe.d
+ echo "options kqemu major=0" > ${D}/etc/modprobe.d/kqemu.conf
+}
+
+pkg_preinst() {
+ linux-mod_pkg_preinst
+ local old1="${ROOT}/etc/modprobe.d/kqemu"
+ local old2="${ROOT}/etc/modules.d/kqemu"
+ local new="${ROOT}/etc/modprobe.d/kqemu.conf"
+ if [[ ! -a "${new}" ]]; then
+ if [[ -a "${old1}" ]]; then
+ elog "Renaming /etc/modprobe.d/kqemu to /etc/modprobe.d/kqemu.conf"
+ mv "${old1}" "${new}"
+ elif [[ -a "${old2}" ]]; then
+ elog "Moving old kqemu configuration in /etc/modules.d to new"
+ elog "location in /etc/modprobe.d"
+ mv "${old2}" "${new}"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ enewgroup qemu
+ elog "Make sure you have the kernel module loaded before running qemu"
+ elog "and your user is in the 'qemu' group"
+}