2004-06-03 04:12:52 +02:00
|
|
|
# New ports collection makefile for: qemu
|
|
|
|
# Date created: 2004/05/31
|
|
|
|
# Whom: Juergen Lock <nox@jelal.kn-bremen.de>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= qemu
|
2009-12-06 20:37:46 +01:00
|
|
|
PORTVERSION= 0.11.1
|
2011-08-31 04:34:44 +02:00
|
|
|
PORTREVISION= 10
|
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
|
2004-06-03 04:12:52 +02:00
|
|
|
USE_GMAKE= yes
|
2010-04-19 23:07:37 +02:00
|
|
|
USE_PERL5_BUILD= yes
|
2009-03-08 18:09:43 +01:00
|
|
|
PATCH_STRIP= -p1
|
2011-09-24 00:26:39 +02:00
|
|
|
MAKE_ENV+= BSD_MAKE="${MAKE}"
|
2004-11-17 10:47:38 +01:00
|
|
|
MAN1= qemu.1 qemu-img.1
|
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]*
|
2009-03-23 21:54:07 +01:00
|
|
|
MAKE_JOBS_SAFE= yes
|
2006-10-31 23:55:34 +01:00
|
|
|
|
|
|
|
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 \
|
2008-03-04 23:22:56 +01:00
|
|
|
GNUTLS "gnutls dependency (vnc encryption)" On \
|
2010-04-11 13:42:38 +02:00
|
|
|
CURL "libcurl dependency (remote images)" On \
|
2009-03-08 18:09:43 +01:00
|
|
|
PCAP "pcap dependency (networking with bpf)" On \
|
2011-07-13 21:59:15 +02:00
|
|
|
GNS3 "gns3 patches (udp, promiscuous multicast)" On \
|
2009-03-08 18:09:43 +01:00
|
|
|
CDROM_DMA "IDE CDROM DMA" On \
|
|
|
|
ADD_AUDIO "Emulate more audio hardware (experimental!)" Off \
|
|
|
|
ALL_TARGETS "Also build non-x86 targets" On
|
2006-10-31 23:55:34 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-03-08 18:09:43 +01:00
|
|
|
.if defined(WITHOUT_ALL_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
|
|
|
|
2006-10-31 23:55:34 +01:00
|
|
|
.if defined(WITHOUT_SDL)
|
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
|
|
|
|
|
2008-03-04 23:22:56 +01:00
|
|
|
.if defined(WITHOUT_GNUTLS)
|
2009-03-08 18:09:43 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-vnc-tls
|
2008-03-04 23:22:56 +01:00
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
|
|
|
|
.endif
|
|
|
|
|
2010-04-11 13:42:38 +02:00
|
|
|
.if defined(WITHOUT_CURL)
|
|
|
|
CONFIGURE_ARGS+= --disable-curl
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
|
|
|
|
.endif
|
|
|
|
|
2009-03-08 18:09:43 +01:00
|
|
|
.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
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
|
|
|
|
2009-12-06 20:37:46 +01:00
|
|
|
# XXX
|
|
|
|
CONFIGURE_ARGS+= --disable-bsd-user
|
|
|
|
|
2006-10-31 23:55:34 +01:00
|
|
|
.if defined(WITH_SAMBA)
|
2011-07-03 00:02:38 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba35
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
|
|
|
|
2005-05-05 14:41:10 +02:00
|
|
|
.if defined(WITH_KQEMU)
|
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
|
|
|
|
2006-10-31 23:55:34 +01:00
|
|
|
.if defined(NOPORTDOCS)
|
|
|
|
MAKE_ARGS+= NOPORTDOCS=${NOPORTDOCS}
|
|
|
|
.else
|
|
|
|
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
|
|
|
|
.endif
|
2005-01-08 17:21:01 +01:00
|
|
|
|
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:
|
2006-08-07 18:10:27 +02:00
|
|
|
.if defined(WITH_RTL8139_TIMER)
|
|
|
|
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/rtl8139-re-patch
|
2006-10-31 23:55:34 +01:00
|
|
|
.endif
|
2009-03-08 18:09:43 +01:00
|
|
|
.if defined(WITH_PCAP)
|
|
|
|
@cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
|
|
|
|
.endif
|
2011-07-13 21:59:15 +02:00
|
|
|
.if defined(WITH_GNS3)
|
|
|
|
@cd ${WRKSRC} && ${PATCH} -p1 --quiet < ${FILESDIR}/gns3-patch
|
|
|
|
.endif
|
2006-11-29 21:58:35 +01:00
|
|
|
.if defined(WITHOUT_CDROM_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
|
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:
|
2008-04-03 22:18:40 +02:00
|
|
|
@${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
|
2004-06-03 04:12:52 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2005-01-08 17:21:01 +01:00
|
|
|
.include <bsd.port.post.mk>
|