Ticket #23045: Portfile

File Portfile, 1.8 KB (added by tsupplis@…, 14 years ago)

Port File for gxemul

Line 
1# $Id$
2
3PortSystem 1.0
4
5name            gxemul
6version         0.4.7.2
7revision        0
8categories      emulators
9platforms       darwin
10maintainers     me.com:tsupplis
11description     A simulator for ARM, MIPS, Motorola 88K, PowerPC, and SuperH.
12long_description        \
13GXemul is a framework for full-system computer architecture emulation. \
14Several real machines have been implemented within the framework, \
15consisting of processors (ARM, MIPS, Motorola 88K, PowerPC, and SuperH) \
16and surrounding hardware components such as framebuffers, interrupt \
17controllers, busses, disk controllers, and serial controllers.
18
19homepage        http://gxemul.sourceforge.net
20master_sites    http://gxemul.sourceforge.net/src/
21
22checksums       md5       a2ec4f58a831dd883c196c4fd362b702              \
23                    sha1      63a20b810ef4ea9d7ec4678f135470fb324f61f1      \
24                    rmd160    a54fb4f1ecf567ff9f62e8b1541018b38dea1e1a 
25
26distname        ${name}-${version}
27worksrcdir      ${name}-${version}
28
29# We cannot use configure as the configure provided is a custom script
30use_configure   no
31
32
33# force usage of port libraries
34pre-build               {
35                system "cd ${worksrcpath} && ./configure"
36        set x11_cflags [exec ${prefix}/bin/pkg-config --cflags-only-I x11]
37        set x11_ldflags [exec ${prefix}/bin/pkg-config --libs x11]
38        set makefiles [exec find ${worksrcpath} -name Makefile]
39        foreach makefile $makefiles {
40            reinplace "s|XLIB=.*$|XLIB=${x11_ldflags}|g" ${makefile}
41            reinplace "s|XINCLUDE=.*$|XINCLUDE=${x11_cflags}|g" ${makefile}
42        }
43}
44
45depends_build   port:pkgconfig
46depends_lib         port:xorg-libX11
47
48build   {
49                system "cd ${worksrcpath} && make all"
50}
51
52# no default install in the makefile
53destroot {
54                xinstall -c -m 755 ${worksrcpath}/gxemul ${destroot}${prefix}/bin
55                xinstall -c -m 644 ${worksrcpath}/man/gxemul.1 ${destroot}${prefix}/share/man/man1
56}
57