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
2008-06-15 04:09:59 +02:00
PORTVERSION = 2.3.7
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
2007-12-15 00:14:49 +01:00
BUILD_DEPENDS = mkfontdir:${ PORTSDIR } /x11-fonts/mkfontdir
RUN_DEPENDS = mkfontdir:${ PORTSDIR } /x11-fonts/mkfontdir
2004-07-23 21:10:32 +02:00
2008-06-15 04:09:59 +02:00
USE_GNOME = gnometarget
2001-10-20 11:48:57 +02:00
USE_GMAKE = yes
2008-09-05 14:39:26 +02:00
USE_AUTOTOOLS = libtool:15
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
2008-09-24 15:50:07 +02:00
OPTIONS = ACPI "Enable ACPI emulation" off \
AES "Enable support of AES CPU extensions" 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 \
DEBUGGER "Enable debugger and disassembler support" off \
DEBUGGER_X86 "Enable x86 hardware debugger" off \
FPU "Enable FPU emulator" on \
IDLE_HACK "Keep Bochs from using all CPU time" off \
IGNORE_BAD_MSR "Ignore unknown MSR references (don't panic)" off \
2007-12-30 13:49:56 +01:00
MTRR "Enable MTRR emulation (CPU level >= 6)" off \
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 \
PORT_E9_HACK "Writes to port e9 go to console" on \
READLINE "Enable readline support in debugger" off \
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 \
2007-12-30 13:49:56 +01:00
SSE4 "Enable emulation of SSE4.2 instruction set" off \
2006-10-31 19:48:16 +01:00
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 \
USB "Enable limited i440FX PCI USB support" off \
VBE "Enable VGA BIOS Extensions" on \
WX "Use WxWidgets display interface" off \
X11 "Use X11 display interface" on \
X86_64 "Enable AMD x86-64 support" off \
2008-06-15 04:09:59 +02:00
XPM "Enable XPM library support" off \
XSAVE "Enable support of XSAVE/XRSTOR CPU extensions" off
2002-05-14 23:48:12 +02:00
2002-07-12 21:56:55 +02:00
CFLAGS += -fno-rtti -fno-exceptions -fomit-frame-pointer
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
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
. e n d i f
2008-06-15 04:09:59 +02:00
. i f d e f i n e d ( W I T H _ A E S )
CONFIGURE_ARGS += --enable-aes
. 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 O U T _ C D R O M )
CONFIGURE_ARGS += --disable-cdrom
. 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
. 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 )
CONFIGURE_ARGS += --enable-debugger --enable-disasm
. 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
. e n d i f
. i f d e f i n e d ( W I T H _ F P U )
CONFIGURE_ARGS += --enable-fpu
. e n d i f
. 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
. e n d i f
. i f d e f i n e d ( W I T H _ I G N O R E _ B A D _ M S R )
CONFIGURE_ARGS += --enable-ignore-bad-msr
. 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 T R R )
CONFIGURE_ARGS += --enable-mtrr
. e n d i f
. i f d e f i n e d ( W I T H _ M W A I T )
CONFIGURE_ARGS += --enable-monitor-mwait
. 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
. e n d i f
. i f d e f i n e d ( W I T H O U T _ N E W _ P I T )
CONFIGURE_ARGS += --disable-new-pit
. 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
. e n d i f
. i f d e f i n e d ( W I T H _ P C I )
CONFIGURE_ARGS += --enable-pci
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 L U G I N S )
CONFIGURE_ARGS += --enable-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
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 O U T _ P O R T _ E 9 _ H A C K )
CONFIGURE_ARGS += --disable-port-e9-hack
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
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
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 M P )
CONFIGURE_ARGS += --enable-smp
WITH_CPU_LEVEL = 6
2001-06-02 18:42:57 +02:00
. e n d i f
2001-10-20 11:48:57 +02:00
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
2001-10-20 11:48:57 +02:00
. e n d i f
2006-10-31 19:48:16 +01:00
2008-06-15 04:09:59 +02:00
. i f d e f i n e d ( W I T H _ S S E 4 ) | | d e f i n e d ( W I T H _ A E S ) | | d e f i n e d ( W I T H _ X S A V E )
2007-12-30 13:49:56 +01:00
CONFIGURE_ARGS += --enable-sse= 4 --enable-sse-extension
2008-06-15 04:09:59 +02:00
WITH_CPU_LEVEL = 6
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 _ 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
2007-12-30 13:49:56 +01:00
. i f d e f i n e d ( W I T H O U T _ T C A C H E )
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
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 _ V B E )
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
. i f d e f i n e d ( W I T H _ W X )
USE_WX = 2.4-2.6
CONFIGURE_ARGS += --with-wx
. 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
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
2008-06-15 04:09:59 +02:00
. e l s e
CONFIGURE_ARGS += --disable-xpm
. e n d i f
. i f d e f i n e d ( W I T H _ X S A V E )
CONFIGURE_ARGS += --enable-xsave
2006-05-17 15:08:24 +02:00
. e n d i f
2001-10-20 11:48:57 +02:00
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 }
. i f $ { W I T H _ C P U _ L E V E L } < 5
CONFIGURE_ARGS += --disable-mmx
. e n d i f
. e n d i f
. i f d e f i n e d ( W I T H _ S S E _ L E V E L )
. i f $ { W I T H _ S S E _ L E V E L } > = 1 & & $ { W I T H _ S S E _ L E V E L } < = 3
CONFIGURE_ARGS += --enable-sse= ${ WITH_SSE_LEVEL }
. e l s e
IGNORE = can not install: WITH_SSE_LEVEL must be an integer value between 1 and 3
. e n d i f
. 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
. i f ! d e f i n e d ( W I T H _ S S E _ L E V E L )
@${ ECHO_CMD } "If you want to enable SSE you have to set WITH_SSE_LEVEL to 1, 2 or 3." | ${ 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
2008-06-15 04:09:59 +02:00
@${ REINPLACE_CMD } -Ee 's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|' \
2006-10-31 19:48:16 +01:00
${ 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 >