aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/gtimer/Makefile
blob: 720295cdb6fbdfa89398b5fa32691074a5747d98 (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
# Created by: Chris Piazza <cpiazza@FreeBSD.org>
# $FreeBSD$

PORTNAME=   gtimer
PORTVERSION=    2.0.0
PORTREVISION=   2
CATEGORIES= deskutils
MASTER_SITES=   SF/${PORTNAME}/${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Timer for your personal activities

LICENSE=    GPLv2

RUN_DEPENDS=    xdg-open:${PORTSDIR}/devel/xdg-utils

USE_XORG=   xscrnsaver
USE_GNOME=  gtk20
USES=       gettext perl5
USE_GMAKE=  yes
GNU_CONFIGURE=  yes

MAN1=       ${PORTNAME}.1

CPPFLAGS+=  -I${LOCALBASE}/include -Wno-return-type
LDFLAGS+=   -L${LOCALBASE}/lib

post-patch:
    @${REINPLACE_CMD} -e 's|1.1.7|${PORTVERSION}|g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|"sensible-browser"|"xdg-open"|g' ${WRKSRC}/config.h
.for file in project.c task.c
    @${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g' ${WRKSRC}/${file}
.endfor

pre-build:
    @(cd ${WRKSRC} && ${PERL} ./txt2h.pl < ChangeLog > changelog.h)

post-build:
.for lang in cs cz es fr sv
    cd ${WRKSRC}/po && ${LOCALBASE}/bin/msgfmt -o ${lang}.mo ${lang}.po
.endfor

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1
.for lang in cs cz es fr sv
    @${MKDIR} ${PREFIX}/share/locale/${lang}/LC_MESSAGES
    ${INSTALL_DATA} ${WRKSRC}/po/${lang}.mo \
        ${PREFIX}/share/locale/${lang}/LC_MESSAGES/${PORTNAME}.mo
.endfor

.include <bsd.port.mk>