diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-05-05 12:41:10 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-05-05 12:41:10 +0000 |
commit | 8ca48ff8979e6c7a1377bf6d55a9dc0a230c29c5 (patch) | |
tree | 3916ca087ea065ad456125c7b5bc216c73253ce6 /emulators/qemu-devel/Makefile | |
parent | c68ca78bd1c88992172625d4de020c56dd98f301 (diff) |
Notes
Diffstat (limited to 'emulators/qemu-devel/Makefile')
-rw-r--r-- | emulators/qemu-devel/Makefile | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile index 6d1a7c1a4c54..5bec3cc93a84 100644 --- a/emulators/qemu-devel/Makefile +++ b/emulators/qemu-devel/Makefile @@ -6,10 +6,13 @@ # PORTNAME= qemu -PORTVERSION= 0.7.0 -POTREVISION= 1 +PORTVERSION= 0.7.0s.20050502 CATEGORIES= emulators -MASTER_SITES= http://www.qemu.org/ +MASTER_SITES= http://www.qemu.org/ \ + http://people.fruitsalad.org/nox/qemu/ \ + http://dad-answers.com/qemu/ +DISTNAME= ${PORTNAME}-snapshot-2005-05-02_23 +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator @@ -19,7 +22,13 @@ BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba .endif +.if defined(WITH_KQEMU) +DISTKQEMU= kqemu-0.6.2-1.tar.gz +DISTFILES= ${EXTRACT_ONLY} ${DISTKQEMU} +.endif + HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl @@ -29,6 +38,14 @@ CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} MAKE_ENV+= BSD_MAKE=${MAKE} MAN1= qemu.1 qemu-img.1 ONLY_FOR_ARCHS= amd64 i386 +.if defined(WITH_KQEMU) +NO_PACKAGE= Depends on kernel, and module not redistributable +PLIST_SUB= WITH_KQEMU="" +PLIST_SUB+= KMODDIR=${KMODDIR} +EXTRA_PATCHES= ${FILESDIR}/kqemu-patch +.else +PLIST_SUB= WITH_KQEMU="@comment " +.endif # gcc34 (system cc on 5.x now) has problems with qemu on amd64 # (doesnt build target-i386/op.c), try the one in ports which is newer @@ -47,19 +64,48 @@ USE_GCC= 3.4 USE_GCC= 3.4 .endif +.if defined(WITH_KQEMU) && ${ARCH} != "i386" +IGNORE= kqemu only supported on i386 +.endif + +.if defined(WITH_KQEMU) && !exists(${SRC_BASE}/sys/Makefile) +IGNORE= kqemu requires kernel source to be installed +.endif + pre-everything:: +.if !defined(WITH_KQEMU) && ${ARCH} == "i386" + @${ECHO_MSG} "Notice: you can build qemu with the (alpha!) kqemu accelerator kernel module" + @${ECHO_MSG} "by defining WITH_KQEMU." +.endif .if !defined(WITH_SAMBA) && !exists(${LOCALBASE}/sbin/smbd) @${ECHO_MSG} "Notice: if you need qemu's -smb option (smb-export local dir to guest)" @${ECHO_MSG} "then you also need samba, you can have this port install it by defining" @${ECHO_MSG} "WITH_SAMBA." .endif +.if defined(WITH_KQEMU) +post-extract: + @cd ${WRKSRC} && ${TAR} xfz ${_DISTDIR}/${DISTKQEMU} + @${CP} ${FILESDIR}/kmod_bsd.c ${WRKSRC}/kqemu +.endif + pre-patch: @for A in ${ONLY_FOR_ARCHS}; do \ ${MKDIR} ${WRKSRC}/bsd/$$A; \ 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> |