1 | # $Id: Portfile 30226 2007-10-22 22:51:53Z jmpp@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name bochs |
---|
5 | version 2.3.5 |
---|
6 | categories emulators |
---|
7 | maintainers nomaintainer |
---|
8 | description cross platform ia-32 emulator |
---|
9 | long_description Bochs is a highly portable open source IA-32 (x86) \ |
---|
10 | PC emulator written in C++, that runs on most popular platforms. \ |
---|
11 | It emulates the Intel x86 CPU, common I/O devices, and a custom BIOS. |
---|
12 | |
---|
13 | platforms darwin |
---|
14 | homepage http://bochs.sourceforge.net/ |
---|
15 | master_sites sourceforge |
---|
16 | checksums md5 2d9b2c1e17b4eba2d46b208be09df4a9 |
---|
17 | |
---|
18 | patchfiles patch-.bochsrc |
---|
19 | |
---|
20 | depends_run port:wget |
---|
21 | |
---|
22 | configure.args --prefix=${prefix} \ |
---|
23 | --exec-prefix=${prefix} \ |
---|
24 | --bindir=${prefix}/bin \ |
---|
25 | --mandir=${prefix}/share/man \ |
---|
26 | --enable-all-optimizations \ |
---|
27 | --enable-sb16=osx \ |
---|
28 | --enable-vbe \ |
---|
29 | --enable-cdrom |
---|
30 | |
---|
31 | variant smp { |
---|
32 | # Enable symmetric multi-processor support |
---|
33 | configure.args-append --enable-smp --enable-cpu-level=6 |
---|
34 | } |
---|
35 | |
---|
36 | pre-destroot { |
---|
37 | xinstall -m 755 -d ${destroot}${prefix}/bin |
---|
38 | xinstall -m 755 -d ${destroot}${prefix}/share/bochs |
---|
39 | xinstall -m 755 -d ${destroot}/Applications/MacPorts |
---|
40 | } |
---|
41 | |
---|
42 | post-destroot { |
---|
43 | file copy ${worksrcpath}/bochs.app ${destroot}${prefix}/share/bochs |
---|
44 | system "ln -s ${prefix}/share/bochs/bochs.app ${destroot}/Applications/MacPorts/bochs.app" |
---|
45 | xinstall -m 755 ${worksrcpath}/bochs ${destroot}${prefix}/bin |
---|
46 | xinstall -m 755 ${worksrcpath}/bximage ${destroot}${prefix}/bin |
---|
47 | xinstall -m 755 ${worksrcpath}/bxcommit ${destroot}${prefix}/bin |
---|
48 | reinplace "s|\$BXSHARE/|${prefix}/share/bochs/|g" \ |
---|
49 | ${destroot}${prefix}/share/bochs/bochsrc-sample.txt |
---|
50 | } |
---|
51 | |
---|
52 | post-activate { |
---|
53 | ui_msg "\n |
---|
54 | |
---|
55 | **** To prepare bochs for use **** |
---|
56 | |
---|
57 | 1) Rename file bochsrc-sample.txt to bochrc.txt for use. |
---|
58 | -cd ${prefix}/share/bochs |
---|
59 | -sudo cp bochsrc-sample.txt bochrc.txt |
---|
60 | |
---|
61 | 2) Create a disk image for the emulator. |
---|
62 | -cd ${prefix}/share/bochs |
---|
63 | -sudo bximage (prompts will guide you) |
---|
64 | -sudo chmod 777 <diskimg-name> |
---|
65 | |
---|
66 | 3) Remove the current 'ata0-master:' statement in ${prefix}/share/bochs/bochsrc.txt |
---|
67 | and replace it with the 'ata0-master:' string displayed at the end of the bximage |
---|
68 | process. |
---|
69 | |
---|
70 | 4) Format the disk image using FreeDOS (http://bochs.sourceforge.net/diskimages.html) |
---|
71 | according to the bochs documentation. (http://bochs.sourceforge.net/) |
---|
72 | |
---|
73 | 5) Now start bochs using the /Applications/MacPorts/bochs.app program; |
---|
74 | you may also use the bochs command line utility. \n" |
---|
75 | } |
---|
76 | |
---|