ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/emulators/bochs/Makefile
Revision: 19022
Committed: Sat May 16 01:21:38 2015 UTC (8 years, 11 months ago) by laffer1
File size: 9466 byte(s)
Log Message:
bochs 2.6.7

File Contents

# Content
1 # $MidnightBSD$
2
3 PORTNAME= bochs
4 PORTVERSION= 2.6.7
5 PORTEPOCH= 2
6 CATEGORIES= emulators
7 MASTER_SITES= SF
8
9 MAINTAINER= ports@MidnightBSD.org
10 COMMENT= IA-32 (x86) PC emulator that runs DOS, Win 95, and more
11
12 LICENSE= lgpl2.1
13
14 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 OPTIONS_DEFINE_i386= FAST_FUNCCALL
38 OPTIONS_RADIO= DEBUG
39 OPTIONS_RADIO_DEBUG= DEBUGGER GDB_STUB
40 OPTIONS_DEFAULT= A20_PIN ALIGN_CHECK CDROM CONF_MSRS DISASM FPU \
41 LOGGING NE2000 OPTIMIZATIONS SB16 X11
42
43 A20_PIN_DESC= Enable support for A20 pin
44 A20_PIN_CONFIGURE_ENABLE= a20-pin
45 ALIGN_CHECK_DESC= Enable alignment check support
46 ALIGN_CHECK_CONFIGURE_ENABLE= alignment-check
47 ASSERT_CHECK_DESC= Enable BX_ASSERT checks
48 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 DEBUGGER_X86_DESC= Enable x86 hardware debugger
65 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 FAST_FUNCCALL_DESC= Enable fast function calls support (x86 only)
75 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 LARGE_RAMFILE_DESC= Enable large ramfile support
87 LARGE_RAMFILE_CONFIGURE_ENABLE= large-ramfile
88 LOGGING_DESC= Enable logging
89 LOGGING_CONFIGURE_ENABLE= logging
90 LONG_PHY_ADDR_DESC= Enable support for physical address >= 32bit
91 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 OPTIMIZATIONS_DESC= Enable all safe speed optimizations
97 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 RAW_SERIAL_DESC= Use raw serial port access
105 RAW_SERIAL_CONFIGURE_ENABLE= raw-serial
106 READLINE_DESC= Enable readline support in debugger
107 READLINE_USES= readline
108 READLINE_CONFIGURE_ENABLE= readline
109 REPEAT_SPEED_DESC= Enable repeated IO and mem copy speedups
110 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
151 .include <bsd.mport.options.mk>
152
153 .if empty(PORT_OPTIONS:MTERM) && empty(PORT_OPTIONS:MWXGTK) && empty(PORT_OPTIONS:MX11)
154 CONFIGURE_ARGS+=--with-nogui
155 .endif
156
157 .if ! ${PORT_OPTIONS:MFPU}
158 WITH_CPU_LEVEL= 3
159 .endif
160
161 .if ${PORT_OPTIONS:MSMP}
162 WITH_CPU_LEVEL= 6
163 .endif
164
165 .if ${PORT_OPTIONS:MVMX} && ${PORT_OPTIONS:MX86_64}
166 CONFIGURE_ARGS+=--enable-vmx=2
167 WITH_CPU_LEVEL= 6
168 .endif
169
170 .if ${PORT_OPTIONS:MVMX} && empty(PORT_OPTIONS:MX86_64)
171 CONFIGURE_ARGS+=--enable-vmx=1
172 WITH_CPU_LEVEL= 6
173 .endif
174
175 .if ${PORT_OPTIONS:MX86_64}
176 WITH_CPU_LEVEL= 6
177 .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 .if ${PORT_OPTIONS:MGDB_STUB} && ${PORT_OPTIONS:MSMP}
187 IGNORE= GDB_STUB is incompatible with multiprocessor
188 .endif
189
190 .if ${PORT_OPTIONS:ME1000} && empty(PORT_OPTIONS:MPCI)
191 IGNORE= E1000 network adapter support requires PCI support
192 .endif
193
194 .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 .if ${PORT_OPTIONS:MEVEX} && empty(PORT_OPTIONS:MAVX)
203 IGNORE= EVEX instructions support requires AVX support
204 .endif
205
206 .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 IGNORE= 3dfx Voodoo Graphics emulation requires PCI support
212 .endif
213
214 .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 .if ${PORT_OPTIONS:MXPM} && empty(PORT_OPTIONS:MX11)
223 IGNORE= XPM support requires X11 support
224 .endif
225
226 pre-everything::
227 .if !defined(WITH_CPU_LEVEL)
228 @${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 @${ECHO_CMD}
231 .endif
232
233 post-patch:
234 @${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 ${WRKSRC}/gui/svga.cc
252 @${REINPLACE_CMD} -Ee \
253 's|(^LOCAL_CXXFLAGS.+=)|\1 @CPPFLAGS@|; \
254 s|(-lvgagl)$$|\1 @LDFLAGS@|' \
255 ${WRKSRC}/gui/Makefile.in
256
257 post-build:
258 @${LN} -sf .bochsrc ${WRKSRC}/bochsrc-sample.txt
259
260 post-install:
261 .for f in bochs bximage
262 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
263 .endfor
264 .if ${PORT_OPTIONS:MPLUGINS}
265 @${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 .endif
270 @${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
281 .include <bsd.port.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H