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

name                    enigma
subport                 enigma-devel {}

if {${subport} eq "enigma"} {
    github.setup            Enigma-Game Enigma 1.30
    github.tarball_from     releases
    conflicts               enigma-devel
    revision                1
    distname                ${github.project}-${version}-src
    worksrcdir              ${name}-${version}
    checksums               rmd160  e6ff23ca7859d468175abd821f89a6434f65c396 \
                            sha256  ae64b91fbc2b10970071d0d78ed5b4ede9ee3868de2e6e9569546fc58437f8af \
                            size    43653520
} elseif {${subport} eq "enigma-devel"} {
    conflicts               enigma

    github.setup            Enigma-Game Enigma 936c6681aec1baf34c3094e318cda4957112fe6e
    github.tarball_from     archive
    version                 20250908
    revision                0
    checksums               rmd160  0aba69bf6c9b03af1175c016a9c0b4281b40f004 \
                            sha256  d6b00b1aa95f906a3ba4c1de3c4f537cf0d98be5593e553b587d83f7a1548596 \
                            size    79219493

    use_autoconf            yes
    autoconf.cmd            ./autogen.sh
    depends_build-append    port:autoconf port:automake

    # Workaround for new autoconf downgrading the build to -std=gnu++11.
    # https://github.com/Enigma-Game/Enigma/issues/114
    configure.cxxflags-append \
                            -std=c++14
}

categories              games
maintainers             nomaintainer
license                 GPL-2+
homepage                https://www.nongnu.org/enigma/

description             puzzle game inspired by the games Oxyd and Rock'n'Roll

long_description        Enigma is a puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll \
                        on the Amiga. The object of the game is to find and uncover pairs of \
                        identically colored Oxyd stones. Simple? Yes. Easy? Certainly not! Hidden \
                        traps, vast mazes, laser beams, and, most of all, countless hairy puzzles \
                        usually block your direct way to the Oxyd stones.

depends_build-append    path:bin/pkg-config:pkgconfig \
                        port:ImageMagick \
                        port:texi2html

depends_lib             port:libsdl2 \
                        port:libsdl2_image \
                        port:libsdl2_mixer \
                        port:libsdl2_ttf \
                        port:gettext \
                        port:libenet \
                        port:libpng \
                        port:xercesc3 \
                        port:curl \
                        port:zlib \
                        port:libiconv

compiler.cxx_standard   2014

configure.args          --with-system-enet
