# -*- 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 # $Id$ PortSystem 1.0 name libmame version 0.146.6 categories emulators platforms darwin license MAME maintainers Bryan Ischo description MAME emulator as a library long_description libmame is the MAME emulator as a library homepage http://github.org/bji/libmame depends_build port:gmake # Fetch # Fetch by tag, where the git tags used in libmame are a function of the # libmame version. master_sites http://nodeload.github.com/bji/libmame/tarball distname v${version} # Checksum checksums rmd160 32731fcc116b08b7d8b2f56abf220a41c6c34458 \ sha1 fe0c7f403470e9f4b88b2cace2b0f0e18185c56e # Extract # github does not include a .tar.gz suffix for the file for some reason, # so the following causes port to understand this and to properly extract # the gzipped tar file anyway extract.suffix extract.mkdir yes # Patch # No patches to apply # Configure # libmame doesn't use GNU autoconf use_configure no # Build phase # This is custom because building both the dynamic and static libmame # libraries requires two commands, and port doesn't know how to do # that. Furthermore, a weird aspect of the extracted directory that # came from github is that there is a top-level directory called # bji-libmame-XXX, where XXX is some characters from the git change # identifier. Use -C bji-libmame-* so that this Portfile doesn't have # to know about the specific change number involved. # Finally, install_name_tool is used to set the dylib id to the correct path. build { 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 exec install_name_tool -id ${prefix}/lib/libmame.1.dylib [glob ${worksrcpath}/bji-libmame-*/obj/posix64/libmame.dylib] 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 } # Destroot # This is custom because libmame does not have a make install target. Manual # file copies are done. destroot { file mkdir ${destroot}${prefix}/include/libmame file copy [glob ${worksrcpath}/bji-libmame-*/src/libmame/libmame.h] ${destroot}${prefix}/include/libmame file copy [glob ${worksrcpath}/bji-libmame-*/obj/posix64/libmame.dylib] ${destroot}${prefix}/lib/libmame.1.dylib ln -s libmame.1.dylib ${destroot}${prefix}/lib/libmame.dylib file copy [glob ${worksrcpath}/bji-libmame-*/obj/posix64s/libmame.a] ${destroot}${prefix}/lib file mkdir ${destroot}${prefix}/share/doc/libmame file copy [glob ${worksrcpath}/bji-libmame-*/docs/license.txt] ${destroot}${prefix}/share/doc/libmame }