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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name libmame |
---|
7 | version 0.146.6 |
---|
8 | categories emulators |
---|
9 | platforms darwin |
---|
10 | license MAME |
---|
11 | maintainers Bryan Ischo <bryan@ischo.com> |
---|
12 | description MAME emulator as a library |
---|
13 | long_description libmame is the MAME emulator as a library |
---|
14 | homepage http://github.org/bji/libmame |
---|
15 | |
---|
16 | depends_build port:gmake |
---|
17 | |
---|
18 | # Fetch |
---|
19 | # Fetch by tag, where the git tags used in libmame are a function of the |
---|
20 | # libmame version. |
---|
21 | master_sites http://nodeload.github.com/bji/libmame/tarball |
---|
22 | distname v${version} |
---|
23 | |
---|
24 | # Checksum |
---|
25 | checksums rmd160 32731fcc116b08b7d8b2f56abf220a41c6c34458 \ |
---|
26 | sha1 fe0c7f403470e9f4b88b2cace2b0f0e18185c56e |
---|
27 | |
---|
28 | # Extract |
---|
29 | # github does not include a .tar.gz suffix for the file for some reason, |
---|
30 | # so the following causes port to understand this and to properly extract |
---|
31 | # the gzipped tar file anyway |
---|
32 | extract.suffix |
---|
33 | extract.mkdir yes |
---|
34 | |
---|
35 | # Patch |
---|
36 | # No patches to apply |
---|
37 | |
---|
38 | # Configure |
---|
39 | # libmame doesn't use GNU autoconf |
---|
40 | use_configure no |
---|
41 | |
---|
42 | # Build phase |
---|
43 | # This is custom because building both the dynamic and static libmame |
---|
44 | # libraries requires two commands, and port doesn't know how to do |
---|
45 | # that. Furthermore, a weird aspect of the extracted directory that |
---|
46 | # came from github is that there is a top-level directory called |
---|
47 | # bji-libmame-XXX, where XXX is some characters from the git change |
---|
48 | # identifier. Use -C bji-libmame-* so that this Portfile doesn't have |
---|
49 | # to know about the specific change number involved. |
---|
50 | # Finally, install_name_tool is used to set the dylib id to the correct path. |
---|
51 | build { |
---|
52 | exec -ignorestderr gmake -j ${build.jobs} NOWERROR=1 LDFLAGS_EXTRA="-Wl,-current_version,1.0.0" BUILD_LIBMAME=1 -C [glob ${worksrcpath}/bji-libmame-*] libmame |
---|
53 | exec install_name_tool -id ${prefix}/lib/libmame.1.dylib [glob ${worksrcpath}/bji-libmame-*/obj/posix64/libmame.dylib] |
---|
54 | exec -ignorestderr gmake -j ${build.jobs} NOWERROR=1 LDFLAGS_EXTRA="-Wl,-current_version,1.0.0" BUILD_LIBMAME=1 STATIC=1 -C [glob ${worksrcpath}/bji-libmame-*] libmame |
---|
55 | } |
---|
56 | |
---|
57 | # Destroot |
---|
58 | # This is custom because libmame does not have a make install target. Manual |
---|
59 | # file copies are done. |
---|
60 | destroot { |
---|
61 | file mkdir ${destroot}${prefix}/include/libmame |
---|
62 | file copy [glob ${worksrcpath}/bji-libmame-*/src/libmame/libmame.h] ${destroot}${prefix}/include/libmame |
---|
63 | file copy [glob ${worksrcpath}/bji-libmame-*/obj/posix64/libmame.dylib] ${destroot}${prefix}/lib/libmame.1.dylib |
---|
64 | ln -s libmame.1.dylib ${destroot}${prefix}/lib/libmame.dylib |
---|
65 | file copy [glob ${worksrcpath}/bji-libmame-*/obj/posix64s/libmame.a] ${destroot}${prefix}/lib |
---|
66 | file mkdir ${destroot}${prefix}/share/doc/libmame |
---|
67 | file copy [glob ${worksrcpath}/bji-libmame-*/docs/license.txt] ${destroot}${prefix}/share/doc/libmame |
---|
68 | } |
---|