source: trunk/dports/emulators/libmame/Portfile

Last change on this file was 99135, checked in by ryandesign@…, 5 years ago

Set svn:keywords to Id

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 99135 2012-10-28 01:25:18Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6
7github.setup            bji libmame 0.146.6 v
8categories              emulators
9platforms               darwin
10license                 MAME
11maintainers             ischo.com:bryan
12
13# The library version number.
14set lib_version         1.0.0
15set lib_version_major   [lindex [split ${lib_version} .] 0]
16
17description             MAME emulator as a library
18
19long_description        libmame is the MAME emulator as a library
20
21checksums               rmd160  32731fcc116b08b7d8b2f56abf220a41c6c34458 \
22                        sha256  02dba073fc12a0f554e3a49442b4870dc18a4814d05264fbef748ad07a43c227
23
24universal_variant       no
25
26set bigendian {}
27set ptr64 {}
28switch ${build_arch} {
29    ppc {
30        set bigendian 1
31    }
32    ppc64 {
33        set bigendian 1
34        set ptr64 1
35    }
36    x86_64 {
37        set ptr64 1
38    }
39}
40
41set objdir obj/posix
42if {${ptr64} == 1} {
43    set objdir ${objdir}64
44}
45
46build.target            libmame
47build.args              -j ${build.jobs} \
48                        CC="${configure.cc} [get_canonical_archflags cc]" \
49                        LD="${configure.cxx} [get_canonical_archflags cxx]" \
50                        BUILD_LIBMAME=1 \
51                        NOWERROR=1 \
52                        BIGENDIAN=${bigendian} \
53                        PTR64=${ptr64}
54
55configure {
56    # Display the configuration.
57    system -W ${worksrcpath} "${build.cmd} checkautodetect [join ${build.args}]"
58}
59
60build {
61    # Build the dynamic library.
62    system -W ${worksrcpath} "${build.cmd} ${build.target} [join ${build.args}] LDFLAGS_EXTRA=\"-Wl,-current_version,${lib_version} -Wl,-install_name,${prefix}/lib/libmame.${lib_version_major}.dylib\""
63   
64    # Build the static library.
65    system -W ${worksrcpath} "${build.cmd} ${build.target} [join ${build.args}] STATIC=1"
66}
67
68destroot {
69    # Install headers.
70    file mkdir ${destroot}${prefix}/include/libmame
71    file copy ${worksrcpath}/src/libmame/libmame.h ${destroot}${prefix}/include/libmame
72   
73    # Install libraries.
74    file copy ${worksrcpath}/${objdir}/libmame.dylib ${destroot}${prefix}/lib/libmame.${lib_version_major}.dylib
75    ln -s libmame.${lib_version_major}.dylib ${destroot}${prefix}/lib/libmame.dylib
76    file copy ${worksrcpath}/${objdir}s/libmame.a ${destroot}${prefix}/lib
77   
78    # Install documentation.
79    file mkdir ${destroot}${prefix}/share/doc/libmame
80    file copy ${worksrcpath}/docs/license.txt ${destroot}${prefix}/share/doc/libmame
81}
Note: See TracBrowser for help on using the repository browser.