# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 52162 2009-06-11 14:42:19Z nox@macports.org $

PortSystem      1.0
PortGroup       xcode 1.0

name            libsdl_gfx-framework
set my_name     SDL_gfx
version         2.0.19
categories      devel graphics
platforms       macosx
maintainers     nox openmaintainer
description     graphics primitives SDL extension

long_description \
    The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing \
    routines such as lines, circles or polygons and SDL_rotozoom which implemented a interpolating \
    rotozoomer for SDL surfaces. The current components of the SDL_gfx library are: Graphic \
    Primitives, Rotozoomer, Framerate control, MMX image filters. It is backwards compatible to \
    the above mentioned code. It is written in plain C and can be used in C++ code.

homepage        http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/
master_sites    ${homepage}
distname        ${my_name}-${version}
dist_subdir     libsdl_gfx

depends_lib     port:libsdl-framework

checksums       md5     cf01ad6539ceea65887fc9ebdfe04b83 \
                sha1    bba39cf83e84d8e61b8078ea095cc0a96023e27f \
                rmd160  354c939e4901644b80c82e7a9e5c04b93a70306b

post-extract {
    system "unzip \"$worksrcpath/Other Builds/OSX-PB-XCode.zip\" -d $worksrcpath"
    system "tar xzf \"$worksrcpath/Other Builds/OSX-PB.tgz\" -C $worksrcpath"
    move $worksrcpath/PB/English.lproj $worksrcpath
}

post-patch {
    reinplace -E "/SKIP_INSTALL/d" ${worksrcpath}/SDL_gfx.pbproj/project.pbxproj
}

xcode.target        $my_name

xcode.build.settings    HEADER_SEARCH_PATHS=$prefix/Library/Frameworks/SDL.framework/Versions/A/Headers \
                        FRAMEWORK_SEARCH_PATHS=$prefix/Library/Frameworks \
                        INSTALL_PATH=$prefix/Library/Frameworks

xcode.destroot.type             framework
eval xcode.destroot.settings    ${xcode.build.settings}

universal_variant   no

livecheck.check regex
livecheck.url   http://www.ferzkopp.net/joomla/content/view/19/14/
livecheck.regex ${my_name}-(\\d+\\.\\d+(?:\\.\\d+)+)
