From stsp@stsp.in-berlin.de  Tue Feb  6 19:46:44 2007
Return-Path: <stsp@stsp.in-berlin.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7BB6516A401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Feb 2007 19:46:44 +0000 (UTC)
	(envelope-from stsp@stsp.in-berlin.de)
Received: from elch.in-berlin.de (elch.in-berlin.de [192.109.42.5])
	by mx1.freebsd.org (Postfix) with ESMTP id 0EC9013C4A7
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Feb 2007 19:46:41 +0000 (UTC)
	(envelope-from stsp@stsp.in-berlin.de)
Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8])
	by elch.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id l16JK3UG017558
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 6 Feb 2007 20:20:03 +0100
Received: from stsp.lan ([217.186.34.200])
	(authenticated bits=128)
	by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id l16JJxSK012502
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 6 Feb 2007 20:20:00 +0100
Received: from ted.stsp.lan (localhost [127.0.0.1])
	by stsp.lan (8.13.8/8.13.6) with ESMTP id l16JJQU6007842
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 6 Feb 2007 20:19:26 +0100 (CET)
	(envelope-from stsp@ted.stsp.lan)
Received: (from stsp@localhost)
	by ted.stsp.lan (8.13.8/8.13.6/Submit) id l16JJQu7007841;
	Tue, 6 Feb 2007 20:19:26 +0100 (CET)
	(envelope-from stsp)
Message-Id: <200702061919.l16JJQu7007841@ted.stsp.lan>
Date: Tue, 6 Feb 2007 20:19:26 +0100 (CET)
From: Stefan Sperling <stsp@stsp.in-berlin.de>
Reply-To: Stefan Sperling <stsp@stsp.in-berlin.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] upgrade emulators/kqemu-kmod to 1.3.0pre10
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         108844
>Category:       ports
>Synopsis:       [PATCH] upgrade emulators/kqemu-kmod to 1.3.0pre10
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    nox
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 06 19:50:17 GMT 2007
>Closed-Date:    Tue Feb 06 20:56:31 GMT 2007
>Last-Modified:  Tue Feb 06 20:56:31 GMT 2007
>Originator:     Stefan Sperling
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD ted.stsp.lan 6.2-RELEASE FreeBSD 6.2-RELEASE #3: Sun Jan 14 13:28:22 CET 2007 stsp@ted.stsp.lan:/usr/local/obj/usr/src/sys/TED i386


	
>Description:
	

	This patch updates the emulators/kqemu-kmod port to
	version 1.3.0pre10.

	The special thing about this release is that the module
	is now released under the GPL, so it can be built from
	source and does not constitute a binary blob anymore.
	This is what motivated me to update this port.
	
	Since the modules is GPL licensed, FreeBSD kernels
	linked with this module may not be distributed.

	-- NOTE: --
	After making this patch, I've briefly tested the module by
	booting a Linux and a FreeBSD guest, but sadly qemu segfaults
	fairly quickly after start up while booting either of them.

	I've decided to submit this anyway in case it is of any use.
	The segfault problem should be looked into before comitting
	this patch though. If you have trouble reproducing this,
	I will gladly provide backtraces.

>How-To-Repeat:
	
>Fix:

diff -urN kqemu-kmod.orig/Makefile kqemu-kmod/Makefile
--- kqemu-kmod.orig/Makefile	Tue Feb  6 19:26:39 2007
+++ kqemu-kmod/Makefile	Tue Feb  6 20:04:01 2007
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	kqemu
-PORTVERSION=	1.3.0.p9
+PORTVERSION=	1.3.0.p10
 PORTREVISION=	3
 CATEGORIES=	emulators
 MASTER_SITES=	http://qemu.org/
@@ -18,7 +18,6 @@
 COMMENT=	Kernel Acceralator for QEMU CPU Emulator (development version)
 
 ONLY_FOR_ARCHS=	i386 amd64
-RESTRICTED=	Module not redistributable
 
 USE_RC_SUBR=	kqemu
 
@@ -32,6 +31,7 @@
 PLIST_FILES+=	"@unexec kldxref ${KMODDIR}"
 .endif
 
+HAS_CONFIGURE=	yes
 MAKEFILE=	Makefile.freebsd
 
 # install where x11/nvidia-driver does also:
@@ -44,6 +44,15 @@
 .if !exists(${SRC_BASE}/sys/Makefile)
 IGNORE=		kqemu requires kernel source to be installed
 .endif
+
+post-configure:
+	${REINPLACE_CMD} -e 's|make |$$(MAKE) |g' ${WRKSRC}/Makefile
+
+# The common part needs GNU make to build, everything else is
+# done with BSD make.
+do-build:
+	(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} -C common; \
+		${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE})
 
 post-install:
 	@${MKDIR} ${PREFIX}/include/kqemu
diff -urN kqemu-kmod.orig/distinfo kqemu-kmod/distinfo
--- kqemu-kmod.orig/distinfo	Tue Feb  6 19:26:39 2007
+++ kqemu-kmod/distinfo	Tue Feb  6 19:30:29 2007
@@ -1,3 +1,3 @@
-MD5 (kqemu/kqemu-1.3.0pre9.tar.gz) = 27888c3220844ad360a6a23345fa1bcb
-SHA256 (kqemu/kqemu-1.3.0pre9.tar.gz) = c2759d43bc8bee458b802479b47796b21593ee617f5c4d14cb1bf842d4f4efdc
-SIZE (kqemu/kqemu-1.3.0pre9.tar.gz) = 190070
+MD5 (kqemu/kqemu-1.3.0pre10.tar.gz) = f4cb84be802f4b1eaa22ca8b73c69504
+SHA256 (kqemu/kqemu-1.3.0pre10.tar.gz) = 27fb1da3ba0f951cca04c12a41c977ddc142a8a9ff091fa597114fdcef466207
+SIZE (kqemu/kqemu-1.3.0pre10.tar.gz) = 136272
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nox 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Feb 6 19:50:35 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108844 
State-Changed-From-To: open->closed 
State-Changed-By: nox 
State-Changed-When: Tue Feb 6 20:56:28 UTC 2007 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=108844 
>Unformatted:
