# -*- 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           makefile 1.0

name                netsurf-buildsystem
version             1.10
revision            0
categories          devel
license             MIT
maintainers         nomaintainer
description         Makefiles shared by NetSurf projects
long_description    {*}${description}
homepage            https://www.netsurf-browser.org
master_sites        https://download.netsurf-browser.org/libs/releases/
distname            buildsystem-${version}
checksums           rmd160  bb7d513c6e14bcf5dbaa4b722f2094acf7433a55 \
                    sha256  3d3e39d569e44677c4b179129bde614c65798e2b3e6253160239d1fd6eae4d79 \
                    size    39221

if {${os.platform} eq "darwin" && ${configure.build_arch} eq "ppc64"} {
    # Drop this on next update:
    incr revision

    patchfiles-append \
                    patch-ppc64.diff
}

post-patch {
    reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/makefiles/Makefile.tools
}
