# -*- 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
PortGroup        xcode 1.0

github.setup     nevyn cfxr 0.3.3
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
platforms        darwin
categories       audio aqua
license          MIT
maintainers      orthogonalspace.ca:reid
description      A generator for simple sound effects.
long_description A port of DrPetter's sfxr with a native Mac UI. \
                 In DrPetter's words: Its original purpose was to provide a \
                 simple means of getting basic sound effects into a game for \
                 those people who were working hard to get their entries \
                 done within the 48 hours and didn't have time to spend \
                 looking for suitable ways of doing this.

homepage         http://thirdcog.eu/apps/cfxr

checksums           rmd160  1ecbd92c9e803dbe095985bf0b8c1d0efbec9413 \
                    sha256  3d44403e1a4128f7645916bd4c749b01c43664b2d47af5b8b97292d7aa212b04 \
                    size    176181

patchfiles       patch-cxr-signing.diff

post-patch {
        reinplace "s|/Library/Frameworks/SDL.framework|${frameworks_dir}/SDL.framework|g" \
            ${worksrcpath}/${name}.xcodeproj/project.pbxproj
}

# on MacPorts, xcode projects build twice, once at build, once at destroot
# this project tries to set a symlink and that fails if it is already there
# so disable the (redundant) build phase
build {}

xcode.configuration     Release
xcode.build.settings    FRAMEWORK_SEARCH_PATHS=${frameworks_dir}
xcode.destroot.settings FRAMEWORK_SEARCH_PATHS=${frameworks_dir}

depends_lib      port:libsdl-framework port:libsdl