1 |
< |
# $MidnightBSD$ |
1 |
> |
# $MidnightBSD: mports/emulators/bochs/Makefile,v 1.7 2010/04/27 13:14:13 laffer1 Exp $ |
2 |
|
|
3 |
|
PORTNAME= bochs |
4 |
< |
PORTVERSION= 2.4 |
4 |
> |
PORTVERSION= 2.4.5 |
5 |
|
PORTEPOCH= 2 |
6 |
|
CATEGORIES= emulators |
7 |
|
MASTER_SITES= SF |
15 |
|
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" |
16 |
|
CONFIGURE_ARGS= --disable-docbook |
17 |
|
|
18 |
< |
OPTIONS= 1G_PAGES "Enable support for 1G pages in long mode" off \ |
19 |
< |
A20_PIN "Enable support for A20 pin" on \ |
18 |
> |
OPTIONS= A20_PIN "Enable support for A20 pin" on \ |
19 |
|
ACPI "Enable ACPI emulation" off \ |
21 |
– |
AES "Enable support of AES CPU extensions" off \ |
20 |
|
ALIGN_CHECK "Enable alignment check support" on \ |
23 |
– |
APIC "Enable APIC support" off \ |
21 |
|
ASSERT_CHECK "Enable BX_ASSERT checks" off \ |
22 |
|
CDROM "Enable CDROM support" on \ |
23 |
|
CLGD54XX "Enable Cirrus Logic GD54xx video card" off \ |
24 |
|
CONF_MSRS "Enable configurable MSR registers support" on \ |
28 |
– |
DAZ "Enable demornals-are-zeros support" off \ |
25 |
|
DEBUGGER "Enable debugger support" off \ |
26 |
|
DEBUGGER_X86 "Enable x86 hardware debugger" off \ |
27 |
|
DISASM "Enable disassemler support " on \ |
29 |
|
FPU "Enable FPU emulator" on \ |
30 |
|
GAMEPORT "Enable standard PC gameport support" off \ |
31 |
|
GDB_STUB "Enable GDB stub support" off \ |
36 |
– |
GLOBAL_PAGES "Enable support for global pages in PDE/PTE" off \ |
32 |
|
IDLE_HACK "Keep Bochs from using all CPU time" off \ |
38 |
– |
IGNORE_BADMSR "Ignore unknown MSR references (don't panic)" on \ |
33 |
|
INSTRUMENT "Enable support for instrumentation" off \ |
34 |
|
IODEBUG "Enable I/O interface to debugger" off \ |
41 |
– |
LARGE_PAGES "Enable support for large (2M/4M) pages" on \ |
35 |
|
LOGGING "Enable logging" on \ |
36 |
|
LONG_PHY_ADDR "Enable support for physical address >= 32bit" off \ |
44 |
– |
MTRR "Enable MTRR emulation (CPU level >= 6)" off \ |
37 |
|
MISALIGNEDSSE "Enable misaligned SSE support" off \ |
46 |
– |
MOVBE "Enable MOVBE intel Atom(R) instruction support" off \ |
38 |
|
MWAIT "Enable experimental MONITOR/MWAIT support" off \ |
39 |
|
NE2000 "Enable limited ne2000 support" on \ |
40 |
|
NEW_PIT "Enable use of the new PIT model" on \ |
41 |
|
OPTIMIZATIONS "Enable all safe speeed optimizations" on \ |
51 |
– |
PAE "Enable support for Physical Address Extensions" off \ |
42 |
|
PCI "Enable limited i440FX PCI support" on \ |
53 |
– |
POPCNT "Enable support for POPCNT instruction" off \ |
43 |
|
PLUGINS "Enable building dynamic loadable plugins" off \ |
44 |
|
PNIC "Enable PCI pseudo NIC (network card) support" off \ |
45 |
|
RAW_SERIAL "Use raw serial port access" off \ |
46 |
|
READLINE "Enable readline support in debugger" off \ |
47 |
|
REPEAT_SPEED "Enable repeated IO and mem copy speedups" off \ |
48 |
|
RFB "Enable VNC server support in display" off \ |
49 |
< |
SB16 "Enable Sound Blaster 16 emulation" on \ |
49 |
> |
SB16 "Enable Sound Blaster 16 emulation (broken)" off \ |
50 |
|
SDL "Enable SDL display interface" off \ |
62 |
– |
SEP "Enable SYSENTER/SYSEXIT support" off \ |
51 |
|
SHOW_IPS "Enable logging of measured IPS" off \ |
52 |
|
SMP "Enable SMP simulation support (CPU level 6)" off \ |
65 |
– |
SSE4 "Enable emulation of SSE4.2 instruction set" off \ |
53 |
|
SVGA "Enable SVGAlib support" off \ |
54 |
|
TCACHE "Enable trace cache" on \ |
55 |
|
TERM "Use text only, console based interface" off \ |
56 |
|
USB "Enable limited USB UHCI support" off \ |
57 |
|
USB_OHCI "Enable limited USB OHCI support" off \ |
58 |
|
VBE "Enable VGA BIOS Extensions" on \ |
72 |
– |
VME "Enable Virtual 8086 mode extensions" on \ |
59 |
|
VMX "Enable Virtialization extensions" off \ |
60 |
|
WX "Use WxWidgets display interface" off \ |
61 |
|
X11 "Use X11 display interface" on \ |
62 |
|
X86_64 "Enable AMD x86-64 support" off \ |
63 |
< |
XPM "Enable XPM library support" off \ |
78 |
< |
XSAVE "Enable support of XSAVE/XRSTOR CPU extensions" off |
63 |
> |
XPM "Enable XPM library support" off |
64 |
|
|
65 |
|
CFLAGS+= -fno-exceptions -fomit-frame-pointer |
66 |
|
CXXFLAGS+= -fno-rtti |
79 |
|
CONFIGURE_ARGS+=--with-nogui |
80 |
|
.endif |
81 |
|
|
97 |
– |
.if defined(WITH_1G_PAGES) && defined(WITH_X86_64) |
98 |
– |
CONFIGURE_ARGS+=--enable-1g-pages |
99 |
– |
.else |
100 |
– |
CONFIGURE_ARGS+=--disable-1g-pages |
101 |
– |
.endif |
102 |
– |
|
82 |
|
.if !defined(WITH_A20_PIN) |
83 |
|
CONFIGURE_ARGS+=--disable-a20-pin |
84 |
|
.else |
91 |
|
CONFIGURE_ARGS+=--disable-acpi |
92 |
|
.endif |
93 |
|
|
115 |
– |
.if defined(WITH_AES) |
116 |
– |
CONFIGURE_ARGS+=--enable-aes |
117 |
– |
.else |
118 |
– |
CONFIGURE_ARGS+=--disable-aes |
119 |
– |
.endif |
120 |
– |
|
94 |
|
.if !defined(WITH_ALIGN_CHECK) |
95 |
|
CONFIGURE_ARGS+=--disable-alignment-check |
96 |
|
.else |
97 |
|
CONFIGURE_ARGS+=--enable-alignment-check |
98 |
|
.endif |
99 |
|
|
127 |
– |
.if defined(WITH_APIC) |
128 |
– |
CONFIGURE_ARGS+=--enable-apic |
129 |
– |
.else |
130 |
– |
CONFIGURE_ARGS+=--disable-apic |
131 |
– |
.endif |
132 |
– |
|
100 |
|
.if defined(WITH_ASSERT_CHECK) |
101 |
|
CONFIGURE_ARGS+=--enable-assert-checks |
102 |
|
.else |
121 |
|
CONFIGURE_ARGS+=--enable-configurable-msrs |
122 |
|
.endif |
123 |
|
|
157 |
– |
.if defined(WITH_DAZ) |
158 |
– |
CONFIGURE_ARGS+=--enable-daz |
159 |
– |
.else |
160 |
– |
CONFIGURE_ARGS+=--disable-daz |
161 |
– |
.endif |
162 |
– |
|
124 |
|
.if defined(WITH_DEBUGGER) |
125 |
|
CONFIGURE_ARGS+=--enable-debugger |
126 |
|
.else |
163 |
|
CONFIGURE_ARGS+=--disable-gdb-stub |
164 |
|
.endif |
165 |
|
|
205 |
– |
.if defined(WITH_GLOBAL_PAGES) |
206 |
– |
CONFIGURE_ARGS+=--enable-global-pages |
207 |
– |
.else |
208 |
– |
CONFIGURE_ARGS+=--disable-global-pages |
209 |
– |
.endif |
210 |
– |
|
166 |
|
.if defined(WITH_IDLE_HACK) |
167 |
|
CONFIGURE_ARGS+=--enable-idle-hack |
168 |
|
.else |
169 |
|
CONFIGURE_ARGS+=--disable-idle-hack |
170 |
|
.endif |
171 |
|
|
217 |
– |
.if !defined(WITH_IGNORE_BADMSR) |
218 |
– |
CONFIGURE_ARGS+=--disable-ignore-bad-msr |
219 |
– |
.else |
220 |
– |
CONFIGURE_ARGS+=--enable-ignore-bad-msr |
221 |
– |
.endif |
222 |
– |
|
172 |
|
.if defined(WITH_INSTRUMENT) |
173 |
|
CONFIGURE_ARGS+=--enable-instrumentation |
174 |
|
.else |
181 |
|
CONFIGURE_ARGS+=--disable-iodebug |
182 |
|
.endif |
183 |
|
|
235 |
– |
.if !defined(WITH_LARGE_PAGES) |
236 |
– |
CONFIGURE_ARGS+=--disable-large-pages |
237 |
– |
.else |
238 |
– |
CONFIGURE_ARGS+=--enable-large-pages |
239 |
– |
.endif |
240 |
– |
|
184 |
|
.if !defined(WITH_LOGGING) |
185 |
|
CONFIGURE_ARGS+=--disable-logging |
186 |
|
.else |
193 |
|
CONFIGURE_ARGS+=--disable-long-phy-address |
194 |
|
.endif |
195 |
|
|
253 |
– |
.if defined(WITH_MTRR) |
254 |
– |
CONFIGURE_ARGS+=--enable-mtrr |
255 |
– |
.else |
256 |
– |
CONFIGURE_ARGS+=--disable-mtrr |
257 |
– |
.endif |
258 |
– |
|
196 |
|
.if defined(WITH_MISALIGNDSSE) |
197 |
|
CONFIGURE_ARGS+=--enable-misaligned-sse |
198 |
|
.else |
199 |
|
CONFIGURE_ARGS+=--disable-misaligned-sse |
200 |
|
.endif |
201 |
|
|
265 |
– |
.if defined(WITH_MOVBE) |
266 |
– |
CONFIGURE_ARGS+=--enable-movbe |
267 |
– |
.else |
268 |
– |
CONFIGURE_ARGS+=--disable-movbe |
269 |
– |
.endif |
270 |
– |
|
202 |
|
.if defined(WITH_MWAIT) |
203 |
|
CONFIGURE_ARGS+=--enable-monitor-mwait |
204 |
|
.else |
223 |
|
CONFIGURE_ARGS+=--disable-all-optimizations |
224 |
|
.endif |
225 |
|
|
295 |
– |
.if defined(WITH_PAE) |
296 |
– |
CONFIGURE_ARGS+=--enable-pae |
297 |
– |
.else |
298 |
– |
CONFIGURE_ARGS+=--disable-pae |
299 |
– |
.endif |
300 |
– |
|
226 |
|
.if defined(WITH_PCI) |
227 |
|
CONFIGURE_ARGS+=--enable-pci |
228 |
|
.else |
229 |
|
CONFIGURE_ARGS+=--disable-pci |
230 |
|
.endif |
231 |
|
|
307 |
– |
.if defined(WITH_POPCNT) |
308 |
– |
CONFIGURE_ARGS+=--enable-popcnt |
309 |
– |
.else |
310 |
– |
CONFIGURE_ARGS+=--disable-popcnt |
311 |
– |
.endif |
312 |
– |
|
232 |
|
.if defined(WITH_PLUGINS) |
233 |
|
CONFIGURE_ARGS+=--enable-plugins |
234 |
|
.else |
274 |
|
CONFIGURE_ARGS+=--with-sdl |
275 |
|
.endif |
276 |
|
|
358 |
– |
.if defined(WITH_SEP) |
359 |
– |
CONFIGURE_ARGS+=--enable-sep |
360 |
– |
.else |
361 |
– |
CONFIGURE_ARGS+=--disable-sep |
362 |
– |
.endif |
363 |
– |
|
277 |
|
.if defined(WITH_SHOW_IPS) |
278 |
|
CONFIGURE_ARGS+=--enable-show-ips |
279 |
|
.else |
285 |
|
WITH_CPU_LEVEL= 6 |
286 |
|
.endif |
287 |
|
|
375 |
– |
.if defined(WITH_SSE4) || defined(WITH_AES) || defined(WITH_XSAVE) |
376 |
– |
CONFIGURE_ARGS+=--enable-sse=4 --enable-sse-extension |
377 |
– |
WITH_CPU_LEVEL= 6 |
378 |
– |
.endif |
379 |
– |
|
288 |
|
.if defined(WITH_SVGA) |
289 |
|
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib |
290 |
|
CONFIGURE_ARGS+=--with-svga |
318 |
|
CONFIGURE_ARGS+=--enable-vbe |
319 |
|
.endif |
320 |
|
|
413 |
– |
.if !defined(WITH_VME) |
414 |
– |
CONFIGURE_ARGS+=--disable-vme |
415 |
– |
.else |
416 |
– |
CONFIGURE_ARGS+=--enable-vme |
417 |
– |
.endif |
418 |
– |
|
321 |
|
.if defined(WITH_VMX) |
322 |
|
CONFIGURE_ARGS+=--enable-vmx |
323 |
+ |
WITH_CPU_LEVEL= 6 |
324 |
|
.else |
325 |
|
CONFIGURE_ARGS+=--disable-vmx |
326 |
|
.endif |
327 |
|
|
328 |
|
.if defined(WITH_WX) |
329 |
< |
USE_WX= 2.4-2.6 |
329 |
> |
USE_WX= 2.4+ |
330 |
> |
CONFIGURE_ENV= WX_CONFIG="${WX_CONFIG}" |
331 |
|
CONFIGURE_ARGS+=--with-wx |
332 |
|
.else |
333 |
|
CONFIGURE_ARGS+=--disable-debugger-gui |
351 |
|
CONFIGURE_ARGS+=--disable-xpm |
352 |
|
.endif |
353 |
|
|
450 |
– |
.if defined(WITH_XSAVE) |
451 |
– |
CONFIGURE_ARGS+=--enable-xsave |
452 |
– |
.else |
453 |
– |
CONFIGURE_ARGS+=--disable-xsave |
454 |
– |
.endif |
455 |
– |
|
354 |
|
.if defined(WITH_CPU_LEVEL) |
355 |
|
.if ${WITH_CPU_LEVEL} < 3 || ${WITH_CPU_LEVEL} > 6 |
356 |
|
IGNORE= can not install: WITH_CPU_LEVEL must be an integer value between 3 and 6 |
357 |
|
.endif |
358 |
|
CONFIGURE_ARGS+=--enable-cpu-level=${WITH_CPU_LEVEL} |
461 |
– |
.if ${WITH_CPU_LEVEL} < 5 |
462 |
– |
CONFIGURE_ARGS+=--disable-mmx |
359 |
|
.endif |
464 |
– |
.endif |
360 |
|
|
466 |
– |
.if defined(WITH_SSE_LEVEL) |
467 |
– |
.if ${WITH_SSE_LEVEL} >= 1 && ${WITH_SSE_LEVEL} <= 3 |
468 |
– |
CONFIGURE_ARGS+=--enable-sse=${WITH_SSE_LEVEL} |
469 |
– |
.else |
470 |
– |
IGNORE= can not install: WITH_SSE_LEVEL must be an integer value between 1 and 3 |
471 |
– |
.endif |
472 |
– |
.endif |
473 |
– |
|
361 |
|
pre-everything:: |
362 |
|
@${ECHO_CMD} |
363 |
|
.if !defined(WITH_CPU_LEVEL) |
364 |
|
@${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} |
365 |
|
.endif |
479 |
– |
.if !defined(WITH_SSE_LEVEL) |
480 |
– |
@${ECHO_CMD} "If you want to enable SSE you have to set WITH_SSE_LEVEL to 1, 2 or 3." | ${FMT} |
481 |
– |
.endif |
366 |
|
@${ECHO_CMD} |
367 |
|
|
368 |
|
post-patch: |
384 |
|
${WRKSRC}/doc/docbook/user/user.dbk ${WRKSRC}/doc/man/*.[15] |
385 |
|
@${REINPLACE_CMD} -Ee 's|/usr/(include/vga\.h)|${LOCALBASE}/\1|' \ |
386 |
|
${WRKSRC}/gui/svga.cc |
387 |
< |
@${REINPLACE_CMD} -Ee 's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|' \ |
388 |
< |
${WRKSRC}/gui/Makefile.in |
387 |
> |
@${REINPLACE_CMD} -Ee \ |
388 |
> |
's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|; \ |
389 |
> |
s|(-lvgagl)$$|\1 @LDFLAGS@|' \ |
390 |
> |
${WRKSRC}/gui/Makefile.in |
391 |
|
|
392 |
|
post-install: |
393 |
|
.if defined(WITH_PLUGINS) |