Ticket #13194: Portfile

File Portfile, 2.4 KB (added by adamore@…, 17 years ago)
Line 
1# $Id: Portfile 30226 2007-10-22 22:51:53Z jmpp@macports.org $
2
3PortSystem 1.0
4name            bochs
5version         2.3.5
6categories      emulators
7maintainers     nomaintainer
8description     cross platform ia-32 emulator
9long_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
13platforms       darwin
14homepage        http://bochs.sourceforge.net/
15master_sites     sourceforge
16checksums       md5 2d9b2c1e17b4eba2d46b208be09df4a9
17
18patchfiles      patch-.bochsrc
19
20depends_run     port:wget
21
22configure.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
31variant smp {
32# Enable symmetric multi-processor support
33        configure.args-append --enable-smp --enable-cpu-level=6
34}
35
36pre-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
42post-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
52post-activate {
53        ui_msg "\n
54
55        **** To prepare bochs for use ****
56
571) Rename file bochsrc-sample.txt to bochrc.txt for use.
58   -cd ${prefix}/share/bochs
59   -sudo cp bochsrc-sample.txt bochrc.txt
60
612) 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
663) 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
704) Format the disk image using FreeDOS (http://bochs.sourceforge.net/diskimages.html)
71   according to the bochs documentation. (http://bochs.sourceforge.net/)
72
735) Now start bochs using the /Applications/MacPorts/bochs.app program;
74   you may also use the bochs command line utility. \n"
75}
76