# New ports collection makefile for: qemu # Date created: 2004/05/31 # Whom: Juergen Lock # # $FreeBSD$ # PORTNAME= qemu PORTVERSION= 0.7.2s.20050909 PORTREVISION= 2 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} MAINTAINER= nox@jelal.kn-bremen.de COMMENT= QEMU CPU Emulator BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html .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 .endif HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes USE_GETOPT_LONG= yes USE_SDL= sdl USE_PERL5= yes PATCH_STRIP= -p1 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 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 .if ${ARCH} == "amd64" ARCH= x86_64 .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" @${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} @${LN} -s Makefile.freebsd ${WRKSRC}/kqemu/BSDmakefile .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