2000-02-13 04:25:05 +01:00
# Ports collection makefile for: bochs
# Date created: 16 December 1997
# Whom: alex
1997-12-18 04:47:33 +01:00
#
1999-08-25 07:57:29 +02:00
# $FreeBSD$
1997-12-18 04:47:33 +01:00
#
2000-04-12 06:56:17 +02:00
PORTNAME = bochs
2010-07-15 07:13:49 +02:00
PORTVERSION = 2.4.5
2003-07-15 21:22:40 +02:00
PORTEPOCH = 2
2001-02-05 15:49:05 +01:00
CATEGORIES = emulators
2006-10-31 19:48:16 +01:00
MASTER_SITES = SF
1997-12-18 04:47:33 +01:00
2004-01-28 10:16:05 +01:00
MAINTAINER = ports@FreeBSD.org
2003-03-07 07:14:21 +01:00
COMMENT = An IA-32 ( x86) PC emulator that runs DOS, Win 95, and more
2000-02-07 23:08:45 +01:00
2001-10-20 11:48:57 +02:00
USE_GMAKE = yes
2009-08-02 21:36:34 +02:00
USE_AUTOTOOLS = libtool:22
2008-06-15 04:09:59 +02:00
CONFIGURE_ENV = CPPFLAGS = " ${ CPPFLAGS } " LDFLAGS = " ${ LDFLAGS } "
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS = --disable-docbook
2010-07-15 07:13:49 +02:00
OPTIONS = A20_PIN "Enable support for A20 pin" on \
2009-05-23 16:23:36 +02:00
ACPI "Enable ACPI emulation" off \
ALIGN_CHECK "Enable alignment check support" on \
ASSERT_CHECK "Enable BX_ASSERT checks" off \
2008-06-15 04:09:59 +02:00
CDROM "Enable CDROM support" on \
2006-10-31 19:48:16 +01:00
CLGD54XX "Enable Cirrus Logic GD54xx video card" off \
2009-05-23 16:23:36 +02:00
CONF_MSRS "Enable configurable MSR registers support" on \
DEBUGGER "Enable debugger support" off \
2006-10-31 19:48:16 +01:00
DEBUGGER_X86 "Enable x86 hardware debugger" off \
2009-05-23 16:23:36 +02:00
DISASM "Enable disassemler support " on \
FAST_FUNCCALL "Enable fast function calls support (x86 only)" off \
2006-10-31 19:48:16 +01:00
FPU "Enable FPU emulator" on \
2009-05-23 16:23:36 +02:00
GAMEPORT "Enable standard PC gameport support" off \
GDB_STUB "Enable GDB stub support" off \
2006-10-31 19:48:16 +01:00
IDLE_HACK "Keep Bochs from using all CPU time" off \
2009-05-23 16:23:36 +02:00
INSTRUMENT "Enable support for instrumentation" off \
IODEBUG "Enable I/O interface to debugger" off \
LOGGING "Enable logging" on \
LONG_PHY_ADDR "Enable support for physical address >= 32bit" off \
MISALIGNEDSSE "Enable misaligned SSE support" off \
2007-12-30 13:49:56 +01:00
MWAIT "Enable experimental MONITOR/MWAIT support" off \
2006-10-31 19:48:16 +01:00
NE2000 "Enable limited ne2000 support" on \
NEW_PIT "Enable use of the new PIT model" on \
OPTIMIZATIONS "Enable all safe speeed optimizations" on \
PCI "Enable limited i440FX PCI support" on \
PLUGINS "Enable building dynamic loadable plugins" off \
PNIC "Enable PCI pseudo NIC (network card) support" off \
2009-05-23 16:23:36 +02:00
RAW_SERIAL "Use raw serial port access" off \
2006-10-31 19:48:16 +01:00
READLINE "Enable readline support in debugger" off \
2009-05-23 16:23:36 +02:00
REPEAT_SPEED "Enable repeated IO and mem copy speedups" off \
2006-10-31 19:48:16 +01:00
RFB "Enable VNC server support in display" off \
SB16 "Enable Sound Blaster 16 emulation" on \
SDL "Enable SDL display interface" off \
SHOW_IPS "Enable logging of measured IPS" off \
SMP "Enable SMP simulation support (CPU level 6)" off \
SVGA "Enable SVGAlib support" off \
2007-12-30 13:49:56 +01:00
TCACHE "Enable trace cache" on \
2006-10-31 19:48:16 +01:00
TERM "Use text only, console based interface" off \
2009-05-23 16:23:36 +02:00
USB "Enable limited USB UHCI support" off \
USB_OHCI "Enable limited USB OHCI support" off \
2006-10-31 19:48:16 +01:00
VBE "Enable VGA BIOS Extensions" on \
2009-05-23 16:23:36 +02:00
VMX "Enable Virtialization extensions" off \
2006-10-31 19:48:16 +01:00
WX "Use WxWidgets display interface" off \
X11 "Use X11 display interface" on \
X86_64 "Enable AMD x86-64 support" off \
2010-07-15 07:13:49 +02:00
XPM "Enable XPM library support" off
2002-05-14 23:48:12 +02:00
2009-05-23 16:23:36 +02:00
CFLAGS += -fno-exceptions -fomit-frame-pointer
CXXFLAGS += -fno-rtti
2008-06-15 04:09:59 +02:00
CPPFLAGS = -I${ LOCALBASE } /include
LDFLAGS = -L${ LOCALBASE } /lib
1997-12-18 04:47:33 +01:00
2004-01-18 00:22:07 +01:00
MANCOMPRESSED = yes
2004-01-30 23:03:04 +01:00
MAN1 = bochs.1 bochs-dlx.1 bxcommit.1 bximage.1
2003-01-11 00:59:22 +01:00
MAN5 = bochsrc.5
2002-07-12 21:56:55 +02:00
2006-05-14 13:06:40 +02:00
SUB_FILES = pkg-message
2006-10-31 19:48:16 +01:00
. i n c l u d e < b s d . p o r t . p r e . m k >
. i f d e f i n e d ( W I T H O U T _ T E R M ) & & d e f i n e d ( W I T H O U T _ W X ) & & d e f i n e d ( W I T H O U T _ X 1 1 )
CONFIGURE_ARGS += --with-nogui
. e n d i f
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ A 2 0 _ P I N )
CONFIGURE_ARGS += --disable-a20-pin
. e l s e
CONFIGURE_ARGS += --enable-a20-pin
. e n d i f
2008-09-24 15:50:07 +02:00
. i f d e f i n e d ( W I T H _ A C P I )
CONFIGURE_ARGS += --enable-acpi
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-acpi
2008-09-24 15:50:07 +02:00
. e n d i f
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ A L I G N _ C H E C K )
CONFIGURE_ARGS += --disable-alignment-check
. e l s e
CONFIGURE_ARGS += --enable-alignment-check
. e n d i f
. i f d e f i n e d ( W I T H _ A S S E R T _ C H E C K )
CONFIGURE_ARGS += --enable-assert-checks
. e l s e
CONFIGURE_ARGS += --disable-assert-checks
. e n d i f
. i f ! d e f i n e d ( W I T H _ C D R O M )
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --disable-cdrom
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --enable-cdrom
2006-10-31 19:48:16 +01:00
. e n d i f
. i f d e f i n e d ( W I T H _ C L G D 5 4 X X )
CONFIGURE_ARGS += --enable-clgd54xx
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-clgd54xx
. e n d i f
. i f ! d e f i n e d ( W I T H _ C O N F _ M S R S )
CONFIGURE_ARGS += --disable-configurable-msrs
. e l s e
CONFIGURE_ARGS += --enable-configurable-msrs
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ D E B U G G E R )
2009-05-23 16:23:36 +02:00
CONFIGURE_ARGS += --enable-debugger
. e l s e
CONFIGURE_ARGS += --disable-debugger
2006-10-31 19:48:16 +01:00
. e n d i f
. i f d e f i n e d ( W I T H _ D E B U G G E R _ X 8 6 )
CONFIGURE_ARGS += --enable-x86-debugger
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-x86-debugger
2006-10-31 19:48:16 +01:00
. e n d i f
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ D I S A S M )
CONFIGURE_ARGS += --disable-disasm
. e l s e
CONFIGURE_ARGS += --enable-disasm
. e n d i f
. i f d e f i n e d ( W I T H _ F A S T _ F U N C C A L L )
CONFIGURE_ARGS += --enable-fast-function-calls
. e l s e
CONFIGURE_ARGS += --disable-fast-function-calls
. e n d i f
. i f ! d e f i n e d ( W I T H _ F P U )
CONFIGURE_ARGS += --disable-fpu
. e l s e
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --enable-fpu
. e n d i f
2009-05-23 16:23:36 +02:00
. i f d e f i n e d ( W I T H _ G A M E P O R T )
CONFIGURE_ARGS += --enable-gameport
. e l s e
CONFIGURE_ARGS += --disable-gameport
. e n d i f
. i f d e f i n e d ( W I T H _ G D B _ S T U B )
CONFIGURE_ARGS += --enable-gdb-stub
. e l s e
CONFIGURE_ARGS += --disable-gdb-stub
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ I D L E _ H A C K )
CONFIGURE_ARGS += --enable-idle-hack
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-idle-hack
2006-10-31 19:48:16 +01:00
. e n d i f
2009-05-23 16:23:36 +02:00
. i f d e f i n e d ( W I T H _ I N S T R U M E N T )
CONFIGURE_ARGS += --enable-instrumentation
. e l s e
CONFIGURE_ARGS += --disable-instrumentation
. e n d i f
. i f d e f i n e d ( W I T H _ I O D E B U G )
CONFIGURE_ARGS += --enable-iodebug
. e l s e
CONFIGURE_ARGS += --disable-iodebug
. e n d i f
. i f ! d e f i n e d ( W I T H _ L O G G I N G )
CONFIGURE_ARGS += --disable-logging
. e l s e
CONFIGURE_ARGS += --enable-logging
. e n d i f
. i f d e f i n e d ( W I T H _ L O N G _ P H Y _ A D D R )
CONFIGURE_ARGS += --enable-long-phy-address
. e l s e
CONFIGURE_ARGS += --disable-long-phy-address
. e n d i f
. i f d e f i n e d ( W I T H _ M I S A L I G N D S S E )
CONFIGURE_ARGS += --enable-misaligned-sse
. e l s e
CONFIGURE_ARGS += --disable-misaligned-sse
. e n d i f
2007-12-30 13:49:56 +01:00
. i f d e f i n e d ( W I T H _ M W A I T )
CONFIGURE_ARGS += --enable-monitor-mwait
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-monitor-mwait
2007-12-30 13:49:56 +01:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ N E 2 0 0 0 )
CONFIGURE_ARGS += --enable-ne2000
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-ne2000
2006-10-31 19:48:16 +01:00
. e n d i f
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ N E W _ P I T )
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --disable-new-pit
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --enable-new-pit
2006-10-31 19:48:16 +01:00
. e n d i f
. i f d e f i n e d ( W I T H _ O P T I M I Z A T I O N S )
CONFIGURE_ARGS += --enable-all-optimizations
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-all-optimizations
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ P C I )
CONFIGURE_ARGS += --enable-pci
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-pci
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ P L U G I N S )
CONFIGURE_ARGS += --enable-plugins
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-plugins
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ P N I C )
CONFIGURE_ARGS += --enable-pnic
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-pnic
2003-05-20 20:02:52 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
2009-05-23 16:23:36 +02:00
. i f d e f i n e d ( W I T H _ R A W _ S E R I A L )
CONFIGURE_ARGS += --enable-raw-serial
. e l s e
CONFIGURE_ARGS += --disable-raw-serial
2003-05-20 20:02:52 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ R E A D L I N E )
CONFIGURE_ARGS += --enable-readline
. e l s e
CONFIGURE_ARGS += --disable-readline
2003-05-20 20:02:52 +02:00
. e n d i f
2009-05-23 16:23:36 +02:00
. i f d e f i n e d ( W I T H _ R E P E A T _ S P E E D )
CONFIGURE_ARGS += --enable-repeat-speedups
. e l s e
CONFIGURE_ARGS += --disable-repeat-speedups
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ R F B )
CONFIGURE_ARGS += --with-rfb
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --without-rfb
2004-07-29 20:13:28 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ S B 1 6 )
CONFIGURE_ARGS += --enable-sb16= freebsd
2003-04-14 03:52:50 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ S D L )
USE_SDL = sdl
CONFIGURE_ARGS += --with-sdl
2006-05-17 15:08:24 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ S H O W _ I P S )
CONFIGURE_ARGS += --enable-show-ips
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-show-ips
. e n d i f
. i f d e f i n e d ( W I T H _ S M P )
CONFIGURE_ARGS += --enable-smp
WITH_CPU_LEVEL = 6
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ S V G A )
LIB_DEPENDS += vga.1:${ PORTSDIR } /graphics/svgalib
CONFIGURE_ARGS += --with-svga
2003-05-20 20:02:52 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ T E R M )
CONFIGURE_ARGS += --with-term
2004-07-29 20:13:28 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ T C A C H E )
2007-12-30 13:49:56 +01:00
CONFIGURE_ARGS += --disable-trace-cache
. e l s e
CONFIGURE_ARGS += --enable-trace-cache
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ U S B )
CONFIGURE_ARGS += --enable-usb
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-usb
. e n d i f
. i f d e f i n e d ( W I T H _ U S B _ O H C I )
CONFIGURE_ARGS += --enable-usb-ohci
. e l s e
CONFIGURE_ARGS += --disable-usb-ohci
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
2009-05-23 16:23:36 +02:00
. i f ! d e f i n e d ( W I T H _ V B E )
CONFIGURE_ARGS += --disable-vbe
. e l s e
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --enable-vbe
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
2009-05-23 16:23:36 +02:00
. i f d e f i n e d ( W I T H _ V M X )
CONFIGURE_ARGS += --enable-vmx
2010-07-15 07:13:49 +02:00
WITH_CPU_LEVEL = 6
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-vmx
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ W X )
2010-07-15 07:13:49 +02:00
USE_WX = 2.4+
CONFIGURE_ENV = WX_CONFIG = " ${ WX_CONFIG } "
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --with-wx
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-debugger-gui
2006-10-31 19:48:16 +01:00
. e n d i f
. i f d e f i n e d ( W I T H _ X 1 1 )
2007-12-15 00:14:49 +01:00
USE_XORG = xext xt
2006-10-31 19:48:16 +01:00
CONFIGURE_ARGS += --with-x11
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ X 8 6 _ 6 4 )
CONFIGURE_ARGS += --enable-x86-64
2009-05-23 16:23:36 +02:00
. e l s e
CONFIGURE_ARGS += --disable-x86-64
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ X P M )
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
USE_XORG = xpm
2009-05-23 16:23:36 +02:00
CONFIGURE_ARGS += --enable-xpm
2008-06-15 04:09:59 +02:00
. e l s e
CONFIGURE_ARGS += --disable-xpm
. e n d i f
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ C P U _ L E V E L )
. i f $ { W I T H _ C P U _ L E V E L } < 3 | | $ { W I T H _ C P U _ L E V E L } > 6
IGNORE = can not install: WITH_CPU_LEVEL must be an integer value between 3 and 6
. e n d i f
CONFIGURE_ARGS += --enable-cpu-level= ${ WITH_CPU_LEVEL }
. e n d i f
pre-everything ::
@${ ECHO_CMD }
. i f ! d e f i n e d ( W I T H _ C P U _ L E V E L )
@${ ECHO_CMD } "If you want to change the processor level to emulate (default is 5, aka Pentium), set WITH_CPU_LEVEL to the desired value. Choices are 3, 4, 5 and 6 which mean target 386, 486, Pentium or Pentium Pro emulation." | ${ FMT }
. e n d i f
@${ ECHO_CMD }
2004-01-18 00:22:07 +01:00
post-patch :
2006-10-31 19:48:16 +01:00
@${ REINPLACE_CMD } -Ee \
' s| $$ BXSHARE/| ${ DATADIR } /| ; \
s| ^#clock: sync = none| clock: sync = realtime| ; \
s| ^log: .+| log: /dev/null| ; \
s| ^panic: .+| panic: action = ask| ; \
s| ^parport1: .+| #&|' \
${ WRKSRC } /.bochsrc
@${ REINPLACE_CMD } -Ee \
2007-12-15 00:14:49 +01:00
' s| install_share install_doc| install_share| ; \
s| ( ^sharedir.+= ) .+| \1 ${ DATADIR } | ; \
2006-10-31 19:48:16 +01:00
s| ( ^docdir.+= ) .+| \1 ${ DOCSDIR } | ' \
${ WRKSRC } /Makefile.in
@${ REINPLACE_CMD } -e \
' s| /usr/local/share/bochs| ${ DATADIR } | ; \
s| /usr/local/share/doc/bochs| ${ DOCSDIR } | ' \
${ WRKSRC } /doc/docbook/user/user.dbk ${ WRKSRC } /doc/man/*.[ 15]
@${ REINPLACE_CMD } -Ee 's|/usr/(include/vga\.h)|${LOCALBASE}/\1|' \
${ WRKSRC } /gui/svga.cc
2010-07-15 07:13:49 +02:00
@${ REINPLACE_CMD } -Ee \
' s| ( ^LOCAL_CXXFLAGS.+= ) | \1 @CPPFLAGS@| ; \
s| ( -lvgagl) $$ | \1 @LDFLAGS@| ' \
${ WRKSRC } /gui/Makefile.in
2001-10-20 11:48:57 +02:00
2004-01-18 00:22:07 +01:00
post-install :
2006-10-31 19:48:16 +01:00
. i f d e f i n e d ( W I T H _ P L U G I N S )
@${ FIND } ${ PREFIX } /lib/bochs ! -type d | \
${ SED } 's,^${PREFIX}/,,' >> ${ TMPPLIST }
@${ FIND } ${ PREFIX } /lib/bochs -type d | ${ SORT } -r | \
${ SED } 's,^${PREFIX}/,@dirrm ,' >> ${ TMPPLIST }
. e n d i f
1997-12-18 04:47:33 +01:00
. i f ! d e f i n e d ( N O P O R T D O C S )
2002-07-12 21:56:55 +02:00
@${ MKDIR } ${ DOCSDIR }
2006-09-26 14:33:18 +02:00
@${ INSTALL_DATA } ${ WRKSRC } /CHANGES ${ DOCSDIR } /CHANGES
@${ INSTALL_DATA } ${ WRKSRC } /README ${ DOCSDIR } /README
@${ INSTALL_DATA } ${ WRKSRC } /TODO ${ DOCSDIR } /TODO
@${ INSTALL_DATA } ${ WRKSRC } /.bochsrc ${ DOCSDIR } /bochsrc-sample.txt
2002-07-12 21:56:55 +02:00
@${ INSTALL_DATA } ${ WRKSRC } /docs-html/*.txt ${ DOCSDIR }
2001-10-20 11:48:57 +02:00
@${ MKDIR } ${ DOCSDIR } /html
2002-07-12 21:56:55 +02:00
@${ INSTALL_DATA } ${ WRKSRC } /docs-html/*.html ${ DOCSDIR } /html
1997-12-18 04:47:33 +01:00
. e n d i f
2006-10-31 19:48:16 +01:00
@${ ECHO_CMD } ; ${ CAT } ${ PKGMESSAGE } ; ${ ECHO_CMD }
2001-06-02 18:42:57 +02:00
2006-10-31 19:48:16 +01:00
. i n c l u d e < b s d . p o r t . p o s t . m k >