aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/conky/Makefile
blob: 749961a7c315b30de5ec3d880949be294304b1d9 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# New ports collection makefile for:    conky
# Date created:             2005-08-27
# Whom:                 Roman Bogorodskiy <novel@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   conky
PORTVERSION=    1.8.1
PORTREVISION=   2
CATEGORIES= sysutils
MASTER_SITES=   SF

MAINTAINER= ntarmos@cs.uoi.gr
COMMENT=    An advanced, highly configurable system monitor for X

CONFLICTS?= conky-awesome-[0-9]*
SLAVEDIRS=  sysutils/conky-awesome

USE_ICONV=  yes
USE_BZIP2=  yes
GNU_CONFIGURE=  yes
USE_XORG?=  x11 xext xdamage
USE_GNOME?= pkgconfig
USE_ICONV=  yes
USE_GMAKE=  yes
CONFIGURE_ARGS+=    --disable-portmon \
            --disable-hddtemp \
            --disable-alsa
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
        LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"

MAN1=       conky.1
PLIST_FILES=    bin/conky
PORTEXAMPLES=   conkyrc.sample
PORTDOCS=   README AUTHORS ChangeLog TODO NEWS \
        docs.html variables.html config_settings.html

OPTIONS+=   APCUPSD "Enable APCUPSD support" Off \
        AUDACIOUS "Enable Audacious support" Off \
        BMPX "Enable BMPX support" Off \
        MPD "Enable MPD support" Off \
        NCURSES "Enable ncurses support" Off \
        RSS "Enable RSS support" Off \
        METAR "Enable METAR Weather support" Off \
        XOAP "Enable XOAP Weather support" Off \
        XMMS2 "Enable XMMS2 support" Off

.if !empty(USE_XORG)
OPTIONS+=   DOUBLE_BUFFER "Enable double buffering" On \
        IMLIB2 "Enable Imlib2 support" Off \
        LUA "Enable Lua support" Off \
        LUA_CAIRO "Enable Lua-Cairo binding (impl. Lua)" Off \
        LUA_IMLIB2 "Enable Lua-Imlib2 binding (impl. Lua/Imlib2)" Off \
        XFT "Enable Xft support" Off
.else
OPTIONS+=   LUA "Enable Lua support" Off
.endif

.include <bsd.port.pre.mk>

.if empty(USE_XORG)
WITHOUT_DOUBLE_BUFFER=  On
CONFIGURE_ARGS+=    --disable-x11 --disable-own-window
.undef WITH_IMLIB2
.undef WITH_LUA_CAIRO
.undef WITH_LUA_IMLIB2
.undef WITH_XFT
.endif

.if defined(WITH_APCUPSD)
RUN_DEPENDS+=       ${LOCALBASE}/sbin/apcupsd:${PORTSDIR}/sysutils/apcupsd
CONFIGURE_ARGS+=    --enable-apcupsd
.else
CONFIGURE_ARGS+=    --disable-apcupsd
.endif

.if defined(WITH_AUDACIOUS)
LIB_DEPENDS+=       audclient.2:${PORTSDIR}/multimedia/audacious
CONFIGURE_ARGS+=    --enable-audacious
.else
CONFIGURE_ARGS+=    --disable-audacious
.endif

.if defined(WITH_BMPX)
BUILD_DEPENDS+=     beep-media-player-2:${PORTSDIR}/multimedia/bmpx
RUN_DEPENDS+=       beep-media-player-2:${PORTSDIR}/multimedia/bmpx
LIB_DEPENDS+=       dbus-1.3:${PORTSDIR}/devel/dbus
CONFIGURE_ARGS+=    --enable-bmpx
.else
CONFIGURE_ARGS+=    --disable-bmpx
.endif

.if defined(WITH_LUA) || defined(WITH_LUA_CAIRO) || defined(WITH_LUA_IMLIB2)
USE_LUA=        5.1+
CONFIGURE_ARGS+=    --enable-lua
.else
CONFIGURE_ARGS+=    --disable-lua
.endif

.if defined(WITH_LUA_CAIRO)
LIB_DEPENDS+=       cairo.2:${PORTSDIR}/graphics/cairo
BUILD_DEPENDS+=     tolua++-5.1:${PORTSDIR}/lang/tolua++
RUN_DEPENDS+=       tolua++-5.1:${PORTSDIR}/lang/tolua++
CONFIGURE_ARGS+=    --enable-lua-cairo
.endif

.if defined(WITH_IMLIB2) || defined(WITH_LUA_IMLIB2)
LIB_DEPENDS+=       Imlib2.5:${PORTSDIR}/graphics/imlib2
CONFIGURE_ARGS+=    --enable-imlib2
.else
CONFIGURE_ARGS+=    --disable-imlib2
.endif

.if defined(WITH_LUA_IMLIB2)
BUILD_DEPENDS+=     tolua++-5.1:${PORTSDIR}/lang/tolua++
RUN_DEPENDS+=       tolua++-5.1:${PORTSDIR}/lang/tolua++
CONFIGURE_ARGS+=    --enable-lua-imlib2
.endif

.if defined(WITH_NCURSES)
CONFIGURE_ARGS+=    --enable-ncurses
.else
CONFIGURE_ARGS+=    --disable-ncurses
.endif

.if defined(WITH_XFT)
LIB_DEPENDS+=       Xft.2:${PORTSDIR}/x11-fonts/libXft
CONFIGURE_ARGS+=    --enable-xft
.else
CONFIGURE_ARGS+=    --disable-xft
.endif

.if defined(WITHOUT_MPD)
CONFIGURE_ARGS+=    --disable-mpd
.endif

.if defined(WITH_RSS)
LIB_DEPENDS+=       curl.6:${PORTSDIR}/ftp/curl \
            xml2.5:${PORTSDIR}/textproc/libxml2
CONFIGURE_ARGS+=    --enable-rss
USE_GNOME+=     glib20
.endif

.if defined(WITH_METAR)
LIB_DEPENDS+=       curl.6:${PORTSDIR}/ftp/curl
CONFIGURE_ARGS+=    --enable-weather-metar
.endif

.if defined(WITH_XOAP)
LIB_DEPENDS+=       curl.6:${PORTSDIR}/ftp/curl \
            xml2.5:${PORTSDIR}/textproc/libxml2
CONFIGURE_ARGS+=    --enable-weather-xoap
.endif

.if defined(WITH_XMMS2)
LIB_DEPENDS+=       xmmsclient.6:${PORTSDIR}/audio/xmms2
CONFIGURE_ARGS+=    --enable-xmms2
.else
CONFIGURE_ARGS+=    --disable-xmms2
.endif

.if defined(WITHOUT_DOUBLE_BUFFER)
CONFIGURE_ARGS+=    --disable-double-buffer
.endif

post-patch:
    @${REINPLACE_CMD} -e 's,lua5\.1,lua-5.1,g' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's,imlib_context_disconnect_display();,,g' \
        ${WRKSRC}/src/imlib2.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/conky ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/doc/conky.1 ${PREFIX}/man/man1

post-install:
.if !defined(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
.   if !empty(USE_XORG)
    @${INSTALL_DATA} ${WRKSRC}/data/conky.conf ${EXAMPLESDIR}/conkyrc.sample
.   else
    @${INSTALL_DATA} ${WRKSRC}/data/conky_no_x11.conf ${EXAMPLESDIR}/conkyrc.sample
.   endif
.endif

.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for i in README AUTHORS ChangeLog TODO NEWS
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.for i in docs.html variables.html config_settings.html
    ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>