# -*- 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
description Rogue is a popular dungeon exploring adventure game
long_description Rogue is a popular dungeon exploring adventure game. It is \
one of the earliest (early 1980s) dungeon crawl games, and \
is an ancestor of games like Diablo. Version 5.4 is the \
last iteration of the original Rogue by Toy, Arnold, and \
Wichman developed for UNIX.
homepage https://web.archive.org/web/20160706144207/http://rogue.rogueforge.net/rogue-5-4/
master_sites https://web.archive.org/web/20151019212622/http://rogue.rogueforge.net/files/rogue5.4/
checksums md5 033288f46444b06814c81ea69d96e075 \
sha1 aef9e589c4f31eb6d3eeb9d543ab8787b00fb022
distname ${name}${version}-src
worksrcdir ${name}${version}
depends_lib-append port:ncurses
patchfiles patch-mdport.c.diff
configure.args-append --with-ncurses
configure.cflags-append -I${prefix}/include/ncurses
configure.cppflags-append -I${prefix}/include/ncurses
build.env-append LDFLAGS=-L${prefix}/lib
variant singleuser description {Disables system-wide scoreboards and allows local user installation without root privileges} {}
if {![variant_isset singleuser]} {
reinplace "s|rogue.scr|${prefix}/var/games/rogue/rogue.scr|" ${worksrcpath}/config.h
reinplace "s|rogue.lck|${prefix}/var/games/rogue/rogue.lck|" ${worksrcpath}/config.h
file delete ${workpath}/.CC_PRINT_OPTIONS
destroot.keepdirs ${destroot}${prefix}/var/games/rogue
if {![variant_isset singleuser]} {
xinstall -m 2755 -g games ${worksrcpath}/rogue ${destroot}${prefix}/bin/
xinstall -m 775 -g games -d ${destroot}${prefix}/var/games/rogue
xinstall -m 755 ${worksrcpath}/rogue ${destroot}${prefix}/bin/