aboutsummaryrefslogtreecommitdiffstats
path: root/mail/wmmaiload/Makefile
blob: 0df5afc50f78141fa4968ca51223f24df0e4c866 (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
# New ports collection makefile for:    wmmaiload
# Date created:             Sat Sep 21 01:48:10 EDT 2002
# Whom:                 pat
#
# $FreeBSD$
#

PORTNAME=   wmmaiload
PORTVERSION=    2.2.1
CATEGORIES= mail windowmaker
MASTER_SITES=   http://tnemeth.free.fr/projets/programmes/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Incoming mail monitor dockapp with a similar look to wmcpuload

USE_X_PREFIX=   yes
USE_XPM=    yes
USE_OPENSSL=    yes
USE_GMAKE=  yes
HAS_CONFIGURE=  yes
CONFIGURE_ARGS= --prefix=${PREFIX}
MAKE_ARGS=  CC="${CC}" \
        CFLAGS="${CFLAGS} -D_GNU_SOURCE ${PTHREAD_CFLAGS}" \
        CPPFLAGS="-I${X11BASE}/include" \
        LDFLAGS="-L${X11BASE}/lib" \
        LIB_SSL="-lssl -lcrypto" \
        LIB_THREADS="${PTHREAD_LIBS}" \
        DEBUG_CFLAGS="-I${OPENSSLINC}" \
        DEBUG_LDFLAGS="-L${OPENSSLLIB}"

MAN1=       ${PORTNAME}.1 ${PORTNAME}-config.1
PLIST_FILES=    bin/wmmaiload bin/wmmaiload-config

.if defined(WITH_GTK2)
USE_GNOME+= gtk20
MAKE_ARGS+= GTK_CFLAGS="pkg-config --cflags gtk+-2.0" \
        GTK_LIBS="pkg-config --libs gtk+-2.0"
.else
USE_GNOME+= gtk12
MAKE_ARGS+= GTK_CFLAGS="pkg-config --cflags gtk+" \
        GTK_LIBS="pkg-config --libs gtk+"
.endif

post-patch:
.for i in wmmaiload/Init.make
    @${REINPLACE_CMD} -e 's|-L/usr/X11R6/lib||g' ${WRKSRC}/${i}
.endfor
.for i in wmmaiload/checkthread.c
    @${REINPLACE_CMD} -e 's|isnumber(|isnum(|g' ${WRKSRC}/${i}
.endfor
.for i in wmmaiload/main.h
    @${REINPLACE_CMD} -e '/time\.h>/d' ${WRKSRC}/${i}
.endfor
.for i in wmmaiload-config/Init.make
    @${REINPLACE_CMD} -e 's|gtk-config --cflags|$${GTK_CFLAGS}|g ; \
         s|gtk-config --libs|$${GTK_LIBS}|g' ${WRKSRC}/${i}
.endfor
.for i in wmmaiload-config/dialogs.c wmmaiload-config/mainwindow.c \
    wmmaiload-config/popedit.c
    @${REINPLACE_CMD} -e 's|_widget_draw_default|_widget_queue_draw|g ; \
         s|remove;|rm;|g ; \
         s|remove,|rm,|g ; \
         s|remove =|rm =|g ; \
         s|PACKAGE"-config"|PACKAGE|g' ${WRKSRC}/${i}
.endfor

do-install:
.for i in wmmaiload wmmaiload-config
    ${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/doc/${i}.1 ${MANPREFIX}/man/man1
.endfor

.include <bsd.port.mk>