View | Details | Raw Unified | Return to bug 204220 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-392 / +177 lines)
Lines 25-37 Link Here
25
OPTIONS_DEFINE=		CGI DEBUG GCRYPT LOGSTASH VIRT
25
OPTIONS_DEFINE=		CGI DEBUG GCRYPT LOGSTASH VIRT
26
OPTIONS_GROUP=		INPUT OUTPUT
26
OPTIONS_GROUP=		INPUT OUTPUT
27
OPTIONS_GROUP_OUTPUT=	KAFKA NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL
27
OPTIONS_GROUP_OUTPUT=	KAFKA NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL
28
OPTIONS_GROUP_INPUT=	CURL DBI IPMI JSON MEMCACHEC MODBUS MONGODB MYSQL \
28
OPTIONS_GROUP_INPUT=	CURL CURL_JSON CURL_XML DBI IPMI JSON MEMCACHEC \
29
			NUTUPS OLSRD ONEWIRE OPENLDAP PERL PGSQL PINBA PING \
29
			MODBUS MONGODB MYSQL NUTUPS OLSRD ONEWIRE OPENLDAP \
30
			PYTHON RABBITMQ REDIS ROUTEROS SIGROK SNMP STATGRAB \
30
			PERL PGSQL PINBA PING PYTHON RABBITMQ REDIS ROUTEROS \
31
			STATSD TOKYOTYRANT VARNISH XML XMMS ZOOKEEPER
31
			SIGROK SNMP STATGRAB STATSD TOKYOTYRANT VARNISH XML \
32
			XMMS ZOOKEEPER
32
33
33
CGI_DESC=		Install collection.cgi (requires rrdtool)
34
CGI_DESC=		Install collection.cgi (requires rrdtool)
34
CURL_DESC=		Enable curl-based plugins (apache, nginx, etc)
35
CURL_DESC=		Enable curl-based plugins (apache, nginx, etc)
36
CURL_JSON_DESC=		Enable curl_json plugin (implies curl and json)
37
CURL_XML_DESC=		Enable ascent, bind, curl_xml plugins (implies curl and xml)
35
DBI_DESC=		Enable dbi plugin
38
DBI_DESC=		Enable dbi plugin
36
DEBUG_DESC=		Enable debugging
39
DEBUG_DESC=		Enable debugging
37
GCRYPT_DESC=		Build with libgcrypt
40
GCRYPT_DESC=		Build with libgcrypt
Lines 70-75 Link Here
70
XMMS_DESC=		Enable xmms plugin
73
XMMS_DESC=		Enable xmms plugin
71
ZOOKEEPER_DESC=		Enable zookeeper plugin
74
ZOOKEEPER_DESC=		Enable zookeeper plugin
72
75
76
OPTIONS_SUB=	yes
77
73
USE_RC_SUBR=	collectd collectdmon
78
USE_RC_SUBR=	collectd collectdmon
74
79
75
USE_LDCONFIG=	yes
80
USE_LDCONFIG=	yes
Lines 79-86 Link Here
79
CPPFLAGS+=	-I${LOCALBASE}/include
84
CPPFLAGS+=	-I${LOCALBASE}/include
80
LIBS+=		-L${LOCALBASE}/lib
85
LIBS+=		-L${LOCALBASE}/lib
81
86
82
.include <bsd.port.options.mk>
83
84
# NOTE: Plugins without dependencies are defined further down.
87
# NOTE: Plugins without dependencies are defined further down.
85
CONFIGURE_ARGS=	--localstatedir=/var \
88
CONFIGURE_ARGS=	--localstatedir=/var \
86
		--disable-all-plugins \
89
		--disable-all-plugins \
Lines 101-115 Link Here
101
		--without-libowcapi \
104
		--without-libowcapi \
102
		--without-libperfstat \
105
		--without-libperfstat \
103
		--without-libsensors \
106
		--without-libsensors \
104
		--without-libvarnish \
105
		--without-lvm \
107
		--without-lvm \
106
		--without-mic \
108
		--without-mic \
107
		--without-oracle \
109
		--without-oracle \
108
		--disable-turbostat
110
		--disable-turbostat
109
111
112
CGI_RUN_DEPENDS=		p5-URI>=0:${PORTSDIR}/net/p5-URI \
113
				p5-CGI>=0:${PORTSDIR}/www/p5-CGI \
114
				p5-Data-Dumper>=0:${PORTSDIR}/devel/p5-Data-Dumper \
115
				p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser
116
CGI_IMPLIES=			RRDTOOL
117
118
CURL_LIB_DEPENDS=		libcurl.so:${PORTSDIR}/ftp/curl
119
CURL_CONFIGURE_ENABLE=		apache curl nginx write_http
120
CURL_CONFIGURE_WITH=		libcurl=${LOCALBASE}
121
122
CURL_JSON_IMPLIES=		CURL JSON
123
CURL_JSON_CONFIGURE_ENABLE=	curl_json
124
125
CURL_XML_IMPLIES=		CURL XML
126
CURL_XML_CONFIGURE_ENABLE=	ascent bind curl_xml
127
128
DEBUG_CONFIGURE_ENABLE=		debug
129
130
DBI_LIB_DEPENDS=		libdbi.so:${PORTSDIR}/databases/libdbi
131
DBI_CONFIGURE_WITH=		libdbi=${LOCALBASE}
132
DBI_CONFIGURE_ENABLE=		dbi
133
DBI_CFLAGS=			-Wno-deprecated-declarations
134
135
GCRYPT_LIB_DEPENDS=		libgcrypt.so:${PORTSDIR}/security/libgcrypt
136
GCRYPT_CONFIGURE_WITH=		-with-libgcrypt=${LOCALBASE}
137
GCRYPT_LIBS=			-lgcrypt
138
139
IPMI_LIB_DEPENDS=		libOpenIPMI.so:${PORTSDIR}/sysutils/openipmi
140
IPMI_CONFIGURE_ENABLE=		ipmi
141
142
JSON_LIB_DEPENDS=		libyajl.so:${PORTSDIR}/devel/yajl
143
JSON_CONFIGURE_WITH=		libyajl=${LOCALBASE}
144
145
KAFKA_LIB_DEPENDS=		librdkafka.so:${PORTSDIR}/net/librdkafka
146
KAFKA_CONFIGURE_ENABLE=		write_kafka
147
148
LOGSTASH_CONFIGURE_ENABLE=	log_logstash
149
LOGSTASH_IMPLIES=		JSON
150
151
MEMCACHEC_LIB_DEPENDS=		libmemcached.so:${PORTSDIR}/databases/libmemcached
152
MEMCACHEC_CONFIGURE_ENABLE=	memcachec
153
MEMCACHEC_CONFIGURE_WITH=	libmemcached=${LOCALBASE}
154
155
MODBUS_LIB_DEPENDS=		libmodbus.so:${PORTSDIR}/comms/libmodbus
156
MODBUS_CONFIGURE_ENABLE=	modbus
157
MODBUS_CONFIGURE_WITH=		libmodbus=${LOCALBASE}
158
159
MONGODB_LIB_DEPENDS=		libmongoc.so:${PORTSDIR}/devel/mongo-c-driver
160
MONGODB_CONFIGURE_ENABLE=	write_mongodb
161
MONGODB_CONFIGURE_WITH=		libmongoc=${LOCALBASE}
162
163
MYSQL_USE=			mysql=yes
164
MYSQL_CONFIGURE_ENABLE=		mysql
165
MYSQL_CONFIGURE_WITH=		libmysql=${LOCALBASE}
166
167
NOTIFYDESKTOP_LIB_DEPENDS=	libnotify.so:${PORTSDIR}/devel/libnotify
168
NOTIFYDESKTOP_CONFIGURE_ENABLE=	notify_desktop
169
NOTIFYDESKTOP_CONFIGURE_WITH=	libnotify=${LOCALBASE}
170
171
NOTIFYEMAIL_LIB_DEPENDS=	libesmtp.so:${PORTSDIR}/mail/libesmtp
172
NOTIFYEMAIL_CONFIGURE_ENABLE=	notify_email
173
NOTIFYEMAIL_CONFIGURE_WITH=	libesmtp=${LOCALBASE}
174
175
NUTUPS_LIB_DEPENDS=		libupsclient.so:${PORTSDIR}/sysutils/nut
176
NUTUPS_CONFIGURE_ENABLE=	nut
177
NUTUPS_CONFIGURE_WITH=		upsclient=${LOCALBASE}
178
179
OLSRD_CONFIGURE_ENABLE=		olsrd
180
181
ONEWIRE_LIB_DEPENDS=		libow.so:${PORTSDIR}/comms/owfs
182
ONEWIRE_CONFIGURE_ENABLE=	onewire
183
ONEWIRE_CONFIGURE_WITH=		libowcapi=${LOCALBASE}
184
185
OPENLDAP_USE=			openldap=yes
186
OPENLDAP_CONFIGURE_ENABLE=	openldap
187
OPENLDAP_CONFIGURE_WITH=	libldap=${LOCALBASE}
188
189
# XXX: Variable expansion in CONFIGURE_WITH is not functional
190
#PERL_USES=			perl5
191
#PERL_CONFIGURE_ENABLE=		perl
192
#PERL_CONFIGURE_WITH=		perl=${PERL} perl-bindings
193
194
PGSQL_USES=			pgsql
195
PGSQL_CONFIGURE_ENABLE=		postgresql
196
PGSQL_CONFIGURE_WITH=		postgresql=${LOCALBASE} libpq
197
198
PINBA_LIB_DEPENDS=		libprotobuf-c.so:${PORTSDIR}/devel/protobuf-c
199
PINBA_CONFIGURE_ENABLE=		pinba
200
201
PING_LIB_DEPENDS=		liboping.so:${PORTSDIR}/net/liboping
202
PING_CONFIGURE_ENABLE=		ping
203
PING_CONFIGURE_WITH=		liboping=${LOCALBASE}
204
205
# XXX: Variable expansion in CONFIGURE_WITH is not functional
206
#PYTHON_USES=			python:2
207
#PYTHON_CONFIGURE_ENABLE=	python
208
#PYTHON_CONFIGURE_WITH=		python=${PYTHON_CMD}
209
210
RABBITMQ_LIB_DEPENDS=		librabbitmq.so:${PORTSDIR}/net/rabbitmq-c
211
RABBITMQ_CONFIGURE_ENABLE=	rabbitmq
212
RABBITMQ_CONFIGURE_WITH=	librabbitmq=${LOCALBASE}
213
214
REDIS_LIB_DEPENDS=		libhiredis.so:${PORTSDIR}/databases/hiredis
215
REDIS_CONFIGURE_ENABLE=		redis write_redis
216
REDIS_CONFIGURE_WITH=		libhiredis=${LOCALBASE}
217
218
RIEMANN_LIB_DEPENDS=		libprotobuf-c.so:${PORTSDIR}/devel/protobuf-c
219
RIEMANN_CONFIGURE_ENABLE=	write_riemann
220
221
ROUTEROS_LIB_DEPENDS=		librouteros.so:${PORTSDIR}/net/librouteros
222
ROUTEROS_CONFIGURE_ENABLE=	routeros
223
ROUTEROS_CONFIGURE_WITH=	librouteros=${LOCALBASE}
224
225
RRDTOOL_LIB_DEPENDS=		librrd.so:${PORTSDIR}/databases/rrdtool
226
RRDTOOL_CONFIGURE_ENABLE=	rrdcached rrdtool
227
RRDTOOL_CONFIGURE_WITH=		librrd=${LOCALBASE}
228
229
STATGRAB_LIB_DEPENDS=		libstatgrab.so:${PORTSDIR}/devel/libstatgrab
230
STATGRAB_LIBS=			`pkg-config --libs libstatgrab`
231
STATGRAB_CONFIGURE_ENABLE=	interface
232
STATGRAB_CONFIGURE_WITH=	libstatgrab=${LOCALBASE}
233
234
SIGROK_USE=			GNOME=glib20
235
SIGROK_CFLAGS=			`pkg-config --cflags glib-2.0`
236
SIGROK_LIB_DEPENDS=		libsigrok.so:${PORTSDIR}/devel/libsigrok
237
SIGROK_CONFIGURE_ENABLE=	sigrok
238
SIGROK_CONFIGURE_WITH=		libsigrok
239
240
SNMP_LIB_DEPENDS=		libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
241
SNMP_CONFIGURE_ENABLE=		snmp
242
SNMP_CONFIGURE_WITH=		libnetsnmp
243
244
STATSD_CONFIGURE_ENABLE=	statsd
245
246
TOKYOTYRANT_LIB_DEPENDS=	libtokyotyrant.so:${PORTSDIR}/databases/tokyotyrant
247
TOKYOTYRANT_CONFIGURE_ENABLE=	tokyotyrant
248
TOKYOTYRANT_CONFIGURE_WITH=	libtokyotyrant=${LOCALBASE}
249
250
VARNISH_LIB_DEPENDS=		libvarnishapi.so:${PORTSDIR}/www/varnish4
251
VARNISH_CONFIGURE_ENABLE=	varnish
252
VARNISH_CONFIGURE_WITH=		libvarnish=${LOCALBASE}
253
254
VIRT_IMPLIES=			XML
255
VIRT_LIB_DEPENDS=		libvirt.so:${PORTSDIR}/devel/libvirt
256
VIRT_CONFIGURE_ENABLE=		virt
257
VIRT_CONFIGURE_WITH=		virt=${LOCALBASE}
258
259
XML_LIB_DEPENDS=		libxmms.so:${PORTSDIR}/multimedia/xmms
260
XML_CONFIGURE_WITH=		libxml2=${LOCALBASE}
261
262
XMMS_CFLAGS=			`xmms-config --cflags`
263
XMMS_LIB_DEPENDS=		libxmms.so:${PORTSDIR}/multimedia/xmms
264
XMMS_CONFIGURE_ENABLE=		xmms
265
XMMS_CONFIGURE_WITH=		libxmms=${LOCALBASE}
266
267
ZOOKEEPER_LIB_DEPENDS=		libzookeeper_mt.so:${PORTSDIR}/devel/libzookeeper
268
ZOOKEEPER_CONFIGURE_ENABLE=	zookeeper
269
ZOOKEEPER_CONFIGURE_WITH=	libzookeeper=${LOCALBASE}
270
110
# NOTE: Plugins without external dependencies
271
# NOTE: Plugins without external dependencies
111
CONFIGURE_ARGS+=	\
272
CONFIGURE_ARGS+=--enable-aggregation \
112
		--enable-aggregation \
113
		--enable-apcups \
273
		--enable-apcups \
114
		--enable-contextswitch \
274
		--enable-contextswitch \
115
		--enable-cpu \
275
		--enable-cpu \
Lines 160-368 Link Here
160
		--enable-write_log \
320
		--enable-write_log \
161
		--enable-zfs_arc \
321
		--enable-zfs_arc \
162
322
163
.if ${PORT_OPTIONS:MCGI}
323
INSTALL_TARGET=	install-strip
164
RUN_DEPENDS+=	p5-URI>=0:${PORTSDIR}/net/p5-URI \
324
SHEBANG_FILES=	contrib/collection.cgi
165
		p5-CGI>=0:${PORTSDIR}/www/p5-CGI \
166
		p5-Data-Dumper>=0:${PORTSDIR}/devel/p5-Data-Dumper \
167
		p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser
168
PLIST_SUB+=	CGI=""
169
.if empty(PORT_OPTIONS:MRRDTOOL)
170
IGNORE=		CGI requires RRDTOOL. Either select RRDTOOL or deselect CGI
171
.endif
172
.else
173
PLIST_SUB+=	CGI="@comment "
174
.endif
175
325
176
.if ${PORT_OPTIONS:MCURL}
326
# XXX: Several options are not working with option helpers
177
LIB_DEPENDS+=	libcurl.so:${PORTSDIR}/ftp/curl
327
.include <bsd.port.options.mk>
178
CONFIGURE_ARGS+=--with-libcurl=${LOCALBASE} \
179
		--enable-apache \
180
		--enable-curl \
181
		--enable-nginx \
182
		--enable-write_http
183
PLIST_SUB+=	CURL=""
184
.else
185
CONFIGURE_ARGS+=--without-libcurl \
186
		--disable-apache \
187
		--disable-curl \
188
		--disable-nginx \
189
		--disable-write_http
190
PLIST_SUB+=	CURL="@comment "
191
.endif
192
328
193
.if ${PORT_OPTIONS:MCURL} && ${PORT_OPTIONS:MJSON}
194
CONFIGURE_ARGS+=--enable-curl_json
195
PLIST_SUB+=	CURL_JSON=""
196
.else
197
CONFIGURE_ARGS+=--disable-curl_json
198
PLIST_SUB+=	CURL_JSON="@comment "
199
.endif
200
201
.if ${PORT_OPTIONS:MCURL} && ${PORT_OPTIONS:MXML}
202
CONFIGURE_ARGS+=	\
203
		--enable-ascent \
204
		--enable-bind \
205
		--enable-curl_xml
206
PLIST_SUB+=	CURL_XML=""
207
.else
208
CONFIGURE_ARGS+=	\
209
		--disable-ascent \
210
		--disable-bind \
211
		--disable-curl_xml
212
PLIST_SUB+=	CURL_XML="@comment "
213
.endif
214
215
.if ${PORT_OPTIONS:MDEBUG}
216
CONFIGURE_ARGS+=--enable-debug
217
.else
218
CONFIGURE_ARGS+=--disable-debug
219
.endif
220
221
.if ${PORT_OPTIONS:MDBI}
222
LIB_DEPENDS+=	libdbi.so:${PORTSDIR}/databases/libdbi
223
CONFIGURE_ARGS+=--with-libdbi=${LOCALBASE} --enable-dbi
224
PLIST_SUB+=	DBI=""
225
CFLAGS+=	-Wno-deprecated-declarations
226
.else
227
CONFIGURE_ARGS+=--without-libdbi --disable-dbi
228
PLIST_SUB+=	DBI="@comment "
229
.endif
230
231
.if ${PORT_OPTIONS:MGCRYPT}
232
LIB_DEPENDS+=	libgcrypt.so:${PORTSDIR}/security/libgcrypt
233
CONFIGURE_ARGS+=--with-libgcrypt=${LOCALBASE}
234
LIBS+=		-lgcrypt
235
.else
236
CONFIGURE_ARGS+=--without-libgcrypt
237
.endif
238
239
.if ${PORT_OPTIONS:MIPMI}
240
LIB_DEPENDS+=	libOpenIPMI.so:${PORTSDIR}/sysutils/openipmi
241
CONFIGURE_ARGS+=--enable-ipmi
242
PLIST_SUB+=	IPMI=""
243
.else
244
CONFIGURE_ARGS+=--disable-ipmi
245
PLIST_SUB+=	IPMI="@comment "
246
.endif
247
248
.if ${PORT_OPTIONS:MJSON}
249
LIB_DEPENDS+=	libyajl.so:${PORTSDIR}/devel/yajl
250
CONFIGURE_ARGS+=--with-libyajl=${LOCALBASE}
251
.else
252
CONFIGURE_ARGS+=--without-libyajl
253
.endif
254
255
.if ${PORT_OPTIONS:MKAFKA}
256
LIB_DEPENDS+=	librdkafka.so:${PORTSDIR}/net/librdkafka
257
CONFIGURE_ARGS+=--enable-write_kafka
258
PLIST_SUB+=	KAFKA=""
259
.else
260
CONFIGURE_ARGS+=--disable-write_kafka
261
PLIST_SUB+=	KAFKA="@comment "
262
.endif
263
264
.if ${PORT_OPTIONS:MLOGSTASH}
265
CONFIGURE_ARGS+=--enable-log_logstash
266
PLIST_SUB+=	LOGSTASH=""
267
.if empty(PORT_OPTIONS:MJSON)
268
IGNORE=		LOGSTASH requires JSON. Either select JSON or deselect LOGSTASH
269
.endif
270
.else
271
PLIST_SUB+=	LOGSTASH="@comment "
272
.endif
273
274
.if ${PORT_OPTIONS:MMEMCACHEC}
275
LIB_DEPENDS+=	libmemcached.so:${PORTSDIR}/databases/libmemcached
276
CONFIGURE_ARGS+=--with-libmemcached=${LOCALBASE} --enable-memcachec
277
PLIST_SUB+=	MEMCACHEC=""
278
.else
279
CONFIGURE_ARGS+=--without-libmemcached
280
PLIST_SUB+=	MEMCACHEC="@comment "
281
.endif
282
283
.if ${PORT_OPTIONS:MMODBUS}
284
LIB_DEPENDS+=	libmodbus.so:${PORTSDIR}/comms/libmodbus
285
CONFIGURE_ARGS+=--with-libmodbus=${LOCALBASE} --enable-modbus
286
PLIST_SUB+=	MODBUS=""
287
.else
288
PLIST_SUB+=	MODBUS="@comment "
289
.endif
290
291
.if ${PORT_OPTIONS:MMONGODB}
292
LIB_DEPENDS+=	libmongoc.so:${PORTSDIR}/devel/mongo-c-driver
293
CONFIGURE_ARGS+=--with-libmongoc=${LOCALBASE} \
294
		--enable-write_mongodb
295
PLIST_SUB+=	MONGODB=""
296
.else
297
CONFIGURE_ARGS+=--without-libcmongoc \
298
		--disable-write_mongodb
299
PLIST_SUB+=	MONGODB="@comment "
300
.endif
301
302
.if ${PORT_OPTIONS:MMYSQL}
303
USE_MYSQL=	yes
304
CONFIGURE_ARGS+=--with-libmysql=${LOCALBASE} --enable-mysql
305
PLIST_SUB+=	MYSQL=""
306
.else
307
CONFIGURE_ARGS+=--without-libmysql --disable-mysql
308
PLIST_SUB+=	MYSQL="@comment "
309
.endif
310
311
.if ${PORT_OPTIONS:MNOTIFYDESKTOP}
312
LIB_DEPENDS+=	libnotify.so:${PORTSDIR}/devel/libnotify
313
CONFIGURE_ARGS+=--with-libnotify=${LOCALBASE} \
314
		--enable-notify_desktop
315
PLIST_SUB+=	NOTIFYDESKTOP=""
316
.else
317
CONFIGURE_ARGS+=--without-libnotify --disable-notify_desktop
318
PLIST_SUB+=	NOTIFYDESKTOP="@comment "
319
.endif
320
321
.if ${PORT_OPTIONS:MNOTIFYEMAIL}
322
LIB_DEPENDS+=	libesmtp.so:${PORTSDIR}/mail/libesmtp
323
CONFIGURE_ARGS+=--with-libesmtp=${LOCALBASE} \
324
		--enable-notify_email
325
PLIST_SUB+=	NOTIFYEMAIL=""
326
.else
327
CONFIGURE_ARGS+=--without-libesmtp --disable-notify_email
328
PLIST_SUB+=	NOTIFYEMAIL="@comment "
329
.endif
330
331
.if ${PORT_OPTIONS:MNUTUPS}
332
LIB_DEPENDS+=	libupsclient.so:${PORTSDIR}/sysutils/nut
333
CONFIGURE_ARGS+=--with-upsclient=${LOCALBASE} --enable-nut
334
PLIST_SUB+=	NUTUPS=""
335
.else
336
CONFIGURE_ARGS+=--without-libupsclient --disable-nut
337
PLIST_SUB+=	NUTUPS="@comment "
338
.endif
339
340
.if ${PORT_OPTIONS:MOLSRD}
341
CONFIGURE_ARGS+=--enable-olsrd
342
PLIST_SUB+=	OLSRD=""
343
.else
344
CONFIGURE_ARGS+=--enable-olsrd
345
PLIST_SUB+=	OLSRD="@comment "
346
.endif
347
348
.if ${PORT_OPTIONS:MONEWIRE}
349
LIB_DEPENDS+=	libow.so:${PORTSDIR}/comms/owfs
350
CONFIGURE_ARGS+=--with-libowcapi=${LOCALBASE} --enable-onewire
351
PLIST_SUB+=	ONEWIRE=""
352
.else
353
CONFIGURE_ARGS+=--disable-onewire
354
PLIST_SUB+=	ONEWIRE="@comment "
355
.endif
356
357
.if ${PORT_OPTIONS:MOPENLDAP}
358
USE_OPENLDAP=	yes
359
CONFIGURE_ARGS+=--with-libldap=${LOCALBASE} --enable-openldap
360
PLIST_SUB+=	OPENLDAP=""
361
.else
362
CONFIGURE_ARGS+=--disable-openldap
363
PLIST_SUB+=	OPENLDAP="@comment "
364
.endif
365
366
.if ${PORT_OPTIONS:MPERL}
329
.if ${PORT_OPTIONS:MPERL}
367
USES+=		perl5
330
USES+=		perl5
368
CONFIGURE_ARGS+=--with-perl=${PERL} --with-perl-bindings --enable-perl
331
CONFIGURE_ARGS+=--with-perl=${PERL} --with-perl-bindings --enable-perl
Lines 372-404 Link Here
372
PLIST_SUB+=	PERL="@comment "
335
PLIST_SUB+=	PERL="@comment "
373
.endif
336
.endif
374
337
375
.if ${PORT_OPTIONS:MPGSQL}
376
USES+=		pgsql
377
CONFIGURE_ARGS+=--with-postgresql=${LOCALBASE} --enable-postgresql --with-libpq
378
PLIST_SUB+=	PGSQL=""
379
.else
380
CONFIGURE_ARGS+=--without-postgresql --disable-postgresql --without-libpq
381
PLIST_SUB+=	PGSQL="@comment "
382
.endif
383
384
.if ${PORT_OPTIONS:MPINBA}
385
LIB_DEPENDS+=	libprotobuf-c.so:${PORTSDIR}/devel/protobuf-c
386
CONFIGURE_ARGS+=--enable-pinba
387
PLIST_SUB+=	PINBA=""
388
.else
389
CONFIGURE_ARGS+=--disable-pinba
390
PLIST_SUB+=	PINBA="@comment "
391
.endif
392
393
.if ${PORT_OPTIONS:MPING}
394
LIB_DEPENDS+=	liboping.so:${PORTSDIR}/net/liboping
395
CONFIGURE_ARGS+=--with-liboping=${LOCALBASE} --enable-ping
396
PLIST_SUB+=	PING=""
397
.else
398
CONFIGURE_ARGS+=--without-liboping --disable-ping
399
PLIST_SUB+=	PING="@comment "
400
.endif
401
402
.if ${PORT_OPTIONS:MPYTHON}
338
.if ${PORT_OPTIONS:MPYTHON}
403
USES+=		python:2
339
USES+=		python:2
404
CONFIGURE_ARGS+=--with-python=${PYTHON_CMD} --enable-python
340
CONFIGURE_ARGS+=--with-python=${PYTHON_CMD} --enable-python
Lines 408-564 Link Here
408
PLIST_SUB+=	PYTHON="@comment "
344
PLIST_SUB+=	PYTHON="@comment "
409
.endif
345
.endif
410
346
411
.if ${PORT_OPTIONS:MRABBITMQ}
412
LIB_DEPENDS+=	librabbitmq.so:${PORTSDIR}/net/rabbitmq-c
413
CONFIGURE_ARGS+=--with-librabbitmq=${LOCALBASE} \
414
		--enable-rabbitmq
415
PLIST_SUB+=	RABBITMQ=""
416
.else
417
CONFIGURE_ARGS+=--without-librabbitmq \
418
		--disable-rabbitmq
419
PLIST_SUB+=	RABBITMQ="@comment "
420
.endif
421
422
.if ${PORT_OPTIONS:MREDIS}
423
LIB_DEPENDS+=	libhiredis.so:${PORTSDIR}/databases/hiredis
424
CONFIGURE_ARGS+=--with-libhiredis=${LOCALBASE} \
425
		--enable-redis \
426
		--enable-write_redis
427
PLIST_SUB+=	REDIS=""
428
.else
429
CONFIGURE_ARGS+=--without-libcredis \
430
		--disable-redis \
431
		--disable-write_redis
432
PLIST_SUB+=	REDIS="@comment "
433
.endif
434
435
.if ${PORT_OPTIONS:MRIEMANN}
436
LIB_DEPENDS+=	libprotobuf-c.so:${PORTSDIR}/devel/protobuf-c
437
CONFIGURE_ARGS+=--enable-write_riemann
438
PLIST_SUB+=	RIEMANN=""
439
.else
440
CONFIGURE_ARGS+=--disable-write_riemann
441
PLIST_SUB+=	RIEMANN="@comment "
442
.endif
443
444
.if ${PORT_OPTIONS:MROUTEROS}
445
LIB_DEPENDS+=	librouteros.so:${PORTSDIR}/net/librouteros
446
CONFIGURE_ARGS+=--with-librouteros=${LOCALBASE} --enable-routeros
447
PLIST_SUB+=	ROUTEROS=""
448
.else
449
CONFIGURE_ARGS+=--without-librouteros --disable-routeros
450
PLIST_SUB+=	ROUTEROS="@comment "
451
.endif
452
453
.if ${PORT_OPTIONS:MRRDTOOL}
454
LIB_DEPENDS+=	librrd.so:${PORTSDIR}/databases/rrdtool
455
CONFIGURE_ARGS+=--with-librrd=${LOCALBASE} \
456
		--enable-rrdcached \
457
		--enable-rrdtool
458
PLIST_SUB+=	RRDTOOL=""
459
.else
460
CONFIGURE_ARGS+=--without-librrd \
461
		--disable-rrdcached \
462
		--disable-rrdtool
463
PLIST_SUB+=	RRDTOOL="@comment "
464
.endif
465
466
.if ${PORT_OPTIONS:MSTATGRAB}
467
LIB_DEPENDS+=	libstatgrab.so:${PORTSDIR}/devel/libstatgrab
468
LIBS+=		`pkg-config --libs libstatgrab`
469
CONFIGURE_ARGS+=--with-libstatgrab=${LOCALBASE} \
470
		--enable-interface
471
PLIST_SUB+=	STATGRAB=""
472
.else
473
CONFIGURE_ARGS+=--without-libstatgrab
474
PLIST_SUB+=	STATGRAB="@comment "
475
.endif
476
477
.if ${PORT_OPTIONS:MSIGROK}
478
USE_GNOME+=	glib20
479
LIB_DEPENDS+=	libsigrok.so:${PORTSDIR}/devel/libsigrok
480
CONFIGURE_ARGS+=--with-libsigrok --enable-sigrok
481
CFLAGS+=	`pkg-config --cflags glib-2.0`
482
PLIST_SUB+=	SIGROK=""
483
.else
484
CONFIGURE_ARGS+=--disable-sigrok
485
PLIST_SUB+=	SIGROK="@comment "
486
.endif
487
488
.if ${PORT_OPTIONS:MSNMP}
489
LIB_DEPENDS+=	libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
490
CONFIGURE_ARGS+=--with-libnetsnmp --enable-snmp
491
PLIST_SUB+=	SNMP=""
492
.else
493
CONFIGURE_ARGS+=--without-libnetsnmp
494
PLIST_SUB+=	SNMP="@comment "
495
.endif
496
497
.if ${PORT_OPTIONS:MSTATSD}
498
CONFIGURE_ARGS+=--enable-statsd
499
PLIST_SUB+=	STATSD=""
500
.else
501
CONFIGURE_ARGS+=--disable-statsd
502
PLIST_SUB+=	STATSD="@comment "
503
.endif
504
505
.if ${PORT_OPTIONS:MTOKYOTYRANT}
506
LIB_DEPENDS+=	libtokyotyrant.so:${PORTSDIR}/databases/tokyotyrant
507
CONFIGURE_ARGS+=--with-libtokyotyrant=${LOCALBASE} --enable-tokyotyrant
508
PLIST_SUB+=	TOKYOTYRANT=""
509
.else
510
CONFIGURE_ARGS+=--without-libtokyotyrant --disable-tokyotyrant
511
PLIST_SUB+=	TOKYOTYRANT="@comment "
512
.endif
513
514
.if ${PORT_OPTIONS:MVARNISH}
515
LIB_DEPENDS+=	libvarnishapi.so:${PORTSDIR}/www/varnish4
516
CONFIGURE_ARGS+=--with-libvarnish=${LOCALBASE} --enable-varnish
517
PLIST_SUB+=	VARNISH=""
518
.else
519
CONFIGURE_ARGS+=--without-libvarnish
520
PLIST_SUB+=	VARNISH="@comment "
521
.endif
522
523
.if ${PORT_OPTIONS:MVIRT}
524
.if empty(PORT_OPTIONS:MXML)
525
IGNORE=		VIRT requires XML. Either select XML or deselect VIRT.
526
.endif
527
LIB_DEPENDS+=	libvirt.so:${PORTSDIR}/devel/libvirt
528
CONFIGURE_ARGS+=--enable-virt
529
PLIST_SUB+=	VIRT=""
530
.else
531
CONFIGURE_ARGS+=--without-virt --disable-virt
532
PLIST_SUB+=	VIRT="@comment "
533
.endif
534
535
.if ${PORT_OPTIONS:MXML}
536
LIB_DEPENDS+=	libxml2.so:${PORTSDIR}/textproc/libxml2
537
CONFIGURE_ARGS+=--with-libxml2=${LOCALBASE}
538
.endif
539
540
.if ${PORT_OPTIONS:MXMMS}
541
LIB_DEPENDS+=	libxmms.so:${PORTSDIR}/multimedia/xmms
542
CONFIGURE_ARGS+=--with-libxmms=${LOCALBASE} --enable-xmms
543
CFLAGS+=	`xmms-config --cflags`
544
PLIST_SUB+=	XMMS=""
545
.else
546
CONFIGURE_ARGS+=--without-libxmms --disable-xmms
547
PLIST_SUB+=	XMMS="@comment "
548
.endif
549
550
.if ${PORT_OPTIONS:MZOOKEEPER}
551
LIB_DEPENDS+=	libzookeeper_mt.so:${PORTSDIR}/devel/libzookeeper
552
CONFIGURE_ARGS+=--with-libzookeeper=${LOCALBASE} --enable-zookeeper
553
PLIST_SUB+=	ZOOKEEPER=""
554
.else
555
CONFIGURE_ARGS+=--without-libzookeeper --disable-zookeeper
556
PLIST_SUB+=	ZOOKEEPER="@comment "
557
.endif
558
559
INSTALL_TARGET=install-strip
560
SHEBANG_FILES=	contrib/collection.cgi
561
562
post-patch:
347
post-patch:
563
	@${REINPLACE_CMD} 's/-Werror//' \
348
	@${REINPLACE_CMD} 's/-Werror//' \
564
		${WRKSRC}/configure.ac ${WRKSRC}/src/Makefile.am \
349
		${WRKSRC}/configure.ac ${WRKSRC}/src/Makefile.am \
Lines 578-589 Link Here
578
		${WRKSRC}/contrib/collection.conf
363
		${WRKSRC}/contrib/collection.conf
579
364
580
post-install:
365
post-install:
581
	@${MKDIR} ${STAGEDIR}/var/db/collectd
366
	${MKDIR} ${STAGEDIR}/var/db/collectd
582
.if ${PORT_OPTIONS:MCGI}
367
583
	@${MKDIR} ${STAGEDIR}${WWWDIR}
368
post-install-CGI-on:
369
	${MKDIR} ${STAGEDIR}${WWWDIR}
584
	${INSTALL_SCRIPT} ${WRKSRC}/contrib/collection.cgi ${STAGEDIR}${WWWDIR}/
370
	${INSTALL_SCRIPT} ${WRKSRC}/contrib/collection.cgi ${STAGEDIR}${WWWDIR}/
585
	${INSTALL_DATA} ${WRKSRC}/contrib/collection.conf \
371
	${INSTALL_DATA} ${WRKSRC}/contrib/collection.conf \
586
		${STAGEDIR}${WWWDIR}/collection.conf.sample
372
		${STAGEDIR}${WWWDIR}/collection.conf.sample
587
.endif
588
373
589
.include <bsd.port.mk>
374
.include <bsd.port.mk>

Return to bug 204220