# /usr/ports/emulators/Makefile.local		by jhs_ERASE_@berklix.com
.include "../Makefile.undef"

.if defined(BERKLIX_CLIENT)	#{

# http://www.de.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html#LINUXEMU-LIBS-PORT
#	# kldload linux

# SUBDIR += bhyve	# Not in 12.0-CURRENT-2017-11-14
#	Sat, 2 Mar 2013 Juergen Lock <nox@@@jelal.kn-bremen.de>
#	Cc: freebsd-emulation@freebsd.org
#	so far is only in -current and can't run other guests than FreeBSD yet:
# 	http://bhyve.org/	

# .if (${ARCH} == i386)		#{	Not necessary to ifdef arch.
SUBDIR += dosbox 
#	wine FLASH891.EXE
#	winevdm: Cannot start DOS application Z:\tmp\FLASH891.EXE
#	         because vm86 mode is not supported on this platform.
#	         Try running this application with DOSBox.
# .endif				#}

# SUBDIR += linux_base-f8
#	 gj@ wrote 25 Apr 2008:
#	 will become new standard Linux emulation port in near future.
#	 However, you have to set compat.linux.osrelease=2.6.16.
#	 Default is now 2.4.2.	I set it in /etc/sysctl.conf.	Lots
#	 of stuff works quite well with this port.  It's best to use
#	 this with -current because lots of Linux syscalls are
#	 emulated there.  These are missing from 6.4 and 7.0.
# laps reported on 7.1: linux_base-f8-8_4 compat.linux.osrelease: 2.4.2 is not supported.

# SUBDIR +=	linux_base-f10
#	pkg-descr: to run X11 applications, install x11/linux-xorg-libs

# SUBDIR +=	linux_base-fc4	# pre FreeBSD 8.0
# SUBDIR +=	linux_base-fc6
# SUBDIR +=	linux_base-gentoo-stage3

SUBDIR += mtools
.endif				#}

.if	defined(BERKLIX_SERVER)	#{
HOSTNAME != hostname
.if "x${HOSTNAME}" == "xslim.berklix.org"	#{
# .if "x${KERNCONF}" == "xSLIM.small"
# The 'if' above now selects on hostname, not kernel config, as I now run
# GENERIC kernel, no more need for a custom hardware specific kernel.
SUBDIR += open-vm-tools-nox11	# Installed by mwe@ in slim 2012-11-29
#				# & still wanted for hypervisor 2016-07
#	Allow hypervisor to shut down vm in a controlled way if necessary. 
#	For /etc/rc.conf:
#		vmware_guest_vmmemctl_enable="YES"
#		vmware_guest_vmxnet_enable="YES"
#		vmware_guestd_enable="YES"
#	In all of 6.4 7.3 7.4 8.2 8.3 8.4 9.0 9.2 9.3 10.0 10.1 current
.endif				#}
.endif				#}

.if defined(BERKLIX_CLIENT)	#{
.if defined(BERKLIX_AMBITIOUS)	#{

# http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization.html

SUBDIR += virtualbox-ose
#	Gary says virtualbox much better than qemu
#	Needs cd /usr/src; make build32 install32; ldconfig -v -m -R /usr/lib32
#	Dependencies are immense.

# SUBDIR += virtualbox-ose-additions	# conflicts with virtualbox/

SUBDIR += virtualbox-ose-kmod

# Apparently more support for Xen on NetBSD, see:
#	Subject: Re: Xen
#	From: Atticus <grobe0ba@gmail.com>
#	Date: 2 Aug 2011
#	To: netbsd-users@NetBSD.org

.if (${ARCH} == i386)		#{{
SUBDIR += wine		# 28M .tbz package
#			# dmesg on 7.0 complains ldconfig:
#			# /usr/local/lib/wine:83: trailing characters ignored
.elif (${ARCH} == amd64)		# i386 }{ amd64
.if ( ${OSVERSION} > 804000 )       #{
SUBDIR += i386-wine-devel
#	8.4-RELEASE	i386-wine-1.5.27,1 is only for i386
#	9.1-RELEASE	no port
#	9.2-RELEASE	builds & runs
#	10.0-RELEASE	no build
.endif				#} ${OSVERSION} >= 804000
.endif				#}} ${ARCH} != i386
.endif				#} BERKLIX_AMBITIOUS
.endif				#} BERKLIX_CLIENT
