kqemu-kmod port

Juergen Lock nox at jelal.kn-bremen.de
Sun Oct 30 15:22:30 PST 2005


On Sun, Oct 30, 2005 at 08:32:31AM +0900, Norikatsu Shigemura wrote:
> On Sat, 29 Oct 2005 20:51:03 +0200
> Juergen Lock <nox at jelal.kn-bremen.de> wrote:
>[...]

> > > 	overrided: my kqemu-kmod port
> > > 	http://people.freebsd.org/~nork/kqemu-kmod.shar
> > > 	Please reget my shar file.
> > > 	And I made a patch for qemu port.  How about?
> >  Well, three changes:
> > 1. use the old disfile, Fabrice still hasn't committed anything new
> > (the copy on dad-answers.com is only there for one day each)

New commits today! (havent tested very extensively yet tho...)

> > 2. CFLAGS+= -I${LOCALBASE}/include doesn't get propagated to the build
> > at least here, need to patch Makefile.target instead
> 
> 	Agree.
> 
> > 3. need ${WRKSRC}/kqemu/Makefile.freebsd instead of ${WRKSRC}/kqemu/Makefile
> 
> 	Why?  According to qemu/configure, ${WRKSRC}/kqemu/Makefile is
> 	needed instead of ${WRKSRC}/kqemu/Makefile.freebsd.
> 
> - - - - - - - - - - - - - - - - - - - - in qemu/configure #375
> # kqemu support
> if test $kqemu = "yes" ; then
>     # test if the source code is installed
>     if test '!' -f "kqemu/Makefile" ; then 
>         kqemu="no"
>     fi
> fi
> - - - - - - - - - - - - - - - - - - - -

 Oops :)  well we need both then, the (now to-be-skipped) kqemu build
does make -f Makefile.freebsd .
> 
> > -MASTER_SITES=	http://www.qemu.org/ \
> > -		http://people.fruitsalad.org/nox/qemu/ \
> > -		http://dad-answers.com/qemu/
> > +MASTER_SITES=	http://people.fruitsalad.org/nox/qemu/ \
> > +		http://qemu.dad-answers.com/download/qemu/
> >  DISTNAME=	${PORTNAME}-snapshot-2005-09-09_23
> 
> 	Humm...  How about following lines?
> - - - - - - - - - - - - - - - - - - - -
> MASTER_SITES=   http://www.qemu.org/:release \
>                 http://people.fruitsalad.org/nox/qemu/:snapshot \
>                 http://qemu.dad-answers.com/download/qemu/:snapshot
> DISTFILES=      ${PORTNAME}-snapshot-2005-09-09_23${EXTRACT_SUFX}:snapshot
> - - - - - - - - - - - - - - - - - - - -
> 	You can replace :snapshot to :release, if new qemu is released.

 Ok!

 So here is a new update:

 Removed files: files/patch-audio::audio.c files/kqemu-freebsd-patch

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- Makefile	7 Oct 2005 19:26:21 -0000	1.33
+++ Makefile	30 Oct 2005 23:05:39 -0000
@@ -6,17 +6,12 @@
 #
 
 PORTNAME=	qemu
-PORTVERSION=	0.7.2s.20050909
-PORTREVISION=	2
+PORTVERSION=	0.7.2s.20051030
 CATEGORIES=	emulators
-MASTER_SITES=	http://www.qemu.org/ \
-		http://people.fruitsalad.org/nox/qemu/ \
-		http://dad-answers.com/qemu/
-DISTNAME=	${PORTNAME}-snapshot-2005-09-09_23
-.if defined(WITH_KQEMU)
-DISTFILES=	${EXTRACT_ONLY} ${DISTKQEMU}
-.endif
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+MASTER_SITES=	http://www.qemu.org/:release \
+		http://people.fruitsalad.org/nox/qemu/:snapshot \
+		http://qemu.dad-answers.com/download/qemu/:snapshot
+DISTFILES=	${PORTNAME}-snapshot-2005-10-30_23${EXTRACT_SUFX}:snapshot
 
 MAINTAINER=	nox at jelal.kn-bremen.de
 COMMENT=	QEMU CPU Emulator
@@ -25,10 +20,8 @@
 .if defined(WITH_SAMBA)
 RUN_DEPENDS+=	${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba
 .endif
-
 .if defined(WITH_KQEMU)
-DISTKQEMU=	kqemu-0.7.2.tar.gz
-EXTRA_PATCHES=	${FILESDIR}/kqemu-freebsd-patch
+BUILD_DEPENDS+=	${LOCALBASE}/include/kqemu/kqemu.h:${PORTSDIR}/emulators/kqemu-kmod
 .endif
 
 HAS_CONFIGURE=	yes
@@ -43,13 +36,9 @@
 MAN1=		qemu.1 qemu-img.1
 ONLY_FOR_ARCHS=	amd64 i386
 .if defined(WITH_KQEMU)
-NO_PACKAGE=	Depends on kernel, and module not redistributable
 CONFIGURE_ARGS+=	--enable-kqemu
-PLIST_SUB=	WITH_KQEMU=""
-PLIST_SUB+=	KMODDIR=${KMODDIR:C/^\///}
 .else
 CONFIGURE_ARGS+=	--disable-kqemu
-PLIST_SUB=	WITH_KQEMU="@comment "
 .endif
 
 .include <bsd.port.pre.mk>
@@ -59,10 +48,6 @@
 .endif
 USE_GCC=	3.4
 
-.if defined(WITH_KQEMU) && !exists(${SRC_BASE}/sys/Makefile)
-IGNORE=		kqemu requires kernel source to be installed
-.endif
-
 pre-everything::
 .if !defined(WITH_KQEMU)
 	@${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module"
@@ -74,11 +59,10 @@
 	@${ECHO_MSG} "WITH_SAMBA."
 .endif
 
-.if defined(WITH_KQEMU)
 post-extract:
-	@cd ${WRKSRC} && ${TAR} xfz ${_DISTDIR}/${DISTKQEMU}
-	@${LN} -s Makefile.freebsd ${WRKSRC}/kqemu/BSDmakefile
-.endif
+	@${MKDIR} ${WRKSRC}/kqemu
+	@${TOUCH} ${WRKSRC}/kqemu/Makefile
+	@${ECHO} all: > ${WRKSRC}/kqemu/Makefile.freebsd
 
 pre-patch:
 	@for A in ${ONLY_FOR_ARCHS}; do \
@@ -86,17 +70,6 @@
 	done
 
 post-install:
-.if defined(WITH_KQEMU)
-	${INSTALL_SCRIPT} ${WRKSRC}/kqemu/kqemu.ko ${KMODDIR}
-	if mount |${GREP} ^devfs >/dev/null ; then \
-		: ; \
-	else \
-		if [ ! -e /dev/kqemu ]; then\
-			mknod /dev/kqemu c 250 0 ; \
-		fi ; \
-		${CHMOD} 666 /dev/kqemu ; \
-	fi
-.endif
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.21
diff -u -r1.21 distinfo
--- distinfo	10 Sep 2005 17:04:41 -0000	1.21
+++ distinfo	30 Oct 2005 22:49:58 -0000
@@ -1,4 +1,2 @@
-MD5 (qemu-snapshot-2005-09-09_23.tar.bz2) = db4ffeb081666c7352f5c0231e3f09c7
-SIZE (qemu-snapshot-2005-09-09_23.tar.bz2) = 1122120
-MD5 (kqemu-0.7.2.tar.gz) = 02cfdecda90458d6393781496ec6b48b
-SIZE (kqemu-0.7.2.tar.gz) = 79314
+MD5 (qemu-snapshot-2005-10-30_23.tar.bz2) = d41b56254cc8704aef80fd188e30e95a
+SIZE (qemu-snapshot-2005-10-30_23.tar.bz2) = 1162650
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v
retrieving revision 1.12
diff -u -r1.12 pkg-plist
--- pkg-plist	1 Oct 2005 13:25:08 -0000	1.12
+++ pkg-plist	29 Oct 2005 17:26:58 -0000
@@ -51,5 +51,3 @@
 @dirrm %%DATADIR%%/keymaps
 @dirrm %%DATADIR%%
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
- at cwd /
-%%WITH_KQEMU%%%%KMODDIR%%/kqemu.ko


More information about the freebsd-emulation mailing list