freebsd-ports/emulators/qemu/Makefile

161 lines
4.1 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: qemu
# Date created: 2004/05/31
# Whom: Juergen Lock <nox@jelal.kn-bremen.de>
#
# $FreeBSD$
#
PORTNAME= qemu
PORTVERSION= 0.11.1
PORTREVISION= 10
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SAVANNAH} \
http://bellard.org/qemu/
MASTER_SITE_SUBDIR= qemu
DIST_SUBDIR= qemu
MAINTAINER= nox@FreeBSD.org
COMMENT= QEMU CPU Emulator
HAS_CONFIGURE= yes
USE_GMAKE= yes
USE_PERL5_BUILD= yes
PATCH_STRIP= -p1
MAKE_ENV+= BSD_MAKE="${MAKE}"
MAN1= qemu.1 qemu-img.1
ONLY_FOR_ARCHS= amd64 i386
CONFLICTS= qemu-devel-[0-9]*
- Update to 0.10.1 - from the official changelog: - virtio-net: allow masking of notifications on empty queue (Alex Williamson) - e1000: fix rx descriptor low threshold logic (Alex Willaimson) - x86 tcg: add NULL checks to lsl instruction (Jan Kiszka) - kvm vga: fix screen corruption with -std-vga and Windows (Avi Kivity) - kvm vga: fix screen corruption with Ubuntu installations (Glauber Costa) - virtio-net: check right return size on sg list (Alex Williamson) - Make qemu_announce_self handle holes (live migration after hotplug) (Marcelo Tosatti) - Revert r6804-r6808 (qcow2 allocation info). This series of changes added a high cost to startup for large qcow2 images (Anthony Liguori) - qemu-img: fix help message (Aurelien Jarno) - Fix build for non-default installs of SDL (Anthony Liguori) - Fix race condition in env->interrupt_request. When using TCG and a dynticks host timer, this condition could cause TCG to get stuck in an infinite loop (Aurelien Jarno) - Fix reading encrypted hard disk passwords during early startup (Jan Kiszka) - Fix encrypted disk reporting in 'info block' (Jan Kiszka) - Fix console size with tiny displays (MusicPal) (Jan Kiszka) - Improve error handling in bdrv_open2 (Jan Kiszka) - Avoid leaking data in mux'ed character devices (Jan Kiszka) - Fix initial character device reset (no banner in monitor) (Jan Kiszka) - Fix cpuid KVM crash on i386 host (Lubomir Rintel) - Fix SLES10sp2 installation by adding ISTAT1 register to LSI SCSI emulation (Ryan Harper) - Add physical CDROM fixes (still not perfect tho, see pkg-message) - Add MAKE_JOBS_SAFE fix and mark as such
2009-03-23 21:54:07 +01:00
MAKE_JOBS_SAFE= yes
OPTIONS= KQEMU "Build with (alpha!) accelerator module" Off \
RTL8139_TIMER "allow use of re(4) nic with FreeBSD guests" Off \
SAMBA "samba dependency (for -smb)" Off \
SDL "SDL/X dependency (graphical output)" On \
GNUTLS "gnutls dependency (vnc encryption)" On \
CURL "libcurl dependency (remote images)" On \
PCAP "pcap dependency (networking with bpf)" On \
GNS3 "gns3 patches (udp, promiscuous multicast)" On \
CDROM_DMA "IDE CDROM DMA" On \
ADD_AUDIO "Emulate more audio hardware (experimental!)" Off \
ALL_TARGETS "Also build non-x86 targets" On
.include <bsd.port.pre.mk>
.if defined(WITHOUT_ALL_TARGETS)
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu
PLIST_SUB+= ALLTARGETS="@comment "
.else
PLIST_SUB+= ALLTARGETS=""
.endif
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}
.if defined(WITHOUT_SDL)
CONFIGURE_ARGS+= --disable-sdl
.else
USE_SDL= sdl
.endif
.if defined(WITHOUT_GNUTLS)
CONFIGURE_ARGS+= --disable-vnc-tls
.else
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
.endif
.if defined(WITHOUT_CURL)
CONFIGURE_ARGS+= --disable-curl
.else
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
.endif
.if defined(WITH_PCAP)
CONFIGURE_ARGS+= --enable-pcap
.endif
.if defined(WITH_ADD_AUDIO)
CONFIGURE_ARGS+= --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus
.endif
# XXX
CONFIGURE_ARGS+= --disable-bsd-user
.if defined(WITH_SAMBA)
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba35
.endif
.if defined(WITH_KQEMU)
BUILD_DEPENDS+= kqemu-kmod-devel>=1.4.0pre1:${PORTSDIR}/emulators/kqemu-kmod-devel
RUN_DEPENDS+= kqemu-kmod-devel>=1.4.0pre1:${PORTSDIR}/emulators/kqemu-kmod-devel
.else
CONFIGURE_ARGS+= --disable-kqemu
.endif
.if defined(NOPORTDOCS)
MAKE_ARGS+= NOPORTDOCS=${NOPORTDOCS}
.else
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
.endif
.if ${ARCH} == "amd64"
MAKE_ARGS+= ARCH=x86_64
.endif
post-extract:
@${MKDIR} ${WRKSRC}/kqemu
@${TOUCH} ${WRKSRC}/kqemu/Makefile
@${ECHO} all: > ${WRKSRC}/kqemu/Makefile.freebsd
pre-patch:
@for A in ${ONLY_FOR_ARCHS}; do \
${MKDIR} ${WRKSRC}/bsd/$$A; \
done
post-patch:
.if defined(WITH_RTL8139_TIMER)
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch
.endif
.if defined(WITH_PCAP)
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
.endif
.if defined(WITH_GNS3)
@cd ${WRKSRC} && ${PATCH} -p1 --quiet < ${FILESDIR}/gns3-patch
.endif
.if defined(WITHOUT_CDROM_DMA)
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch
.endif
@${REINPLACE_CMD} -E \
-e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
${WRKSRC}/Makefile.target
@${REINPLACE_CMD} -E \
-e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -E \
-e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
${WRKSRC}/texi2pod.pl
.if ${OSVERSION} >= 800091
# XXX need to disable usb host code on head while it's not ported to the
# new usb stack yet
post-configure:
@${REINPLACE_CMD} -E \
-e "s|^(HOST_USB=)bsd|\1stub|" \
${WRKSRC}/config-host.mak
.endif
post-install:
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${PREFIX}/etc
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${PREFIX}/etc
@if [ ! -f ${PREFIX}/etc/qemu-ifup ]; then \
${CP} -p ${PREFIX}/etc/qemu-ifup.sample ${PREFIX}/etc/qemu-ifup ; \
fi
@if [ ! -f ${PREFIX}/etc/qemu-ifdown ]; then \
${CP} -p ${PREFIX}/etc/qemu-ifdown.sample ${PREFIX}/etc/qemu-ifdown ; \
fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>