# $Id: Portfile 56076 2009-08-24 03:19:03Z ryandesign@macports.org $
PortSystem     1.0
name           pcal
version        4.9.1
categories     print
platforms      darwin
maintainers    gmail.com:sam.falkner
description    PostScript calendar program
long_description  "Pcal" is a program to print PostScript calendars for any \
                  month and year.  By default, it looks for a file in the \
                  home directory named "calendar" for entries with leading \
                  dates matching dates on the calendar, and prints any \
                  following text under the appropriate day.
homepage          http://pcal.sourceforge.net/
master_sites      sourceforge
extract.suffix    .tgz
checksums         md5 7646ae0b539466696484f311d79b2b02
configure         {
   reinplace "s|^BINDIR.*|BINDIR = ${destroot}${prefix}/bin|" \
             "${worksrcpath}/Makefile"
   reinplace "s|^MANDIR.*|MANDIR = ${destroot}${prefix}/share/man/man1|" \
             "${worksrcpath}/Makefile"
   reinplace "s|^CATDIR.*|CATDIR = ${destroot}${prefix}/share/cat/cat1|" \
             "${worksrcpath}/Makefile"
}
build.target
variant a4 {
   reinplace "s|PAPERSIZE_DEFAULT.PAPERSIZE_LETTER|PAPERSIZE_DEFAULT PAPERSIZE_A4" \
             "${worksrcpath}/src/pcalpapr.h"
}
destroot.destdir  prefix=${destroot}${prefix}
build.type        gnu
