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

github.setup        coolbikerdad Algol-68RS-Source ef25e71aa7d45f602ad464dd28059be3834db173
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                algol-68rs
version             2021.05.18
revision            0
categories          lang algol
license             GPL-2+
maintainers         nomaintainer
description         The RSRE Algol-68RS Compiler: an update of the original port by Sian Mountbatten \
                    of a68toc (ctrans) from Algol-68RS/ELLA2000.
long_description    {*}${description}
checksums           rmd160  bc9bd1057ffb8d44697573948e95d1c435f753d9 \
                    sha256  2b800644c5098236464548a9e8fecd19f2e2dde4c40fbbb2ef594927e07603aa \
                    size    8113588

patch.pre_args-replace  -p0 -p1
patchfiles-append   Fixes-for-PPC-and-Macports.patch

post-patch {
    reinplace "s,@CC@,${configure.cc},g" ${worksrcpath}/Makefile
    reinplace "s,@CC@,${configure.cc},g" ${worksrcpath}/scripts/ca
    reinplace "s,@PREFIX@,${prefix},g" ${worksrcpath}/Makefile
    reinplace "s,@PREFIX@,${prefix},g" ${worksrcpath}/scripts/ca
    reinplace "s,@ARCHFLAGS@,[get_canonical_archflags cc],g" ${worksrcpath}/Makefile
}
