# -*- 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        stephenostermiller qqwing 1.3.4 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
license             GPL-2+
categories          devel games
maintainers         nomaintainer
homepage            http://qqwing.com/

description         QQwing is software for generating and solving Sudoku puzzles.

long_description    {*}${description}

checksums           rmd160  b9dfd95bf04e5945ae0343a634da94723d5ac3d4 \
                    sha256  c79661730dacb1d0bae358cdcfcc0541f75c9c18942ac9a6cea39abcf09ff3e7

depends_build       port:autoconf \
                    port:automake \
                    port:libtool
 
patchfiles          patch-Makefile.diff \
                    patch-build-touch.diff \
                    patch-build-cpp_configure.sh.diff \
                    patch-build-cpp_install.sh.diff

post-patch {
    reinplace "s|__MP__PREFIX__|${prefix}|" ${worksrcpath}/build/cpp_configure.sh
}

use_configure       no
variant universal {}
build.env           CC=${configure.cc} \
                    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
                    CPPFLAGS=${configure.cppflags} \
                    CXX=${configure.cxx} \
                    "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"

build.target        tgz
