1 |
< |
# ex:ts=8 |
2 |
< |
# Ports collection makefile for: bochs |
3 |
< |
# Date created: 16 December 1997 |
4 |
< |
# Whom: alex |
5 |
< |
# |
6 |
< |
# $FreeBSD: ports/emulators/bochs/Makefile,v 1.74 2006/05/17 13:08:24 vs Exp $ |
7 |
< |
# |
1 |
> |
# $MidnightBSD$ |
2 |
|
|
3 |
|
PORTNAME= bochs |
4 |
< |
PORTVERSION= 2.2.6 |
4 |
> |
PORTVERSION= 2.6.2 |
5 |
|
PORTEPOCH= 2 |
6 |
|
CATEGORIES= emulators |
7 |
< |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
14 |
< |
MASTER_SITE_SUBDIR= ${PORTNAME} |
7 |
> |
MASTER_SITES= SF |
8 |
|
|
9 |
< |
MAINTAINER= ports@FreeBSD.org |
9 |
> |
MAINTAINER= ports@MidnightBSD.org |
10 |
|
COMMENT= An IA-32 (x86) PC emulator that runs DOS, Win 95, and more |
11 |
+ |
LICENSE= lgpl2.1 |
12 |
|
|
13 |
< |
BUILD_DEPENDS= mkfontdir:${X_CLIENTS_PORT} |
14 |
< |
RUN_DEPENDS= mkfontdir:${X_CLIENTS_PORT} |
13 |
> |
OPTIONS_DEFINE= A20_PIN ALIGN_CHECK ASSERT_CHECK AVX \ |
14 |
> |
CDROM CHAINING CLGD54XX CONF_MSRS CPP_SUFX \ |
15 |
> |
DISASM DOCS \ |
16 |
> |
E1000 ES1370 FPU \ |
17 |
> |
GAMEPORT IDLE_HACK IODEBUG \ |
18 |
> |
LARGE_RAMFILE LOGGING LONG_PHY_ADDR \ |
19 |
> |
MWAIT NE2000 OPTIMIZATIONS PCI PLUGINS PNIC \ |
20 |
> |
RAW_SERIAL READLINE REPEAT_SPEED RFB \ |
21 |
> |
SB16 SDL SHOW_IPS SMP SVGALIB SVM TERM USB USB_OHCI USB_XHCI \ |
22 |
> |
VMX VOODOO WXGTK X11 X86_64 XPM |
23 |
> |
OPTIONS_DEFINE_i386= FAST_FUNCCALL |
24 |
> |
OPTIONS_RADIO= DEBUG |
25 |
> |
OPTIONS_RADIO_DEBUG= DEBUGGER GDB_STUB |
26 |
> |
OPTIONS_DEFAULT=A20_PIN ALIGN_CHECK CDROM CONF_MSRS DISASM FPU LOGGING \ |
27 |
> |
NE2000 OPTIMIZATIONS SB16 X11 |
28 |
|
|
29 |
< |
USE_XLIB= yes |
29 |
> |
A20_PIN_DESC= Enable support for A20 pin |
30 |
> |
ALIGN_CHECK_DESC= Enable alignment check support |
31 |
> |
ASSERT_CHECK_DESC= Enable BX_ASSERT checks |
32 |
> |
AVX_DESC= Enable AVX instructions support |
33 |
> |
CDROM_DESC= Enable CDROM support |
34 |
> |
CHAINING_DESC= Enable handlers-chaining emulation speedups |
35 |
> |
CLGD54XX_DESC= Enable Cirrus Logic GD54xx video card |
36 |
> |
CONF_MSRS_DESC= Enable configurable MSR registers support |
37 |
> |
CPP_SUFX_DESC= Use .cpp as C++ suffix |
38 |
> |
DEBUG_DESCR= Enable Debugging, select this and one of DEBUGGER or GDB_STUB (or none) |
39 |
> |
DEBUGGER_DESC= Enable debugger support |
40 |
> |
DEBUGGER_X86_DESC= Enable x86 hardware debugger |
41 |
> |
DISASM_DESC= Enable disassemler support |
42 |
> |
E1000_DESC= Enable Intel(R) Gigabit Ethernet support |
43 |
> |
ES1370_DESC= Enable ES1370 soundcard support |
44 |
> |
FAST_FUNCCALL_DESC= Enable fast function calls support (x86 only) |
45 |
> |
FPU_DESC= Enable FPU emulator |
46 |
> |
GAMEPORT_DESC= Enable standard PC gameport support |
47 |
> |
GDB_STUB_DESC= Enable GDB stub support |
48 |
> |
IDLE_HACK_DESC= Keep Bochs from using all CPU time |
49 |
> |
IODEBUG_DESC= Enable I/O interface to debugger |
50 |
> |
LARGE_RAMFILE_DESC= Enable large ramfile support |
51 |
> |
LOGGING_DESC= Enable logging |
52 |
> |
LONG_PHY_ADDR_DESC= Enable support for physical address >= 32bit |
53 |
> |
MWAIT_DESC= Enable experimental MONITOR/MWAIT support |
54 |
> |
NE2000_DESC= Enable ne2000 support |
55 |
> |
OPTIMIZATIONS_DESC= Enable all safe speed optimizations |
56 |
> |
PCI_DESC= Enable i440FX PCI support |
57 |
> |
PLUGINS_DESC= Enable building dynamic loadable plugins |
58 |
> |
PNIC_DESC= Enable PCI pseudo NIC (network card) support |
59 |
> |
RAW_SERIAL_DESC= Use raw serial port access |
60 |
> |
READLINE_DESC= Enable readline support in debugger |
61 |
> |
REPEAT_SPEED_DESC= Enable repeated IO and mem copy speedups |
62 |
> |
RFB_DESC= Enable VNC server support in display |
63 |
> |
SB16_DESC= Enable Sound Blaster 16 emulation |
64 |
> |
SHOW_IPS_DESC= Enable logging of measured IPS |
65 |
> |
SMP_DESC= Enable SMP simulation support (CPU level 6) |
66 |
> |
SVM_DESC= Enable SVM (AMD: secure virtual machine) emulation |
67 |
> |
TERM_DESC= Use text only, console based interface |
68 |
> |
USB_DESC= Enable USB UHCI support |
69 |
> |
USB_OHCI_DESC= Enable USB OHCI support |
70 |
> |
USB_XHCI_DESC= Enable experimental USB xHCI support |
71 |
> |
VMX_DESC= Enable Virtialization extensions |
72 |
> |
VOODOO_DESC= Enable 3dfx Voodoo Graphics emulation |
73 |
> |
X86_64_DESC= Enable x86-64 instructions support |
74 |
> |
|
75 |
|
USE_GMAKE= yes |
76 |
+ |
USE_AUTOTOOLS= libtool |
77 |
+ |
CONFIGURE_ENV= ac_cv_header_alsa_asoundlib_h=no |
78 |
+ |
CONFIGURE_ARGS= --disable-docbook --disable-instrumentation |
79 |
+ |
MAKE_JOBS_SAFE= yes |
80 |
|
|
81 |
< |
GNU_CONFIGURE= yes |
82 |
< |
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd6.0 |
83 |
< |
CONFIGURE_ARGS= --disable-split-hd \ |
84 |
< |
--enable-all-optimizations \ |
29 |
< |
--with-x11 \ |
30 |
< |
--enable-pci \ |
31 |
< |
--enable-sb16=freebsd \ |
32 |
< |
--enable-ne2000 \ |
33 |
< |
--enable-vbe |
81 |
> |
CFLAGS+= -fno-exceptions -fomit-frame-pointer ${CPPFLAGS} |
82 |
> |
CXXFLAGS+= -fno-rtti |
83 |
> |
CPPFLAGS+= -I${LOCALBASE}/include |
84 |
> |
LDFLAGS+= -L${LOCALBASE}/lib |
85 |
|
|
35 |
– |
CFLAGS+= -fno-rtti -fno-exceptions -fomit-frame-pointer |
36 |
– |
|
86 |
|
MANCOMPRESSED= yes |
87 |
|
MAN1= bochs.1 bochs-dlx.1 bxcommit.1 bximage.1 |
88 |
|
MAN5= bochsrc.5 |
89 |
|
|
90 |
|
SUB_FILES= pkg-message |
91 |
|
|
92 |
< |
.if defined(WITH_BOCHS_SMP) |
93 |
< |
CONFIGURE_ARGS+= --enable-smp |
94 |
< |
WITH_BOCHS_CPU_LEVEL= 6 |
92 |
> |
.include <bsd.mport.options.mk> |
93 |
> |
|
94 |
> |
.if empty(PORT_OPTIONS:MTERM) && empty(PORT_OPTIONS:MWXGTK) && empty(PORT_OPTIONS:MX11) |
95 |
> |
CONFIGURE_ARGS+=--with-nogui |
96 |
|
.endif |
97 |
|
|
98 |
< |
.if defined(WITH_BOCHS_CPU_LEVEL) |
99 |
< |
.if ${WITH_BOCHS_CPU_LEVEL} < 3 || ${WITH_BOCHS_CPU_LEVEL} > 6 |
100 |
< |
IGNORE= cannot install: WITH_BOCHS_CPU_LEVEL must be an integer value between 3 and 6 |
98 |
> |
.if ${PORT_OPTIONS:MA20_PIN} |
99 |
> |
CONFIGURE_ARGS+=--enable-a20-pin |
100 |
> |
.else |
101 |
> |
CONFIGURE_ARGS+=--disable-a20-pin |
102 |
|
.endif |
103 |
< |
CONFIGURE_ARGS+= --enable-cpu-level=${WITH_BOCHS_CPU_LEVEL} |
104 |
< |
.if ${WITH_BOCHS_CPU_LEVEL} < 5 |
105 |
< |
CONFIGURE_ARGS+= --disable-mmx |
103 |
> |
|
104 |
> |
.if ${PORT_OPTIONS:MALIGN_CHECK} |
105 |
> |
CONFIGURE_ARGS+=--enable-alignment-check |
106 |
> |
.else |
107 |
> |
CONFIGURE_ARGS+=--disable-alignment-check |
108 |
|
.endif |
109 |
+ |
|
110 |
+ |
.if ${PORT_OPTIONS:MASSERT_CHECK} |
111 |
+ |
CONFIGURE_ARGS+=--enable-assert-checks |
112 |
+ |
.else |
113 |
+ |
CONFIGURE_ARGS+=--disable-assert-checks |
114 |
|
.endif |
115 |
|
|
116 |
< |
.if defined(WITH_BOCHS_GUI_TERM) |
117 |
< |
CONFIGURE_ARGS+= --with-term |
116 |
> |
.if ${PORT_OPTIONS:MAVX} |
117 |
> |
CONFIGURE_ARGS+=--enable-avx |
118 |
> |
.else |
119 |
> |
CONFIGURE_ARGS+=--disable-avx |
120 |
|
.endif |
121 |
|
|
122 |
< |
.if defined(WITH_BOCHS_GUI_NOGUI) |
123 |
< |
CONFIGURE_ARGS+= --with-nogui |
122 |
> |
.if ${PORT_OPTIONS:MCDROM} |
123 |
> |
CONFIGURE_ARGS+=--enable-cdrom |
124 |
> |
.else |
125 |
> |
CONFIGURE_ARGS+=--disable-cdrom |
126 |
|
.endif |
127 |
|
|
128 |
< |
.if defined(WITH_BOCHS_AMD64) |
129 |
< |
CONFIGURE_ARGS+= --enable-x86-64 |
128 |
> |
.if ${PORT_OPTIONS:MCHAINING} |
129 |
> |
CONFIGURE_ARGS+=--enable-handlers-chaining |
130 |
> |
.else |
131 |
> |
CONFIGURE_ARGS+=--disable-handlers-chaining |
132 |
|
.endif |
133 |
|
|
134 |
< |
.if defined(WITH_BOCHS_DEBUGGER) |
135 |
< |
CONFIGURE_ARGS+= --enable-debugger --enable-disasm |
134 |
> |
.if ${PORT_OPTIONS:MCLGD54XX} |
135 |
> |
CONFIGURE_ARGS+=--enable-clgd54xx |
136 |
> |
.else |
137 |
> |
CONFIGURE_ARGS+=--disable-clgd54xx |
138 |
|
.endif |
139 |
|
|
140 |
< |
.if defined(WITH_BOCHS_X86_DEBUGGER) |
141 |
< |
CONFIGURE_ARGS+= --enable-x86-debugger |
140 |
> |
.if ${PORT_OPTIONS:MCONF_MSRS} |
141 |
> |
CONFIGURE_ARGS+=--enable-configurable-msrs |
142 |
> |
.else |
143 |
> |
CONFIGURE_ARGS+=--disable-configurable-msrs |
144 |
|
.endif |
145 |
|
|
146 |
< |
.if defined(WITH_BOCHS_PORT_E9_HACK) |
147 |
< |
CONFIGURE_ARGS+= --enable-port-e9-hack |
146 |
> |
.if ${PORT_OPTIONS:MCPP_SUFX} |
147 |
> |
CONFIGURE_ARGS+=--enable-cpp |
148 |
> |
.else |
149 |
> |
CONFIGURE_ARGS+=--disable-cpp |
150 |
|
.endif |
151 |
|
|
152 |
< |
pre-patch:: |
153 |
< |
@${ECHO_MSG} |
154 |
< |
.if !defined(WITH_BOCHS_CPU_LEVEL) |
155 |
< |
@${ECHO_MSG} "If you want to change the processor level to emulate (default is 5, aka Pentium)" |
86 |
< |
@${ECHO_MSG} "Choices are 3,4,5,6 which mean target 386, 486, Pentium or Pentium Pro emulation" |
87 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_CPU_LEVEL=<cpu level>\"" |
88 |
< |
@${ECHO_MSG} |
152 |
> |
.if ${PORT_OPTIONS:MDEBUGGER} |
153 |
> |
CONFIGURE_ARGS+=--enable-debugger |
154 |
> |
.else |
155 |
> |
CONFIGURE_ARGS+=--disable-debugger |
156 |
|
.endif |
157 |
< |
.if !defined(WITH_BOCHS_GUI_TERM) |
158 |
< |
@${ECHO_MSG} "If you want to enable the plain text, console-based bochs interface" |
159 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_GUI_TERM=yes\"" |
160 |
< |
@${ECHO_MSG} |
157 |
> |
|
158 |
> |
.if ${PORT_OPTIONS:MDEBUGGER_X86} |
159 |
> |
CONFIGURE_ARGS+=--enable-x86-debugger |
160 |
> |
.else |
161 |
> |
CONFIGURE_ARGS+=--disable-x86-debugger |
162 |
|
.endif |
163 |
< |
.if !defined(WITH_BOCHS_GUI_NOGUI) |
164 |
< |
@${ECHO_MSG} "If you want the bochs display" |
165 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_GUI_NOGUI=yes\"" |
166 |
< |
@${ECHO_MSG} |
163 |
> |
|
164 |
> |
.if ${PORT_OPTIONS:MDISASM} |
165 |
> |
CONFIGURE_ARGS+=--enable-disasm |
166 |
> |
.else |
167 |
> |
CONFIGURE_ARGS+=--disable-disasm |
168 |
|
.endif |
169 |
< |
.if !defined(WITH_BOCHS_SMP) |
170 |
< |
@${ECHO_MSG} "If you want to compile with SMP support (implies WITH_BOCHS_CPU_LEVEL=6)," |
171 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_SMP\"" |
172 |
< |
@${ECHO_MSG} |
169 |
> |
|
170 |
> |
.if ${PORT_OPTIONS:ME1000} |
171 |
> |
CONFIGURE_ARGS+=--enable-e1000 |
172 |
> |
.else |
173 |
> |
CONFIGURE_ARGS+=--disable-e1000 |
174 |
|
.endif |
175 |
< |
.if !defined(WITH_BOCHS_DEBUGGER) |
176 |
< |
@${ECHO_MSG} "If you want to compile with builtin debugger and disassembler support," |
177 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_DEBUGGER=yes\"" |
178 |
< |
@${ECHO_MSG} |
175 |
> |
|
176 |
> |
.if ${PORT_OPTIONS:MES1370} |
177 |
> |
CONFIGURE_ARGS+=--enable-es1370 |
178 |
> |
.else |
179 |
> |
CONFIGURE_ARGS+=--disable-es1370 |
180 |
|
.endif |
181 |
< |
.if !defined(WITH_BOCHS_X86_DEBUGGER) |
182 |
< |
@${ECHO_MSG} "If you want to compile with x86 hardware debugger support," |
183 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_X86_DEBUGGER=yes\"" |
184 |
< |
@${ECHO_MSG} |
181 |
> |
|
182 |
> |
.if ${PORT_OPTIONS:MFAST_FUNCCALL} |
183 |
> |
CONFIGURE_ARGS+=--enable-fast-function-calls |
184 |
> |
.else |
185 |
> |
CONFIGURE_ARGS+=--disable-fast-function-calls |
186 |
|
.endif |
187 |
< |
.if !defined(WITH_BOCHS_AMD64) |
188 |
< |
@${ECHO_MSG} "If you want to compile with AMD x86-64 support," |
189 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_AMD64=yes\"" |
190 |
< |
@${ECHO_MSG} |
187 |
> |
|
188 |
> |
.if ${PORT_OPTIONS:MFPU} |
189 |
> |
CONFIGURE_ARGS+=--enable-fpu |
190 |
> |
.else |
191 |
> |
CONFIGURE_ARGS+=--disable-fpu |
192 |
> |
WITH_CPU_LEVEL= 3 |
193 |
|
.endif |
194 |
< |
.if !defined(WITH_BOCHS_PORT_E9_HACK) |
195 |
< |
@${ECHO_MSG} "If you want to compile with port e9 hack support," |
196 |
< |
@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_PORT_E9_HACK=yes\"" |
197 |
< |
@${ECHO_MSG} |
194 |
> |
|
195 |
> |
.if ${PORT_OPTIONS:MGAMEPORT} |
196 |
> |
CONFIGURE_ARGS+=--enable-gameport |
197 |
> |
.else |
198 |
> |
CONFIGURE_ARGS+=--disable-gameport |
199 |
|
.endif |
200 |
|
|
201 |
+ |
.if ${PORT_OPTIONS:MGDB_STUB} |
202 |
+ |
CONFIGURE_ARGS+=--enable-gdb-stub |
203 |
+ |
.else |
204 |
+ |
CONFIGURE_ARGS+=--disable-gdb-stub |
205 |
+ |
.endif |
206 |
+ |
|
207 |
+ |
.if ${PORT_OPTIONS:MIDLE_HACK} |
208 |
+ |
CONFIGURE_ARGS+=--enable-idle-hack |
209 |
+ |
.else |
210 |
+ |
CONFIGURE_ARGS+=--disable-idle-hack |
211 |
+ |
.endif |
212 |
+ |
|
213 |
+ |
.if ${PORT_OPTIONS:MIODEBUG} |
214 |
+ |
CONFIGURE_ARGS+=--enable-iodebug |
215 |
+ |
.else |
216 |
+ |
CONFIGURE_ARGS+=--disable-iodebug |
217 |
+ |
.endif |
218 |
+ |
|
219 |
+ |
.if ${PORT_OPTIONS:MLARGE_RAMFILE} |
220 |
+ |
CONFIGURE_ARGS+=--enable-large-ramfile |
221 |
+ |
.else |
222 |
+ |
CONFIGURE_ARGS+=--disable-large-ramfile |
223 |
+ |
.endif |
224 |
+ |
|
225 |
+ |
.if ${PORT_OPTIONS:MLOGGING} |
226 |
+ |
CONFIGURE_ARGS+=--enable-logging |
227 |
+ |
.else |
228 |
+ |
CONFIGURE_ARGS+=--disable-logging |
229 |
+ |
.endif |
230 |
+ |
|
231 |
+ |
.if ${PORT_OPTIONS:MLONG_PHY_ADDR} |
232 |
+ |
CONFIGURE_ARGS+=--enable-long-phy-address |
233 |
+ |
.else |
234 |
+ |
CONFIGURE_ARGS+=--disable-long-phy-address |
235 |
+ |
.endif |
236 |
+ |
|
237 |
+ |
.if ${PORT_OPTIONS:MMWAIT} |
238 |
+ |
CONFIGURE_ARGS+=--enable-monitor-mwait |
239 |
+ |
.else |
240 |
+ |
CONFIGURE_ARGS+=--disable-monitor-mwait |
241 |
+ |
.endif |
242 |
+ |
|
243 |
+ |
.if ${PORT_OPTIONS:MNE2000} |
244 |
+ |
CONFIGURE_ARGS+=--enable-ne2000 |
245 |
+ |
.else |
246 |
+ |
CONFIGURE_ARGS+=--disable-ne2000 |
247 |
+ |
.endif |
248 |
+ |
|
249 |
+ |
.if ${PORT_OPTIONS:MOPTIMIZATIONS} |
250 |
+ |
CONFIGURE_ARGS+=--enable-all-optimizations |
251 |
+ |
.else |
252 |
+ |
CONFIGURE_ARGS+=--disable-all-optimizations |
253 |
+ |
.endif |
254 |
+ |
|
255 |
+ |
.if ${PORT_OPTIONS:MPCI} |
256 |
+ |
CONFIGURE_ARGS+=--enable-pci |
257 |
+ |
.else |
258 |
+ |
CONFIGURE_ARGS+=--disable-pci |
259 |
+ |
.endif |
260 |
+ |
|
261 |
+ |
.if ${PORT_OPTIONS:MPLUGINS} |
262 |
+ |
CONFIGURE_ARGS+=--enable-plugins |
263 |
+ |
.else |
264 |
+ |
CONFIGURE_ARGS+=--disable-plugins |
265 |
+ |
.endif |
266 |
+ |
|
267 |
+ |
.if ${PORT_OPTIONS:MPNIC} |
268 |
+ |
CONFIGURE_ARGS+=--enable-pnic |
269 |
+ |
.else |
270 |
+ |
CONFIGURE_ARGS+=--disable-pnic |
271 |
+ |
.endif |
272 |
+ |
|
273 |
+ |
.if ${PORT_OPTIONS:MRAW_SERIAL} |
274 |
+ |
CONFIGURE_ARGS+=--enable-raw-serial |
275 |
+ |
.else |
276 |
+ |
CONFIGURE_ARGS+=--disable-raw-serial |
277 |
+ |
.endif |
278 |
+ |
|
279 |
+ |
.if ${PORT_OPTIONS:MREADLINE} |
280 |
+ |
USES+= readline |
281 |
+ |
CONFIGURE_ARGS+=--enable-readline |
282 |
+ |
.else |
283 |
+ |
CONFIGURE_ARGS+=--disable-readline |
284 |
+ |
.endif |
285 |
+ |
|
286 |
+ |
.if ${PORT_OPTIONS:MREPEAT_SPEED} |
287 |
+ |
CONFIGURE_ARGS+=--enable-repeat-speedups |
288 |
+ |
.else |
289 |
+ |
CONFIGURE_ARGS+=--disable-repeat-speedups |
290 |
+ |
.endif |
291 |
+ |
|
292 |
+ |
.if ${PORT_OPTIONS:MRFB} |
293 |
+ |
CONFIGURE_ARGS+=--with-rfb |
294 |
+ |
.else |
295 |
+ |
CONFIGURE_ARGS+=--without-rfb |
296 |
+ |
.endif |
297 |
+ |
|
298 |
+ |
.if ${PORT_OPTIONS:MSB16} |
299 |
+ |
CONFIGURE_ARGS+=--enable-sb16 |
300 |
+ |
.endif |
301 |
+ |
|
302 |
+ |
.if ${PORT_OPTIONS:MSDL} |
303 |
+ |
USE_SDL= sdl |
304 |
+ |
CONFIGURE_ARGS+=--with-sdl |
305 |
+ |
.endif |
306 |
+ |
|
307 |
+ |
.if ${PORT_OPTIONS:MSHOW_IPS} |
308 |
+ |
CONFIGURE_ARGS+=--enable-show-ips |
309 |
+ |
.else |
310 |
+ |
CONFIGURE_ARGS+=--disable-show-ips |
311 |
+ |
.endif |
312 |
+ |
|
313 |
+ |
.if ${PORT_OPTIONS:MSMP} |
314 |
+ |
CONFIGURE_ARGS+=--enable-smp |
315 |
+ |
WITH_CPU_LEVEL= 6 |
316 |
+ |
.endif |
317 |
+ |
|
318 |
+ |
.if ${PORT_OPTIONS:MSVGALIB} |
319 |
+ |
LIB_DEPENDS+= vga:${PORTSDIR}/graphics/svgalib |
320 |
+ |
CONFIGURE_ARGS+=--with-svga |
321 |
+ |
.else |
322 |
+ |
CONFIGURE_ARGS+=--without-svga |
323 |
+ |
.endif |
324 |
+ |
|
325 |
+ |
.if ${PORT_OPTIONS:MSVM} |
326 |
+ |
CONFIGURE_ARGS+=--enable-svm |
327 |
+ |
.else |
328 |
+ |
CONFIGURE_ARGS+=--disable-svm |
329 |
+ |
.endif |
330 |
+ |
|
331 |
+ |
.if ${PORT_OPTIONS:MTERM} |
332 |
+ |
CONFIGURE_ARGS+=--with-term |
333 |
+ |
.else |
334 |
+ |
CONFIGURE_ARGS+=--without-term |
335 |
+ |
.endif |
336 |
+ |
|
337 |
+ |
.if ${PORT_OPTIONS:MUSB} |
338 |
+ |
CONFIGURE_ARGS+=--enable-usb |
339 |
+ |
.else |
340 |
+ |
CONFIGURE_ARGS+=--disable-usb |
341 |
+ |
.endif |
342 |
+ |
|
343 |
+ |
.if ${PORT_OPTIONS:MUSB_OHCI} |
344 |
+ |
CONFIGURE_ARGS+=--enable-usb-ohci |
345 |
+ |
.else |
346 |
+ |
CONFIGURE_ARGS+=--disable-usb-ohci |
347 |
+ |
.endif |
348 |
+ |
|
349 |
+ |
.if ${PORT_OPTIONS:MUSB_XHCI} |
350 |
+ |
CONFIGURE_ARGS+=--enable-usb-xhci |
351 |
+ |
.else |
352 |
+ |
CONFIGURE_ARGS+=--disable-usb-xhci |
353 |
+ |
.endif |
354 |
+ |
|
355 |
+ |
.if ${PORT_OPTIONS:MVMX} && ${PORT_OPTIONS:MX86_64} |
356 |
+ |
CONFIGURE_ARGS+=--enable-vmx=2 |
357 |
+ |
WITH_CPU_LEVEL= 6 |
358 |
+ |
.endif |
359 |
+ |
|
360 |
+ |
.if ${PORT_OPTIONS:MVMX} && empty(PORT_OPTIONS:MX86_64) |
361 |
+ |
CONFIGURE_ARGS+=--enable-vmx=1 |
362 |
+ |
WITH_CPU_LEVEL= 6 |
363 |
+ |
.endif |
364 |
+ |
|
365 |
+ |
.if ${PORT_OPTIONS:MVOODOO} |
366 |
+ |
CONFIGURE_ARGS+=--enable-voodoo |
367 |
+ |
.else |
368 |
+ |
CONFIGURE_ARGS+=--disable-voodoo |
369 |
+ |
.endif |
370 |
+ |
|
371 |
+ |
.if ${PORT_OPTIONS:MWXGTK} |
372 |
+ |
USE_WX= 2.4+ |
373 |
+ |
CONFIGURE_ARGS+=--with-wx |
374 |
+ |
.else |
375 |
+ |
CONFIGURE_ARGS+=--disable-debugger-gui |
376 |
+ |
.endif |
377 |
+ |
|
378 |
+ |
.if ${PORT_OPTIONS:MX11} |
379 |
+ |
USE_XORG= xrandr |
380 |
+ |
CONFIGURE_ARGS+=--with-x11 |
381 |
+ |
.endif |
382 |
+ |
|
383 |
+ |
.if ${PORT_OPTIONS:MX86_64} |
384 |
+ |
CONFIGURE_ARGS+=--enable-x86-64 |
385 |
+ |
WITH_CPU_LEVEL= 6 |
386 |
+ |
.else |
387 |
+ |
CONFIGURE_ARGS+=--disable-x86-64 |
388 |
+ |
.endif |
389 |
+ |
|
390 |
+ |
.if ${PORT_OPTIONS:MXPM} && ${PORT_OPTIONS:MX11} |
391 |
+ |
USE_XORG+= xpm |
392 |
+ |
CONFIGURE_ARGS+=--enable-xpm |
393 |
+ |
.else |
394 |
+ |
CONFIGURE_ARGS+=--disable-xpm |
395 |
+ |
.endif |
396 |
+ |
|
397 |
+ |
.if defined(WITH_CPU_LEVEL) |
398 |
+ |
.if ${WITH_CPU_LEVEL} < 3 || ${WITH_CPU_LEVEL} > 6 |
399 |
+ |
IGNORE= can not install: WITH_CPU_LEVEL must be an integer value between 3 and 6 |
400 |
+ |
.endif |
401 |
+ |
CONFIGURE_ARGS+=--enable-cpu-level=${WITH_CPU_LEVEL} |
402 |
+ |
.endif |
403 |
+ |
|
404 |
+ |
.if ${PORT_OPTIONS:MGDB_STUB} && ${PORT_OPTIONS:MSMP} |
405 |
+ |
IGNORE= GDB_STUB is incompatible with multiprocessor |
406 |
+ |
.endif |
407 |
+ |
|
408 |
+ |
.if ${PORT_OPTIONS:MES1370} && empty(PORT_OPTIONS:MGAMEPORT) |
409 |
+ |
IGNORE= ES1370 soundcard support requires GAMEPORT support |
410 |
+ |
.endif |
411 |
+ |
|
412 |
+ |
.if ${PORT_OPTIONS:MES1370} && empty(PORT_OPTIONS:MPCI) |
413 |
+ |
IGNORE= ES1370 soundcard support requires PCI support |
414 |
+ |
.endif |
415 |
+ |
|
416 |
+ |
.if ${PORT_OPTIONS:MPNIC} && empty(PORT_OPTIONS:MPCI) |
417 |
+ |
IGNORE= PCI pseudo NIC support requires PCI support |
418 |
+ |
.endif |
419 |
+ |
|
420 |
+ |
.if ${PORT_OPTIONS:MVOODOO} && empty(PORT_OPTIONS:MPCI) |
421 |
+ |
IGNORE= 3dfx Voodoo Graphics emulation requires PCI support |
422 |
+ |
.endif |
423 |
+ |
|
424 |
+ |
.if ${PORT_OPTIONS:MAVX} && empty(PORT_OPTIONS:MX86_64) |
425 |
+ |
IGNORE= AVX instructions support requires X86-64 support |
426 |
+ |
.endif |
427 |
+ |
|
428 |
+ |
.if ${PORT_OPTIONS:MSVM} && empty(PORT_OPTIONS:MX86_64) |
429 |
+ |
IGNORE= SVM emulation requires X86-64 support |
430 |
+ |
.endif |
431 |
+ |
|
432 |
+ |
pre-everything:: |
433 |
+ |
.if !defined(WITH_CPU_LEVEL) |
434 |
+ |
@${ECHO_CMD} |
435 |
+ |
@${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} |
436 |
+ |
@${ECHO_CMD} |
437 |
+ |
.endif |
438 |
+ |
|
439 |
|
post-patch: |
440 |
< |
@${REINPLACE_CMD} -E ' \ |
441 |
< |
s|file=bios/|file=${DATADIR}/|; \ |
442 |
< |
s|bios/VGABIOS|${DATADIR}/VGABIOS|; \ |
443 |
< |
' ${WRKSRC}/.bochsrc |
444 |
< |
@${REINPLACE_CMD} -E ' \ |
445 |
< |
s|(^sharedir.+=).+|\1 ${DATADIR}|; \ |
446 |
< |
s|(^docdir.+=).+|\1 ${DOCSDIR}|; \ |
447 |
< |
' ${WRKSRC}/Makefile.in |
448 |
< |
@${REINPLACE_CMD} -e ' \ |
449 |
< |
s|/usr/local/share/bochs|${DATADIR}|; \ |
450 |
< |
s|/usr/local/share/doc/bochs|${DOCSDIR}|; \ |
451 |
< |
' ${WRKSRC}/doc/docbook/user/user.dbk ${WRKSRC}/doc/man/*.1 \ |
452 |
< |
${WRKSRC}/doc/man/*.5 |
440 |
> |
@${REINPLACE_CMD} -Ee \ |
441 |
> |
's|$$BXSHARE/|${DATADIR}/|; \ |
442 |
> |
s|^#clock: sync=none|clock: sync=realtime|; \ |
443 |
> |
s|^log: .+|log: /dev/null|; \ |
444 |
> |
s|^panic: .+|panic: action=ask|; \ |
445 |
> |
s|^parport1: .+|#&|' \ |
446 |
> |
${WRKSRC}/.bochsrc |
447 |
> |
@${REINPLACE_CMD} -Ee \ |
448 |
> |
's|install_share install_doc|install_share|; \ |
449 |
> |
s|(^sharedir.+=).+|\1 ${DATADIR}|; \ |
450 |
> |
s|(^docdir.+=).+|\1 ${DOCSDIR}|' \ |
451 |
> |
${WRKSRC}/Makefile.in |
452 |
> |
@${REINPLACE_CMD} -e \ |
453 |
> |
's|/usr/local/share/bochs|${DATADIR}|; \ |
454 |
> |
s|/usr/local/share/doc/bochs|${DOCSDIR}|' \ |
455 |
> |
${WRKSRC}/doc/docbook/user/user.dbk ${WRKSRC}/doc/man/*.[15] |
456 |
> |
@${REINPLACE_CMD} -Ee 's|/usr/(include/vga\.h)|${LOCALBASE}/\1|' \ |
457 |
> |
${WRKSRC}/gui/svga.cc |
458 |
> |
@${REINPLACE_CMD} -Ee \ |
459 |
> |
's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|; \ |
460 |
> |
s|(-lvgagl)$$|\1 @LDFLAGS@|' \ |
461 |
> |
${WRKSRC}/gui/Makefile.in |
462 |
|
|
463 |
|
post-install: |
464 |
< |
.if !defined(NOPORTDOCS) |
464 |
> |
.if ${PORT_OPTIONS:MPLUGINS} |
465 |
> |
@${FIND} ${PREFIX}/lib/bochs ! -type d | \ |
466 |
> |
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} |
467 |
> |
@${FIND} ${PREFIX}/lib/bochs -type d | ${SORT} -r | \ |
468 |
> |
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} |
469 |
> |
.endif |
470 |
> |
.if ${PORT_OPTIONS:MDOCS} |
471 |
|
@${MKDIR} ${DOCSDIR} |
472 |
+ |
@${INSTALL_DATA} ${WRKSRC}/CHANGES ${DOCSDIR}/CHANGES |
473 |
+ |
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README |
474 |
+ |
@${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR}/TODO |
475 |
+ |
@${INSTALL_DATA} ${WRKSRC}/.bochsrc ${DOCSDIR}/bochsrc-sample.txt |
476 |
|
@${INSTALL_DATA} ${WRKSRC}/docs-html/*.txt ${DOCSDIR} |
477 |
|
@${MKDIR} ${DOCSDIR}/html |
478 |
|
@${INSTALL_DATA} ${WRKSRC}/docs-html/*.html ${DOCSDIR}/html |
479 |
|
.endif |
480 |
+ |
@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD} |
481 |
|
|
482 |
|
.include <bsd.port.mk> |