2012-11-06 22:56:03 +01:00
|
|
|
# Created by: Juergen Lock <nox@jelal.kn-bremen.de>
|
2004-06-03 04:12:52 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= qemu
|
2009-12-06 20:37:46 +01:00
|
|
|
PORTVERSION= 0.11.1
|
2014-12-08 17:48:38 +01:00
|
|
|
PORTREVISION= 17
|
2004-06-03 04:12:52 +02:00
|
|
|
CATEGORIES= emulators
|
2009-03-08 18:09:43 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SAVANNAH} \
|
|
|
|
http://bellard.org/qemu/
|
|
|
|
MASTER_SITE_SUBDIR= qemu
|
2005-12-31 01:12:20 +01:00
|
|
|
DIST_SUBDIR= qemu
|
2004-06-03 04:12:52 +02:00
|
|
|
|
2006-12-23 18:42:42 +01:00
|
|
|
MAINTAINER= nox@FreeBSD.org
|
2004-06-03 04:12:52 +02:00
|
|
|
COMMENT= QEMU CPU Emulator
|
|
|
|
|
2004-06-05 14:28:31 +02:00
|
|
|
HAS_CONFIGURE= yes
|
2012-11-06 22:56:03 +01:00
|
|
|
USE_GCC= any
|
2013-09-16 18:45:35 +02:00
|
|
|
USES= gmake perl5
|
|
|
|
USE_PERL5= build
|
2009-03-08 18:09:43 +01:00
|
|
|
PATCH_STRIP= -p1
|
2011-09-24 00:26:39 +02:00
|
|
|
MAKE_ENV+= BSD_MAKE="${MAKE}"
|
2005-05-01 09:39:11 +02:00
|
|
|
ONLY_FOR_ARCHS= amd64 i386
|
2007-03-10 18:05:00 +01:00
|
|
|
CONFLICTS= qemu-devel-[0-9]*
|
2006-10-31 23:55:34 +01:00
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
OPTIONS_DEFINE= KQEMU RTL8139_TIMER SAMBA SDL GNUTLS CURL PCAP GNS3 \
|
2014-07-15 17:12:57 +02:00
|
|
|
CDROM_DMA ADD_AUDIO ALL_TARGETS DOCS
|
2012-06-19 18:19:16 +02:00
|
|
|
KQEMU_DESC= Build with (alpha!) accelerator module
|
|
|
|
RTL8139_TIMER_DESC= allow use of re(4) nic with FreeBSD guests
|
|
|
|
SAMBA_DESC= samba dependency (for -smb)
|
|
|
|
SDL_DESC= SDL/X dependency (graphical output)
|
|
|
|
GNUTLS_DESC= gnutls dependency (vnc encryption)
|
|
|
|
CURL_DESC= libcurl dependency (remote images)
|
|
|
|
PCAP_DESC= pcap dependency (networking with bpf)
|
|
|
|
GNS3_DESC= gns3 patches (udp, promiscuous multicast)
|
2012-06-01 22:49:50 +02:00
|
|
|
CDROM_DMA_DESC= IDE CDROM DMA
|
2012-06-19 18:19:16 +02:00
|
|
|
ADD_AUDIO_DESC= Emulate more audio hardware (experimental!)
|
2012-06-01 22:49:50 +02:00
|
|
|
ALL_TARGETS_DESC= Also build non-x86 targets
|
2014-09-20 10:44:29 +02:00
|
|
|
OPTIONS_DEFAULT= SDL GNUTLS CURL PCAP GNS3 CDROM_DMA
|
2006-10-31 23:55:34 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if empty(PORT_OPTIONS:MALL_TARGETS)
|
2010-04-19 23:07:37 +02:00
|
|
|
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu
|
|
|
|
PLIST_SUB+= ALLTARGETS="@comment "
|
2009-03-08 18:09:43 +01:00
|
|
|
.else
|
2010-04-19 23:07:37 +02:00
|
|
|
PLIST_SUB+= ALLTARGETS=""
|
2009-03-08 18:09:43 +01:00
|
|
|
.endif
|
|
|
|
|
2006-08-22 01:02:01 +02:00
|
|
|
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
|
2008-01-20 18:16:05 +01:00
|
|
|
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
|
2009-03-08 18:09:43 +01:00
|
|
|
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}
|
2006-08-22 01:02:01 +02:00
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if empty(PORT_OPTIONS:MSDL)
|
2009-12-06 20:37:46 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-sdl
|
2006-10-31 23:55:34 +01:00
|
|
|
.else
|
|
|
|
USE_SDL= sdl
|
|
|
|
.endif
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if empty(PORT_OPTIONS:MGNUTLS)
|
2009-03-08 18:09:43 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-vnc-tls
|
2008-03-04 23:22:56 +01:00
|
|
|
.else
|
2014-01-26 15:49:41 +01:00
|
|
|
LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls
|
2008-03-04 23:22:56 +01:00
|
|
|
.endif
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if empty(PORT_OPTIONS:MCURL)
|
2010-04-11 13:42:38 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-curl
|
|
|
|
.else
|
2014-01-26 15:49:41 +01:00
|
|
|
LIB_DEPENDS+= libcurl.so:${PORTSDIR}/ftp/curl
|
2010-04-11 13:42:38 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MPCAP}
|
2009-03-08 18:09:43 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-pcap
|
|
|
|
.endif
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MADD_AUDIO}
|
2009-03-08 18:09:43 +01:00
|
|
|
CONFIGURE_ARGS+= --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
|
|
|
|
2009-12-06 20:37:46 +01:00
|
|
|
# XXX
|
|
|
|
CONFIGURE_ARGS+= --disable-bsd-user
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MSAMBA}
|
2013-01-31 20:23:32 +01:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba36
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
|
|
|
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MKQEMU}
|
2009-03-08 18:09:43 +01:00
|
|
|
BUILD_DEPENDS+= kqemu-kmod-devel>=1.4.0pre1:${PORTSDIR}/emulators/kqemu-kmod-devel
|
2011-02-25 21:20:02 +01:00
|
|
|
RUN_DEPENDS+= kqemu-kmod-devel>=1.4.0pre1:${PORTSDIR}/emulators/kqemu-kmod-devel
|
2005-05-05 14:41:10 +02:00
|
|
|
.else
|
2005-09-10 19:04:42 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-kqemu
|
2005-05-05 14:41:10 +02:00
|
|
|
.endif
|
2004-06-03 04:12:52 +02:00
|
|
|
|
2014-01-26 15:49:41 +01:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
|
|
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
|
|
|
|
.else
|
2011-10-22 20:57:32 +02:00
|
|
|
MAKE_ARGS+= NOPORTDOCS=1
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
2005-01-08 17:21:01 +01:00
|
|
|
|
2011-10-22 20:57:32 +02:00
|
|
|
.if !defined(STRIP) || ${STRIP} == ""
|
|
|
|
CONFIGURE_ARGS+=--disable-strip
|
|
|
|
.endif
|
|
|
|
|
2005-05-01 09:39:11 +02:00
|
|
|
.if ${ARCH} == "amd64"
|
2005-11-16 02:32:56 +01:00
|
|
|
MAKE_ARGS+= ARCH=x86_64
|
2005-01-08 17:21:01 +01:00
|
|
|
.endif
|
2005-05-01 09:39:11 +02:00
|
|
|
|
2005-05-05 14:41:10 +02:00
|
|
|
post-extract:
|
2005-10-31 14:43:13 +01:00
|
|
|
@${MKDIR} ${WRKSRC}/kqemu
|
|
|
|
@${TOUCH} ${WRKSRC}/kqemu/Makefile
|
|
|
|
@${ECHO} all: > ${WRKSRC}/kqemu/Makefile.freebsd
|
2005-05-05 14:41:10 +02:00
|
|
|
|
2005-05-01 09:39:11 +02:00
|
|
|
pre-patch:
|
|
|
|
@for A in ${ONLY_FOR_ARCHS}; do \
|
|
|
|
${MKDIR} ${WRKSRC}/bsd/$$A; \
|
|
|
|
done
|
2005-01-08 17:21:01 +01:00
|
|
|
|
2005-12-31 01:12:20 +01:00
|
|
|
post-patch:
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MRTL8139_TIMER}
|
2006-08-07 18:10:27 +02:00
|
|
|
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MPCAP}
|
2009-03-08 18:09:43 +01:00
|
|
|
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
|
|
|
|
.endif
|
2012-06-01 22:49:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MGNS3}
|
2011-07-13 21:59:15 +02:00
|
|
|
@cd ${WRKSRC} && ${PATCH} -p1 --quiet < ${FILESDIR}/gns3-patch
|
|
|
|
.endif
|
2012-06-01 22:49:50 +02:00
|
|
|
.if empty(PORT_OPTIONS:MCDROM_DMA)
|
2006-10-31 23:55:34 +01:00
|
|
|
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch
|
2006-08-07 18:10:27 +02:00
|
|
|
.endif
|
2013-11-10 21:27:06 +01:00
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e "/^by Tibor .TS. S/s|Sch.*z.$$|Schuetz.|" \
|
|
|
|
${WRKSRC}/qemu-doc.texi
|
2006-08-22 01:02:01 +02:00
|
|
|
@${REINPLACE_CMD} -E \
|
2008-11-18 21:07:53 +01:00
|
|
|
-e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \
|
|
|
|
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
|
2006-08-22 01:02:01 +02:00
|
|
|
${WRKSRC}/Makefile.target
|
|
|
|
@${REINPLACE_CMD} -E \
|
2008-11-18 21:07:53 +01:00
|
|
|
-e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
|
|
|
|
-e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
|
2006-08-22 01:02:01 +02:00
|
|
|
${WRKSRC}/Makefile
|
2008-11-18 21:07:53 +01:00
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
|
|
|
|
${WRKSRC}/texi2pod.pl
|
2005-12-31 01:12:20 +01:00
|
|
|
|
2009-06-01 21:02:37 +02:00
|
|
|
.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
|
|
|
|
|
2004-06-03 04:12:52 +02:00
|
|
|
post-install:
|
2014-01-26 15:49:41 +01:00
|
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc
|
|
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc
|
2004-06-03 04:12:52 +02:00
|
|
|
|
2005-01-08 17:21:01 +01:00
|
|
|
.include <bsd.port.post.mk>
|