hi, I've updated kqemu-1.3.0_pre11.ebuild file to be built on Gentoo/FreeBSD x86. Here are 2 patches: 1.patch is patched kqemu-1.3.0_pre11.ebuild file 2.patch is 'kqemu-1.3.0_pre11-Makefile.patch' file which must be placed into app-emulation/kqemu/files directory: --- kqemu-1.3.0_pre11.ebuild 2007-11-19 11:46:42 +0100 +++ kqemu-1.3.0_pre11.ebuild.new 2007-12-15 00:44:05 +0100 @@ -23,13 +23,16 @@ pkg_setup() { MODULE_NAMES="kqemu(misc:${S})" - linux-mod_pkg_setup + [ "${KERNEL}" = "linux" ] && linux-mod_pkg_setup } src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-sched_h.patch + if [ "${KERNEL}" = "FreeBSD" ]; then + epatch ${FILESDIR}/${P}-Makefile.patch + fi sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' kqemu-linux.c } @@ -43,27 +46,42 @@ ./configure --kernel-path="${KV_DIR}" \ || die "could not configure" - make + if [ "${KERNEL}" = "FreeBSD" ]; then + gmake -C common all + MAKE=make + emake -f Makefile.freebsd + else + make + fi } src_install() { - linux-mod_src_install - - # udev rule - dodir /etc/udev/rules.d/ - echo 'KERNEL=="kqemu*", NAME="%k", GROUP="qemu", MODE="0660"' > ${D}/etc/udev/rules.d/48-qemu.rules + if [ "${KERNEL}" = "linux" ]; then + linux-mod_src_install + else + insinto /boot/modules + doins "${S}"/kqemu.kld + exeinto /boot/modules + doexe "${S}"/kqemu.ko + fi + + if [ "${KERNEL}" = "linux" ]; then + # udev rule + dodir /etc/udev/rules.d/ + echo 'KERNEL=="kqemu*", NAME="%k", GROUP="qemu", MODE="0660"' > ${D}/etc/udev/rules.d/48-qemu.rules + + # module params + dodir /etc/modules.d + echo "options kqemu major=0" > ${D}/etc/modules.d/kqemu + fi # Module doc dodoc ${S}/README dohtml ${S}/kqemu-doc.html - - # module params - dodir /etc/modules.d - echo "options kqemu major=0" > ${D}/etc/modules.d/kqemu } pkg_postinst() { - linux-mod_pkg_postinst + [ "${KERNEL}" = "linux" ] && 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" --- common/Makefile 2007-02-06 22:02:00 +0100 +++ common/Makefile.new 2007-12-15 00:05:00 +0100 @@ -41,7 +41,7 @@ endif DEFINES=-D__KERNEL__ -INCLUDES=-nostdinc -iwithprefix include -I. -I.. +INCLUDES=-nostdinc -iwithprefix include -I. -I.. -I/usr/include TOOLS_CFLAGS=-Wall -O2 -Werror -g COMMON_CFLAGS=-Wall -O2 -fomit-frame-pointer -fno-strict-aliasing -Werror ifeq ($(ARCH), x86_64) Reproducible: Always
Please don't paste patches inline next time, it kills formatting. We have attachments for this.
I'm just going to close this one. kqemu is dead and this bug has been ignored for 5 years. Sorry about the poor response from Gentoo developers, I assume you worked around this issue in other ways in the past 5 years.