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
|
2016-05-29 02:24:29 +02:00
|
|
|
DISTVERSION= 2.6.0
|
2018-09-01 19:05:47 +02:00
|
|
|
PORTREVISION= 7
|
2004-06-03 04:12:52 +02:00
|
|
|
CATEGORIES= emulators
|
2016-01-01 18:54:08 +01:00
|
|
|
MASTER_SITES= http://wiki.qemu.org/download/
|
|
|
|
PKGNAMESUFFIX= -devel
|
2011-07-13 22:01:41 +02:00
|
|
|
|
2016-01-01 18:54:08 +01:00
|
|
|
MAINTAINER= bofh@FreeBSD.org
|
|
|
|
COMMENT= QEMU CPU Emulator - development version
|
|
|
|
|
|
|
|
LICENSE= GPLv2
|
2004-06-03 04:12:52 +02:00
|
|
|
|
2004-06-05 14:28:31 +02:00
|
|
|
HAS_CONFIGURE= yes
|
2018-02-19 12:10:43 +01:00
|
|
|
USES= cpe gmake pkgconfig bison perl5 python:2.7,build ssl tar:bzip2
|
2013-09-16 18:45:35 +02:00
|
|
|
USE_PERL5= build
|
2016-07-04 18:56:03 +02:00
|
|
|
USE_XORG= pixman
|
|
|
|
USE_GNOME+= cairo glib20
|
2015-03-26 22:40:34 +01:00
|
|
|
MAKE_ENV+= BSD_MAKE="${MAKE}"
|
2013-10-20 00:07:48 +02:00
|
|
|
ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 # XXX someone wants to debug sparc64 hosts?
|
2006-10-31 23:55:34 +01:00
|
|
|
|
2013-07-18 19:54:56 +02:00
|
|
|
OPTIONS_DEFINE= SAMBA X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CURL \
|
2015-01-06 20:47:28 +01:00
|
|
|
CDROM_DMA PCAP USBREDIR GNS3 X86_TARGETS \
|
2016-01-25 17:43:47 +01:00
|
|
|
STATIC_LINK DOCS
|
2012-06-16 17:28:45 +02:00
|
|
|
SAMBA_DESC= samba dependency (for -smb)
|
|
|
|
GNUTLS_DESC= gnutls dependency (vnc encryption)
|
|
|
|
SASL_DESC= cyrus-sasl dependency (vnc encryption)
|
|
|
|
JPEG_DESC= jpeg dependency (vnc lossy compression)
|
|
|
|
PNG_DESC= png dependency (vnc compression)
|
2012-06-01 22:49:50 +02:00
|
|
|
CDROM_DMA_DESC= IDE CDROM DMA
|
2012-06-16 17:28:45 +02:00
|
|
|
PCAP_DESC= pcap dependency (networking with bpf)
|
|
|
|
USBREDIR_DESC= usb device network redirection (experimental!)
|
2013-03-29 18:40:38 +01:00
|
|
|
GNS3_DESC= gns3 patches (promiscuous multicast)
|
2016-04-20 09:01:15 +02:00
|
|
|
X86_TARGETS_DESC= Build only x86 system targets
|
2013-03-29 18:40:38 +01:00
|
|
|
STATIC_LINK_DESC= Statically link the executables
|
2016-01-01 18:54:08 +01:00
|
|
|
OPTIONS_DEFAULT=X11 GTK2 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA CURL PCAP GNS3
|
|
|
|
OPTIONS_SUB= yes
|
2016-07-04 18:56:03 +02:00
|
|
|
X11_USE= SDL=sdl XORG=x11,xext GNOME=gdkpixbuf2
|
2016-01-01 18:54:08 +01:00
|
|
|
X11_CONFIGURE_ON= --enable-sdl
|
|
|
|
X11_CONFIGURE_OFF= --disable-sdl
|
|
|
|
GTK2_USE= GNOME=gtk20,vte
|
|
|
|
GTK2_USES= gettext
|
|
|
|
GTK2_CONFIGURE_OFF= --disable-gtk --disable-vte
|
2016-04-01 16:00:51 +02:00
|
|
|
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
|
2016-03-09 01:11:05 +01:00
|
|
|
GNUTLS_CONFIGURE_OFF= --disable-gnutls
|
2016-04-01 16:00:51 +02:00
|
|
|
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
|
2016-01-01 18:54:08 +01:00
|
|
|
SASL_CONFIGURE_OFF= --disable-vnc-sasl
|
|
|
|
JPEG_USES= jpeg
|
|
|
|
JPEG_CONFIGURE_OFF= --disable-vnc-jpeg
|
2016-04-01 16:00:51 +02:00
|
|
|
PNG_LIB_DEPENDS= libpng.so:graphics/png
|
2016-01-01 18:54:08 +01:00
|
|
|
PNG_CONFIGURE_OFF= --disable-vnc-png
|
2016-04-01 16:00:51 +02:00
|
|
|
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
|
2016-01-01 18:54:08 +01:00
|
|
|
CURL_CONFIGURE_OFF= --disable-curl
|
|
|
|
OPENGL_USE= GL=yes
|
|
|
|
OPENGL_CONFIGURE_OFF= --disable-opengl
|
2016-04-01 16:00:51 +02:00
|
|
|
USBREDIR_BUILD_DEPENDS= usbredir>=0.6:net/usbredir
|
|
|
|
USBREDIR_RUN_DEPENDS= usbredir>=0.6:net/usbredir
|
2016-01-01 18:54:08 +01:00
|
|
|
USBREDIR_CONFIGURE_OFF= --disable-usb-redir
|
|
|
|
PCAP_CONFIGURE_ON= --enable-pcap
|
2016-05-29 02:24:29 +02:00
|
|
|
PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch ${FILESDIR}/pcap-patch-net_net.c
|
2016-01-01 18:54:08 +01:00
|
|
|
STATIC_LINK_CONFIGURE_ON= --static
|
2016-01-07 10:53:43 +01:00
|
|
|
STATIC_LINK_PREVENTS= GTK2 X11
|
|
|
|
STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static
|
2017-03-21 22:59:31 +01:00
|
|
|
SAMBA_USES= samba:run # smbd
|
2016-04-01 16:00:51 +02:00
|
|
|
DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html
|
2016-01-01 18:54:08 +01:00
|
|
|
DOCS_USES= makeinfo
|
|
|
|
DOCS_MAKE_ARGS_OFF= NOPORTDOCS=1
|
2006-10-31 23:55:34 +01:00
|
|
|
|
2012-07-19 22:15:43 +02:00
|
|
|
PORTDOCS= docs qemu-doc.html qemu-tech.html qmp-commands.txt
|
2011-08-21 17:49:39 +02:00
|
|
|
|
2016-01-01 18:54:08 +01:00
|
|
|
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
|
|
|
|
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
|
2016-09-10 19:56:22 +02:00
|
|
|
LDFLAGS+= -L${OPENSSLLIB} -lcrypto
|
2016-01-01 18:54:08 +01:00
|
|
|
CONFIGURE_ARGS+=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \
|
|
|
|
--disable-libssh2 --enable-debug \
|
|
|
|
--prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \
|
|
|
|
--disable-linux-user --disable-linux-aio --disable-xen \
|
|
|
|
--smbd=${LOCALBASE}/sbin/smbd --enable-debug-info --python=${PYTHON_CMD} \
|
|
|
|
--extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\"
|
|
|
|
|
2016-05-29 02:24:29 +02:00
|
|
|
LIB_DEPENDS+= libnettle.so:security/nettle \
|
|
|
|
libfontconfig.so:x11-fonts/fontconfig \
|
|
|
|
libfreetype.so:print/freetype2
|
|
|
|
|
2016-01-01 18:54:08 +01:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2011-10-22 20:56:05 +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
|
|
|
|
2010-02-08 23:19:29 +01:00
|
|
|
.if ${ARCH} == "powerpc"
|
2010-04-19 23:07:37 +02:00
|
|
|
MAKE_ARGS+= ARCH=ppc
|
2010-02-08 23:19:29 +01:00
|
|
|
.endif
|
|
|
|
|
2014-06-28 01:28:08 +02:00
|
|
|
.if ${ARCH} == "powerpc64"
|
|
|
|
MAKE_ARGS+= ARCH=ppc64
|
|
|
|
.endif
|
|
|
|
|
2011-06-11 18:22:34 +02:00
|
|
|
.if ${ARCH} == "sparc64"
|
2016-01-01 18:54:08 +01:00
|
|
|
CONFIGURE_ARGS+= --sparc_cpu=v9
|
2011-06-11 18:22:34 +02:00
|
|
|
.endif
|
|
|
|
|
2013-07-06 19:09:57 +02:00
|
|
|
# -lprocstat actually only _needs_ -lelf after r249666 or r250870 (MFC)
|
|
|
|
# but it shouldn't matter much
|
2011-08-25 18:54:45 +02:00
|
|
|
post-patch:
|
2013-07-06 19:09:57 +02:00
|
|
|
@${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
|
2017-01-05 23:58:02 +01:00
|
|
|
-e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \
|
2013-07-06 19:09:57 +02:00
|
|
|
${WRKSRC}/configure
|
|
|
|
@${REINPLACE_CMD} -e '/libs_qga=/s|glib_libs|glib_libs -lintl|' ${WRKSRC}/configure
|
2013-11-10 21:25:25 +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}|" \
|
2011-04-01 21:30:21 +02:00
|
|
|
${WRKSRC}/scripts/texi2pod.pl
|
2005-12-31 01:12:20 +01:00
|
|
|
|
2016-01-01 18:54:08 +01:00
|
|
|
post-patch-CDROM_DMA-off:
|
|
|
|
@${REINPLACE_CMD} -e '/USE_DMA_CDROM/d' ${WRKSRC}/hw/ide/internal.h
|
|
|
|
|
|
|
|
post-patch-GNS3-on:
|
|
|
|
@${REINPLACE_CMD} -e 's|(buf\[0\] & 1) && (rctl & E1000_RCTL_MPE)|buf[0] \& 1|' \
|
|
|
|
${WRKSRC}/hw/net/e1000.c
|
|
|
|
|
2009-06-01 21:02:37 +02:00
|
|
|
# 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
|
|
|
|
|
2014-05-19 19:12:58 +02:00
|
|
|
.if !target(post-install)
|
2004-06-03 04:12:52 +02:00
|
|
|
post-install:
|
2015-01-06 20:47:28 +01:00
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${STAGEDIR}${PREFIX}/etc
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${STAGEDIR}${PREFIX}/etc
|
2014-08-18 20:53:16 +02:00
|
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
|
2016-01-01 18:54:08 +01:00
|
|
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ivshmem-*
|
|
|
|
|
|
|
|
post-install-DOCS-on:
|
|
|
|
@(cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DOCSDIR}/)
|
2014-05-19 19:12:58 +02:00
|
|
|
.endif
|
2004-06-03 04:12:52 +02:00
|
|
|
|
2011-10-22 20:56:05 +02:00
|
|
|
.include <bsd.port.mk>
|