aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/remind/Makefile
blob: 3d76c270af077675c43b56ccb0c1c79a62900384 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# New ports collection makefile for:    remind
# Date created:             10 April 2004
# Whom:                 Lewis Thompson <purple@lewiz.net>
#
# $FreeBSD$
#

PORTNAME=   remind
PORTVERSION=    3.1.10
CATEGORIES= deskutils
MASTER_SITES=   http://www.roaringpenguin.com/files/download/ \
        http://freebsd.unixfreunde.de/sources/
DISTNAME=   ${PORTNAME}-03.01.10

MAINTAINER= jadawin@FreeBSD.org
COMMENT=    Sophisticated calendar and alarm program

LICENSE=    GPLv2

OPTIONS=    TCLTK "Tcl/Tk support" off

GNU_CONFIGURE=  yes
MAKE_ARGS=  INSTALL_SCRIPT="${INSTALL_SCRIPT}"

MAN1=       rem.1 rem2ps.1 remind.1

PLIST_FILES=    bin/rem bin/rem2ps bin/remind

.include <bsd.port.options.mk>

.if defined(WITH_TCLTK)
USE_TK=     yes
RUN_DEPENDS+=   dtplite:${PORTSDIR}/devel/tcllib
MAN1+=      cm2rem.1 tkremind.1
PLIST_FILES+=   bin/cm2rem.tcl bin/tkremind
.endif

.include <bsd.port.pre.mk>

post-patch:
# This seems more than a little ugly.
.if defined(LAT_DEG)
    @${REINPLACE_CMD} -e 's#LAT_DEG 45#LAT_DEG ${LAT_DEG}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LAT_MIN)
    @${REINPLACE_CMD} -e 's#LAT_MIN 24#LAT_MIN ${LAT_MIN}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LAT_SEC)
    @${REINPLACE_CMD} -e 's#LAT_SEC  0#LAT_SEC ${LAT_SEC}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LON_DEG)
    @${REINPLACE_CMD} -e 's#LON_DEG 75#LON_DEG ${LON_DEG}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LON_MIN)
    @${REINPLACE_CMD} -e 's#LON_MIN 39#LON_MIN ${LON_MIN}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LON_SEC)
    @${REINPLACE_CMD} -e 's#LON_SEC  0#LON_SEC ${LON_SEC}#' ${WRKSRC}/src/custom.h
.endif
.if defined(LOCATION)
    @${REINPLACE_CMD} -e 's#Ottawa#${LOCATION}#' ${WRKSRC}/src/custom.h
.endif
.if defined(A4)
    @${REINPLACE_CMD} -e 's#"Letter", 612, 792#"A4", 595, 842#' ${WRKSRC}/src/custom.h
.endif
.if defined(WITH_TCLTK)
    @${REINPLACE_CMD} -e 's,wish,${WISH},' ${WRKSRC}/scripts/tkremind
    @${REINPLACE_CMD} -e 's,tclsh,${TCLSH},' ${WRKSRC}/scripts/cm2rem.tcl
.endif

do-install:
.for i in rem2ps remind
    ${INSTALL_PROGRAM} ${WRKSRC}/src/${i} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${PREFIX}/man/man1
.endfor
    ${INSTALL_MAN} ${WRKSRC}/man/rem.1 ${PREFIX}/man/man1
    ${LN} -sf ${PREFIX}/bin/remind ${PREFIX}/bin/rem
.if defined(WITH_TCLTK)
    ${INSTALL_SCRIPT} ${WRKSRC}/scripts/cm2rem.tcl ${PREFIX}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/scripts/tkremind ${PREFIX}/bin
.for i in cm2rem tkremind
    ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${PREFIX}/man/man1
.endfor
.endif

.include <bsd.port.post.mk>