1 |
laffer1 |
15462 |
# $MidnightBSD$ |
2 |
laffer1 |
331 |
|
3 |
|
|
PORTNAME= bochs |
4 |
laffer1 |
19022 |
PORTVERSION= 2.6.7 |
5 |
laffer1 |
331 |
PORTEPOCH= 2 |
6 |
|
|
CATEGORIES= emulators |
7 |
laffer1 |
7141 |
MASTER_SITES= SF |
8 |
laffer1 |
331 |
|
9 |
laffer1 |
7141 |
MAINTAINER= ports@MidnightBSD.org |
10 |
laffer1 |
19022 |
COMMENT= IA-32 (x86) PC emulator that runs DOS, Win 95, and more |
11 |
|
|
|
12 |
laffer1 |
14622 |
LICENSE= lgpl2.1 |
13 |
laffer1 |
331 |
|
14 |
laffer1 |
19022 |
USES= gmake libtool:keepla pkgconfig |
15 |
|
|
GNU_CONFIGURE= yes |
16 |
|
|
CONFIGURE_ENV= ac_cv_header_alsa_asoundlib_h=no |
17 |
|
|
CONFIGURE_ARGS= --disable-docbook --disable-instrumentation |
18 |
|
|
|
19 |
|
|
SUB_FILES= pkg-message |
20 |
|
|
|
21 |
|
|
CFLAGS+= -fno-exceptions -fomit-frame-pointer |
22 |
|
|
CXXFLAGS+= -fno-rtti |
23 |
|
|
LDFLAGS+= -L${LOCALBASE}/lib |
24 |
|
|
|
25 |
|
|
OPTIONS_DEFINE= A20_PIN ALIGN_CHECK ASSERT_CHECK AVX BUSMOUSE \ |
26 |
|
|
CDROM CHAINING CLGD54XX CONF_MSRS \ |
27 |
|
|
DISASM DOCS \ |
28 |
|
|
E1000 ES1370 EVEX FPU \ |
29 |
|
|
GAMEPORT IDLE_HACK IODEBUG \ |
30 |
|
|
LARGE_RAMFILE LOGGING LONG_PHY_ADDR \ |
31 |
|
|
MWAIT NE2000 OPTIMIZATIONS PCI PLUGINS PNIC \ |
32 |
|
|
RAW_SERIAL READLINE REPEAT_SPEED RFB \ |
33 |
|
|
SB16 SDL SHOW_IPS SMP SVGALIB SVM \ |
34 |
|
|
TERM TRACE_LINK \ |
35 |
|
|
USB USB_OHCI USB_XHCI \ |
36 |
|
|
VMX VNCSERVER VOODOO WXGTK X11 X86_64 XPM |
37 |
laffer1 |
14622 |
OPTIONS_DEFINE_i386= FAST_FUNCCALL |
38 |
laffer1 |
19022 |
OPTIONS_RADIO= DEBUG |
39 |
laffer1 |
14011 |
OPTIONS_RADIO_DEBUG= DEBUGGER GDB_STUB |
40 |
laffer1 |
19022 |
OPTIONS_DEFAULT= A20_PIN ALIGN_CHECK CDROM CONF_MSRS DISASM FPU \ |
41 |
|
|
LOGGING NE2000 OPTIMIZATIONS SB16 X11 |
42 |
laffer1 |
14011 |
|
43 |
laffer1 |
19022 |
A20_PIN_DESC= Enable support for A20 pin |
44 |
|
|
A20_PIN_CONFIGURE_ENABLE= a20-pin |
45 |
laffer1 |
14011 |
ALIGN_CHECK_DESC= Enable alignment check support |
46 |
laffer1 |
19022 |
ALIGN_CHECK_CONFIGURE_ENABLE= alignment-check |
47 |
laffer1 |
14011 |
ASSERT_CHECK_DESC= Enable BX_ASSERT checks |
48 |
laffer1 |
19022 |
ASSERT_CHECK_CONFIGURE_ENABLE= assert-checks |
49 |
|
|
AVX_DESC= Enable AVX instructions support |
50 |
|
|
AVX_CONFIGURE_ENABLE= avx |
51 |
|
|
BUSMOUSE_DESC= Enable Busmouse support |
52 |
|
|
BUSMOUSE_CONFIGURE_ENABLE= busmouse |
53 |
|
|
CDROM_DESC= Enable CDROM support |
54 |
|
|
CDROM_CONFIGURE_ENABLE= cdrom |
55 |
|
|
CHAINING_DESC= Enable handlers-chaining emulation speedups |
56 |
|
|
CHAINING_CONFIGURE_ENABLE= handlers-chaining |
57 |
|
|
CLGD54XX_DESC= Enable Cirrus Logic GD54xx video card |
58 |
|
|
CLGD54XX_CONFIGURE_ENABLE= clgd54xx |
59 |
|
|
CONF_MSRS_DESC= Enable configurable MSR registers support |
60 |
|
|
CONF_MSRS_CONFIGURE_ENABLE= configurable-msrs |
61 |
|
|
DEBUG_DESCR= Enable Debugging, select this and one of DEBUGGER or GDB_STUB (or none) |
62 |
|
|
DEBUGGER_DESC= Enable debugger support |
63 |
|
|
DEBUGGER_CONFIGURE_ENABLE= debugger |
64 |
laffer1 |
14011 |
DEBUGGER_X86_DESC= Enable x86 hardware debugger |
65 |
laffer1 |
19022 |
DEBUGGER_X86_CONFIGURE_ENABLE= x86-debugger |
66 |
|
|
DISASM_DESC= Enable disassemler support |
67 |
|
|
DISASM_CONFIGURE_ENABLE= disasm |
68 |
|
|
E1000_DESC= Enable Intel(R) Gigabit Ethernet support |
69 |
|
|
E1000_CONFIGURE_ENABLE= e1000 |
70 |
|
|
ES1370_DESC= Enable ES1370 soundcard support |
71 |
|
|
ES1370_CONFIGURE_ENABLE= es1370 |
72 |
|
|
EVEX_DESC= Enable EVEX prefix and AVX-512 extensios support |
73 |
|
|
EVEX_CONFIGURE_ENABLE= evex |
74 |
laffer1 |
14011 |
FAST_FUNCCALL_DESC= Enable fast function calls support (x86 only) |
75 |
laffer1 |
19022 |
FAST_FUNCCALL_CONFIGURE_ENABLE= fast-function-calls |
76 |
|
|
FPU_DESC= Enable FPU emulator |
77 |
|
|
FPU_CONFIGURE_ENABLE= fpu |
78 |
|
|
GAMEPORT_DESC= Enable standard PC gameport support |
79 |
|
|
GAMEPORT_CONFIGURE_ENABLE= gameport |
80 |
|
|
GDB_STUB_DESC= Enable GDB stub support |
81 |
|
|
GDB_STUB_CONFIGURE_ENABLE= gdb-stub |
82 |
|
|
IDLE_HACK_DESC= Keep Bochs from using all CPU time |
83 |
|
|
IDLE_HACK_CONFIGURE_ENABLE= idle-hack |
84 |
|
|
IODEBUG_DESC= Enable I/O interface to debugger |
85 |
|
|
IODEBUG_CONFIGURE_ENABLE= iodebug |
86 |
laffer1 |
14011 |
LARGE_RAMFILE_DESC= Enable large ramfile support |
87 |
laffer1 |
19022 |
LARGE_RAMFILE_CONFIGURE_ENABLE= large-ramfile |
88 |
|
|
LOGGING_DESC= Enable logging |
89 |
|
|
LOGGING_CONFIGURE_ENABLE= logging |
90 |
laffer1 |
14011 |
LONG_PHY_ADDR_DESC= Enable support for physical address >= 32bit |
91 |
laffer1 |
19022 |
LONG_PHY_ADDR_CONFIGURE_ENABLE= long-phy-address |
92 |
|
|
MWAIT_DESC= Enable experimental MONITOR/MWAIT support |
93 |
|
|
MWAIT_CONFIGURE_ENABLE= monitor-mwait |
94 |
|
|
NE2000_DESC= Enable ne2000 support |
95 |
|
|
NE2000_CONFIGURE_ENABLE= ne2000 |
96 |
laffer1 |
14011 |
OPTIMIZATIONS_DESC= Enable all safe speed optimizations |
97 |
laffer1 |
19022 |
OPTIMIZATIONS_CONFIGURE_ENABLE= all-optimizations |
98 |
|
|
PCI_DESC= Enable i440FX PCI support |
99 |
|
|
PCI_CONFIGURE_ENABLE= pci |
100 |
|
|
PLUGINS_DESC= Enable building dynamic loadable plugins |
101 |
|
|
PLUGINS_CONFIGURE_ENABLE= plugins |
102 |
|
|
PNIC_DESC= Enable PCI pseudo NIC (network card) support |
103 |
|
|
PNIC_CONFIGURE_ENABLE= pnic |
104 |
laffer1 |
14011 |
RAW_SERIAL_DESC= Use raw serial port access |
105 |
laffer1 |
19022 |
RAW_SERIAL_CONFIGURE_ENABLE= raw-serial |
106 |
|
|
READLINE_DESC= Enable readline support in debugger |
107 |
|
|
READLINE_USES= readline |
108 |
|
|
READLINE_CONFIGURE_ENABLE= readline |
109 |
laffer1 |
14011 |
REPEAT_SPEED_DESC= Enable repeated IO and mem copy speedups |
110 |
laffer1 |
19022 |
REPEAT_SPEED_CONFIGURE_ENABLE= repeat-speedups |
111 |
|
|
RFB_DESC= Use RFB protocol (works with VNC viewer) |
112 |
|
|
RFB_CONFIGURE_WITH= rfb |
113 |
|
|
SB16_DESC= Enable Sound Blaster 16 emulation |
114 |
|
|
SB16_CONFIGURE_ENABLE= sb16 |
115 |
|
|
SDL_USE= SDL=sdl |
116 |
|
|
SDL_CONFIGURE_WITH= sdl |
117 |
|
|
SHOW_IPS_DESC= Enable logging of measured IPS |
118 |
|
|
SHOW_IPS_CONFIGURE_ENABLE= show-ips |
119 |
|
|
SMP_DESC= Enable SMP simulation support (CPU level 6) |
120 |
|
|
SMP_CONFIGURE_ENABLE= smp |
121 |
|
|
SVGALIB_LIB_DEPENDS= libvga.so:${PORTSDIR}/graphics/svgalib |
122 |
|
|
SVGALIB_CONFIGURE_WITH= svga |
123 |
|
|
SVM_DESC= Enable SVM (AMD: secure virtual machine) emulation |
124 |
|
|
SVM_CONFIGURE_ENABLE= svm |
125 |
|
|
TERM_DESC= Use text only, console based interface |
126 |
|
|
TERM_CONFIGURE_WITH= term |
127 |
|
|
TRACE_LINK_DESC= Enable trace linking speedups |
128 |
|
|
TRACE_LINK_CONFIGURE_ENABLE= trace-linking |
129 |
|
|
USB_DESC= Enable USB UHCI support |
130 |
|
|
USB_CONFIGURE_ENABLE= usb |
131 |
|
|
USB_OHCI_DESC= Enable USB OHCI support |
132 |
|
|
USB_OHCI_CONFIGURE_ENABLE= usb-ohci |
133 |
|
|
USB_XHCI_DESC= Enable experimental USB xHCI support |
134 |
|
|
USB_XHCI_CONFIGURE_ENABLE= usb-xhci |
135 |
|
|
VMX_DESC= Enable Virtialization extensions |
136 |
|
|
VNCSERVER_DESC= Use LibVNCServer (works with VNC viewer) |
137 |
|
|
VNCSERVER_LIB_DEPENDS= libvncserver.so:${PORTSDIR}/net/libvncserver |
138 |
|
|
VNCSERVER_CONFIGURE_WITH= vncsrv |
139 |
|
|
VOODOO_DESC= Enable 3dfx Voodoo Graphics emulation |
140 |
|
|
VOODOO_CONFIGURE_ENABLE= voodoo |
141 |
|
|
WXGTK_USE= WX=2.8 |
142 |
|
|
WXGTK_CONFIGURE_WITH= wx |
143 |
|
|
WXGTK_CONFIGURE_OFF= --disable-debugger-gui |
144 |
|
|
X11_USE= XORG=xrandr |
145 |
|
|
X11_CONFIGURE_WITH= x11 |
146 |
|
|
X86_64_DESC= Enable x86-64 instructions support |
147 |
|
|
X86_64_CONFIGURE_ENABLE= x86-64 |
148 |
|
|
XPM_USE= XORG=xpm |
149 |
|
|
XOM_CONFIGURE_ENABE= xpm |
150 |
laffer1 |
14011 |
|
151 |
|
|
.include <bsd.mport.options.mk> |
152 |
laffer1 |
7141 |
|
153 |
laffer1 |
14075 |
.if empty(PORT_OPTIONS:MTERM) && empty(PORT_OPTIONS:MWXGTK) && empty(PORT_OPTIONS:MX11) |
154 |
laffer1 |
7141 |
CONFIGURE_ARGS+=--with-nogui |
155 |
laffer1 |
331 |
.endif |
156 |
|
|
|
157 |
laffer1 |
19022 |
.if ! ${PORT_OPTIONS:MFPU} |
158 |
laffer1 |
14075 |
WITH_CPU_LEVEL= 3 |
159 |
laffer1 |
331 |
.endif |
160 |
|
|
|
161 |
laffer1 |
14011 |
.if ${PORT_OPTIONS:MSMP} |
162 |
laffer1 |
9516 |
WITH_CPU_LEVEL= 6 |
163 |
|
|
.endif |
164 |
|
|
|
165 |
laffer1 |
14622 |
.if ${PORT_OPTIONS:MVMX} && ${PORT_OPTIONS:MX86_64} |
166 |
|
|
CONFIGURE_ARGS+=--enable-vmx=2 |
167 |
laffer1 |
10662 |
WITH_CPU_LEVEL= 6 |
168 |
laffer1 |
9516 |
.endif |
169 |
|
|
|
170 |
laffer1 |
14622 |
.if ${PORT_OPTIONS:MVMX} && empty(PORT_OPTIONS:MX86_64) |
171 |
|
|
CONFIGURE_ARGS+=--enable-vmx=1 |
172 |
|
|
WITH_CPU_LEVEL= 6 |
173 |
|
|
.endif |
174 |
|
|
|
175 |
laffer1 |
14011 |
.if ${PORT_OPTIONS:MX86_64} |
176 |
laffer1 |
14075 |
WITH_CPU_LEVEL= 6 |
177 |
laffer1 |
7141 |
.endif |
178 |
|
|
|
179 |
|
|
.if defined(WITH_CPU_LEVEL) |
180 |
|
|
.if ${WITH_CPU_LEVEL} < 3 || ${WITH_CPU_LEVEL} > 6 |
181 |
|
|
IGNORE= can not install: WITH_CPU_LEVEL must be an integer value between 3 and 6 |
182 |
|
|
.endif |
183 |
|
|
CONFIGURE_ARGS+=--enable-cpu-level=${WITH_CPU_LEVEL} |
184 |
|
|
.endif |
185 |
|
|
|
186 |
laffer1 |
14011 |
.if ${PORT_OPTIONS:MGDB_STUB} && ${PORT_OPTIONS:MSMP} |
187 |
|
|
IGNORE= GDB_STUB is incompatible with multiprocessor |
188 |
|
|
.endif |
189 |
|
|
|
190 |
laffer1 |
19022 |
.if ${PORT_OPTIONS:ME1000} && empty(PORT_OPTIONS:MPCI) |
191 |
|
|
IGNORE= E1000 network adapter support requires PCI support |
192 |
|
|
.endif |
193 |
|
|
|
194 |
laffer1 |
14622 |
.if ${PORT_OPTIONS:MES1370} && empty(PORT_OPTIONS:MGAMEPORT) |
195 |
|
|
IGNORE= ES1370 soundcard support requires GAMEPORT support |
196 |
|
|
.endif |
197 |
|
|
|
198 |
|
|
.if ${PORT_OPTIONS:MES1370} && empty(PORT_OPTIONS:MPCI) |
199 |
|
|
IGNORE= ES1370 soundcard support requires PCI support |
200 |
|
|
.endif |
201 |
|
|
|
202 |
laffer1 |
19022 |
.if ${PORT_OPTIONS:MEVEX} && empty(PORT_OPTIONS:MAVX) |
203 |
|
|
IGNORE= EVEX instructions support requires AVX support |
204 |
|
|
.endif |
205 |
|
|
|
206 |
laffer1 |
14622 |
.if ${PORT_OPTIONS:MPNIC} && empty(PORT_OPTIONS:MPCI) |
207 |
|
|
IGNORE= PCI pseudo NIC support requires PCI support |
208 |
|
|
.endif |
209 |
|
|
|
210 |
|
|
.if ${PORT_OPTIONS:MVOODOO} && empty(PORT_OPTIONS:MPCI) |
211 |
laffer1 |
14075 |
IGNORE= 3dfx Voodoo Graphics emulation requires PCI support |
212 |
|
|
.endif |
213 |
|
|
|
214 |
laffer1 |
14622 |
.if ${PORT_OPTIONS:MAVX} && empty(PORT_OPTIONS:MX86_64) |
215 |
|
|
IGNORE= AVX instructions support requires X86-64 support |
216 |
|
|
.endif |
217 |
|
|
|
218 |
|
|
.if ${PORT_OPTIONS:MSVM} && empty(PORT_OPTIONS:MX86_64) |
219 |
|
|
IGNORE= SVM emulation requires X86-64 support |
220 |
|
|
.endif |
221 |
|
|
|
222 |
laffer1 |
19022 |
.if ${PORT_OPTIONS:MXPM} && empty(PORT_OPTIONS:MX11) |
223 |
|
|
IGNORE= XPM support requires X11 support |
224 |
|
|
.endif |
225 |
|
|
|
226 |
laffer1 |
7141 |
pre-everything:: |
227 |
laffer1 |
14011 |
.if !defined(WITH_CPU_LEVEL) |
228 |
laffer1 |
7141 |
@${ECHO_CMD} |
229 |
|
|
@${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} |
230 |
laffer1 |
14011 |
@${ECHO_CMD} |
231 |
laffer1 |
7141 |
.endif |
232 |
|
|
|
233 |
laffer1 |
331 |
post-patch: |
234 |
laffer1 |
7141 |
@${REINPLACE_CMD} -Ee \ |
235 |
|
|
's|$$BXSHARE/|${DATADIR}/|; \ |
236 |
|
|
s|^#clock: sync=none|clock: sync=realtime|; \ |
237 |
|
|
s|^log: .+|log: /dev/null|; \ |
238 |
|
|
s|^panic: .+|panic: action=ask|; \ |
239 |
|
|
s|^parport1: .+|#&|' \ |
240 |
|
|
${WRKSRC}/.bochsrc |
241 |
|
|
@${REINPLACE_CMD} -Ee \ |
242 |
|
|
's|install_share install_doc|install_share|; \ |
243 |
|
|
s|(^sharedir.+=).+|\1 ${DATADIR}|; \ |
244 |
|
|
s|(^docdir.+=).+|\1 ${DOCSDIR}|' \ |
245 |
|
|
${WRKSRC}/Makefile.in |
246 |
|
|
@${REINPLACE_CMD} -e \ |
247 |
|
|
's|/usr/local/share/bochs|${DATADIR}|; \ |
248 |
|
|
s|/usr/local/share/doc/bochs|${DOCSDIR}|' \ |
249 |
|
|
${WRKSRC}/doc/docbook/user/user.dbk ${WRKSRC}/doc/man/*.[15] |
250 |
|
|
@${REINPLACE_CMD} -Ee 's|/usr/(include/vga\.h)|${LOCALBASE}/\1|' \ |
251 |
laffer1 |
14011 |
${WRKSRC}/gui/svga.cc |
252 |
laffer1 |
10662 |
@${REINPLACE_CMD} -Ee \ |
253 |
|
|
's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|; \ |
254 |
|
|
s|(-lvgagl)$$|\1 @LDFLAGS@|' \ |
255 |
|
|
${WRKSRC}/gui/Makefile.in |
256 |
laffer1 |
331 |
|
257 |
laffer1 |
19022 |
post-build: |
258 |
|
|
@${LN} -sf .bochsrc ${WRKSRC}/bochsrc-sample.txt |
259 |
|
|
|
260 |
laffer1 |
331 |
post-install: |
261 |
laffer1 |
19022 |
.for f in bochs bximage |
262 |
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f} |
263 |
|
|
.endfor |
264 |
laffer1 |
14011 |
.if ${PORT_OPTIONS:MPLUGINS} |
265 |
laffer1 |
19022 |
@${FIND} ${STAGEDIR}${PREFIX}/lib/bochs ! -type d | \ |
266 |
|
|
${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} |
267 |
|
|
@${FIND} ${STAGEDIR}${PREFIX}/lib/bochs -type d -empty | ${SORT} -r | \ |
268 |
|
|
${SED} 's,^${STAGEDIR}${PREFIX}/,@dir ,' >> ${TMPPLIST} |
269 |
laffer1 |
7141 |
.endif |
270 |
laffer1 |
19022 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
271 |
|
|
.for i in CHANGES README TODO bochsrc-sample.txt |
272 |
|
|
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} \ |
273 |
|
|
${STAGEDIR}${DOCSDIR}) |
274 |
|
|
.endfor |
275 |
|
|
(cd ${WRKSRC}/docs-html && ${INSTALL_DATA} *.txt \ |
276 |
|
|
${STAGEDIR}${DOCSDIR}) |
277 |
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/html |
278 |
|
|
(cd ${WRKSRC}/docs-html && ${INSTALL_DATA} *.html \ |
279 |
|
|
${STAGEDIR}${DOCSDIR}/html) |
280 |
laffer1 |
331 |
|
281 |
laffer1 |
14011 |
.include <bsd.port.mk> |