mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
83 lines
2.7 KiB
Tcl
83 lines
2.7 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup github 1.0
|
|
|
|
github.setup bji libmame 0.146.6 v
|
|
# Change github.tarball_from to 'releases' or 'archive' next update
|
|
github.tarball_from tarball
|
|
categories emulators
|
|
platforms darwin
|
|
license MAME
|
|
maintainers ischo.com:bryan
|
|
|
|
# The library version number.
|
|
set lib_version 1.0.0
|
|
set lib_version_major [lindex [split ${lib_version} .] 0]
|
|
|
|
description MAME emulator as a library
|
|
|
|
long_description libmame is the MAME emulator as a library
|
|
|
|
checksums rmd160 32731fcc116b08b7d8b2f56abf220a41c6c34458 \
|
|
sha256 02dba073fc12a0f554e3a49442b4870dc18a4814d05264fbef748ad07a43c227
|
|
|
|
universal_variant no
|
|
|
|
set bigendian {}
|
|
set ptr64 {}
|
|
switch ${build_arch} {
|
|
ppc {
|
|
set bigendian 1
|
|
}
|
|
ppc64 {
|
|
set bigendian 1
|
|
set ptr64 1
|
|
}
|
|
x86_64 {
|
|
set ptr64 1
|
|
}
|
|
}
|
|
|
|
set objdir obj/posix
|
|
if {${ptr64} == 1} {
|
|
set objdir ${objdir}64
|
|
}
|
|
|
|
build.target libmame
|
|
build.args -j ${build.jobs} \
|
|
CC="${configure.cc} [get_canonical_archflags cc]" \
|
|
LD="${configure.cxx} [get_canonical_archflags cxx]" \
|
|
BUILD_LIBMAME=1 \
|
|
NOWERROR=1 \
|
|
BIGENDIAN=${bigendian} \
|
|
PTR64=${ptr64}
|
|
|
|
configure {
|
|
# Display the configuration.
|
|
system -W ${worksrcpath} "${build.cmd} checkautodetect [join ${build.args}]"
|
|
}
|
|
|
|
build {
|
|
# Build the dynamic library.
|
|
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\""
|
|
|
|
# Build the static library.
|
|
system -W ${worksrcpath} "${build.cmd} ${build.target} [join ${build.args}] STATIC=1"
|
|
}
|
|
|
|
destroot {
|
|
# Install headers.
|
|
file mkdir ${destroot}${prefix}/include/libmame
|
|
file copy ${worksrcpath}/src/libmame/libmame.h ${destroot}${prefix}/include/libmame
|
|
|
|
# Install libraries.
|
|
file copy ${worksrcpath}/${objdir}/libmame.dylib ${destroot}${prefix}/lib/libmame.${lib_version_major}.dylib
|
|
ln -s libmame.${lib_version_major}.dylib ${destroot}${prefix}/lib/libmame.dylib
|
|
file copy ${worksrcpath}/${objdir}s/libmame.a ${destroot}${prefix}/lib
|
|
|
|
# Install documentation.
|
|
file mkdir ${destroot}${prefix}/share/doc/libmame
|
|
file copy ${worksrcpath}/docs/license.txt ${destroot}${prefix}/share/doc/libmame
|
|
}
|