Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

16
sysutils/conky/DESCR Normal file
View File

@@ -0,0 +1,16 @@
Conky is a system monitor for X originally based on torsmo. Since
its inception, Conky has changed significantly from its predecessor,
while maintaining simplicity and configurability. Conky can display
just about anything, either on your root desktop or in its own
window. Not only does Conky have many built-in objects, it can
also display just about any piece of information by using scripts
and other external programs.
Conky has more than 250 built in objects, including support for a
plethora of OS stats (uname, uptime, CPU usage, mem usage, disk
usage, "top" like process stats, and network monitoring, just to
name a few), built in IMAP and POP3 support, built in support for
many popular music players (MPD, XMMS2, BMPx, Audacious), and much
much more. Conky can display this info either as text, or using
simple progress bars and graph widgets, with different fonts
and colours.

56
sysutils/conky/Makefile Normal file
View File

@@ -0,0 +1,56 @@
# $NetBSD: Makefile,v 1.14 2013/06/06 12:55:02 wiz Exp $
#
DISTNAME= conky-1.9.0
PKGREVISION= 11
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=conky/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= imil@NetBSD.org
HOMEPAGE= http://conky.sourceforge.net/
COMMENT= Free, light-weight system monitor for X
LICENSE= gnu-gpl-v3
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config aclocal autoconf autoheader automake
CONFIGURE_ARGS+= --enable-imlib2 --enable-lua-imlib2
CONFIGURE_ARGS+= --enable-lua-cairo
CONFIGURE_ARGS+= --enable-curl --enable-rss
CONFIGURE_ARGS+= --enable-weather-metar --enable-weather-xoap
EGDIR= share/examples/conky
OWN_DIRS= ${PKG_SYSCONFDIR}/conky
CONF_FILES= ${EGDIR}/conky.conf ${PKG_SYSCONFDIR}/conky/conky.conf
CONF_FILES+= ${EGDIR}/conky_no_x11.conf ${PKG_SYSCONFDIR}/conky/conky_no_x11.conf
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
CPPFLAGS+= -D_KMEMUSER
.endif
# conky segfaults on system's curses
PREFER_PKGSRC+= ncurses
pre-configure:
set -e; cd ${WRKSRC}; \
aclocal; autoheader; automake -a --foreign -i; autoconf
post-install:
${INSTALL_DATA} files/conkyrc ${DESTDIR}${PREFIX}/${EGDIR}
.include "../../devel/ncurses/buildlink3.mk"
.include "../../devel/tolua++/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXdamage/buildlink3.mk"
.include "../../x11/libXft/buildlink3.mk"
.include "../../graphics/cairo/buildlink3.mk"
.include "../../graphics/imlib2/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

8
sysutils/conky/PLIST Normal file
View File

@@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
bin/conky
lib/conky/libcairo.la
lib/conky/libimlib2.la
man/man1/conky.1
share/examples/conky/conky.conf
share/examples/conky/conky_no_x11.conf
share/examples/conky/conkyrc

15
sysutils/conky/distinfo Normal file
View File

@@ -0,0 +1,15 @@
$NetBSD: distinfo,v 1.3 2013/01/26 22:07:42 wiz Exp $
SHA1 (conky-1.9.0.tar.bz2) = 2069cbdb8e7224fcbf3c6b1ddebf64a51634b4cc
RMD160 (conky-1.9.0.tar.bz2) = 2df0e60d4236ed667bdae876e11ba28d05914e25
Size (conky-1.9.0.tar.bz2) = 626555 bytes
SHA1 (patch-configure.ac) = fab28e82ad01b2c346552af7537865e049098f2c
SHA1 (patch-data_Makefile.am) = af8df32076b8a389ee98e2550342dbb343f7bff3
SHA1 (patch-src_Makefile.am) = f4e79c0f08a0886a061449b9a8a578173cda90db
SHA1 (patch-src_config.h.in) = 31aa9cd4bd4ab775e6da633f86415ee8f5383538
SHA1 (patch-src_conky.c) = e4c9173661cca437af0febbcae94eec72dc0ea4a
SHA1 (patch-src_core.c) = a64ff7cb05d7b6b62aea41e486c0a719e2c93faf
SHA1 (patch-src_fs.c) = 104fd3788f319689026702d6a149410184072e24
SHA1 (patch-src_netbsd.c) = b6af055adea3922a1a8aed8c6ab8795bd1fa2607
SHA1 (patch-src_netbsd.h) = 25f9c66eede8e4aaef475d6afcbf79440ec8d7bb
SHA1 (patch-src_text__object.h) = 7f7e3684e21f9618a8ede37525f4a48f47a92050

View File

@@ -0,0 +1,78 @@
# Inspired from http://ebupof.deviantart.com/art/My-Conky-Config-1-3-60095106
background no
font Sans:size=8
use_xft yes
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window no
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 5
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 35
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
uppercase yes # set to yes if you want all text to be in uppercase
TEXT
${color white}SYSTEM ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Temp: ${alignr}${acpitemp}C
CPU: ${alignr}${freq} MHz
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg
CPU1 ${alignr}${cpu cpu1}%
${cpugraph cpu1 10,100}
CPU2 ${alignr}${cpu cpu2}%
${cpugraph cpu2 10,100}
Ram ${alignr}$mem / $memmax ($memperc%)
${membar 4}
swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}
Highest CPU $alignr CPU% MEM%
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
Highest MEM $alignr CPU% MEM%
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
${color white}Filesystem ${hr 1}${color}
Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}
${color white}NETWORK ${hr 1}${color}
Down ${downspeed ath0} k/s ${alignr}Up ${upspeed ath0} k/s
${downspeedgraph ath0 25,107} ${alignr}${upspeedgraph ath0 25,107}
Total ${totaldown ath0} ${alignr}Total ${totalup ath0}
${color white}BATTERY ${hr 1}${color}
${alignr}${battery}
Remaining: ${alignr}${battery_time}

View File

@@ -0,0 +1,68 @@
$NetBSD: patch-configure.ac,v 1.2 2013/01/26 22:07:42 wiz Exp $
automake-1.13 compat.
Enable NetBSD as a suitable platform.
--- configure.ac.orig 2012-05-03 21:47:32.000000000 +0000
+++ configure.ac
@@ -15,7 +15,7 @@ m4_define([conky_version],
AC_INIT([Conky], [conky_version()], [brenden1@users.sourceforge.net])
AM_INIT_AUTOMAKE(conky, conky_version())
-AM_CONFIG_HEADER(src/config.h)
+AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_MACRO_DIR([m4])
dnl prevent libtool setting LTCFLAGS to default of -g -O2 when CFLAGS unset.
@@ -62,10 +62,11 @@ case $uname in
WANT_DEVSTAT=yes
WANT_OPTRESET=yes
;;
-# NetBSD*)
-# WANT_KVM=yes
-# WANT_OSSLIB=yes
-# ;;
+ NetBSD*)
+ WANT_KVM=yes
+ WANT_OSSLIB=yes
+ WANT_PROPLIB=yes
+ ;;
OpenBSD*)
WANT_KVM=yes
@@ -87,7 +88,7 @@ esac
AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux)
#AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS)
AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD -o x$uname = xGNU/kFreeBSD)
-#AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
+AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
AM_CONDITIONAL(BUILD_OPENBSD, test x$uname = xOpenBSD)
BUILD_DATE=$(LANG=en_US LC_ALL=en_US LOCALE=en_US date)
@@ -734,6 +735,17 @@ if test x$WANT_KVM = xyes; then
fi
dnl
+dnl PROPLIB for NetBSD
+dnl
+
+if test x$WANT_PROPLIB = xyes; then
+ AC_CHECK_LIB(prop, prop_dictionary_create,
+ conky_LIBS="$conky_LIBS -lprop",
+ AC_MSG_ERROR([Could not find prop_dictionary_create in -lprop.])
+ )
+fi
+
+dnl
dnl optreset
dnl
@@ -784,7 +796,7 @@ dnl
dnl Some headers
dnl
-AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h alsa/asoundlib.h dirent.h mcheck.h \
+AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h alsa/asoundlib.h dirent.h mcheck.h sys/statvfs.h \
sys/statfs.h sys/param.h pthread.h semaphore.h assert.h errno.h time.h])
AC_CHECK_HEADERS([sys/mount.h], [], [],
[#ifdef HAVE_SYS_PARAM_H

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-data_Makefile.am,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Install config into example directory.
--- data/Makefile.am.orig 2010-10-20 00:32:27.000000000 +0000
+++ data/Makefile.am
@@ -25,7 +25,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-configdir = ${sysconfdir}/conky
+configdir = ${prefix}/share/examples/conky
dist_config_DATA = conky.conf conky_no_x11.conf
# vi:set ts=4 sw=4 noet ai nocindent syntax=automake:

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-src_Makefile.am,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Enable NetBSD as a suitable platform.
--- src/Makefile.am.orig 2012-05-03 21:08:27.000000000 +0000
+++ src/Makefile.am
@@ -119,9 +119,9 @@ endif
if BUILD_FREEBSD
optional_sources += $(freebsd)
endif
-#if BUILD_NETBSD
-#optional_sources += $(netbsd)
-#endif
+if BUILD_NETBSD
+optional_sources += $(netbsd)
+endif
if BUILD_OPENBSD
optional_sources += $(openbsd)
endif

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-src_config.h.in,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Check for sys/statvfs.h.
--- src/config.h.in.orig 2012-05-03 21:47:46.000000000 +0000
+++ src/config.h.in
@@ -102,9 +102,6 @@
/* Define to 1 if you have the <glib-object.h> header file. */
#undef HAVE_GLIB_OBJECT_H
-/* Define if you have the iconv() function and it works. */
-#undef HAVE_ICONV
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -207,6 +204,9 @@
/* Define to 1 if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#undef HAVE_SYS_STATVFS_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -234,9 +234,6 @@
/* Define if you want support for IBM/Lenovo notebooks (SMAPI) */
#undef IBM
-/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
-
/* Define if you want Imlib2 support */
#undef IMLIB2

View File

@@ -0,0 +1,114 @@
$NetBSD: patch-src_conky.c,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Enable NetBSD as a suitable platform.
--- src/conky.c.orig 2012-05-03 21:22:21.000000000 +0000
+++ src/conky.c
@@ -65,7 +65,7 @@
#include <fcntl.h>
#include <getopt.h>
#ifdef NCURSES
-#include <ncurses.h>
+#include <curses.h>
#endif
#ifdef XOAP
#include <libxml/parser.h>
@@ -117,15 +117,18 @@
#include "freebsd.h"
#elif defined(__OpenBSD__)
#include "openbsd.h"
+#elif defined(__NetBSD__)
+#include "netbsd.h"
#endif
+
#if defined(__FreeBSD_kernel__)
#include <bsd/bsd.h>
#endif
/* FIXME: apm_getinfo is unused here. maybe it's meant for common.c */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
int apm_getinfo(int fd, apm_info_t aip);
char *get_apm_adapter(void);
char *get_apm_battery_life(void);
@@ -784,7 +787,7 @@ void generate_text_internal(char *p, int
OBJ(read_tcp) {
print_read_tcp(obj, p, p_max_size);
}
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__)
OBJ(acpitemp) {
temp_print(p, p_max_size, get_acpi_temperature(obj->data.i), TEMP_CELSIUS);
}
@@ -799,7 +802,7 @@ void generate_text_internal(char *p, int
OBJ(freq_g) {
static int ok = 1;
if (ok) {
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__) && !defined(__NetBSD__)
ok = get_freq(p, p_max_size, "%'.2f", 1000,
obj->data.i);
#else
@@ -846,7 +849,7 @@ void generate_text_internal(char *p, int
#endif /* __linux__ */
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__)
OBJ(acpifan) {
get_acpi_fan(p, p_max_size);
}
@@ -1015,13 +1018,11 @@ void generate_text_internal(char *p, int
get_powerbook_batt_info(p, p_max_size, obj->data.i);
}
#endif /* __linux__ */
-#if (defined(__FreeBSD__) || defined(__linux__))
OBJ(if_up) {
if (!interface_up(obj)) {
DO_JUMP;
}
}
-#endif
#ifdef __OpenBSD__
OBJ(obsd_sensors_temp) {
print_obsd_sensors_temp(obj, p, p_max_size);
@@ -1899,7 +1900,7 @@ void generate_text_internal(char *p, int
}
#endif /* __linux__ */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
OBJ(apm_adapter) {
char *msg;
@@ -5680,6 +5681,13 @@ void initialisation(int argc, char **arg
}
pthread_mutex_init(&kvm_proc_mutex, NULL);
#endif
+#if defined(__NetBSD__)
+ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, NULL)) == NULL)
+ CRIT_ERR(NULL, NULL, "cannot read kvm");
+
+ /* open the sysmon fd */
+ sysmon_open();
+#endif
while (1) {
int c = getopt_long(argc, argv, getopt_string, longopts, NULL);
@@ -5960,9 +5968,13 @@ int main(int argc, char **argv)
curl_global_cleanup();
#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
kvm_close(kd);
+#ifndef __NetBSD__
pthread_mutex_destroy(&kvm_proc_mutex);
+#else
+ sysmon_close();
+#endif
#endif
return 0;

View File

@@ -0,0 +1,71 @@
$NetBSD: patch-src_core.c,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Enable NetBSD as a suitable platform.
--- src/core.c.orig 2012-05-03 21:08:27.000000000 +0000
+++ src/core.c
@@ -65,7 +65,7 @@
#include "top.h"
#ifdef NCURSES
-#include <ncurses.h>
+#include <curses.h>
#endif
/* check for OS and include appropriate headers */
@@ -75,6 +75,8 @@
#include "freebsd.h"
#elif defined(__OpenBSD__)
#include "openbsd.h"
+#elif defined(__NetBSD__)
+#include "netbsd.h"
#endif
#include <string.h>
@@ -237,7 +239,7 @@ struct text_object *construct_text_objec
#endif /* __linux__ */
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__)
END OBJ(acpifan, 0)
END OBJ(battery, 0)
char bat[64];
@@ -326,10 +328,8 @@ struct text_object *construct_text_objec
obj->data.i = PB_BATT_STATUS;
}
#endif /* __linux__ */
-#if (defined(__FreeBSD__) || defined(__linux__))
END OBJ_IF_ARG(if_up, 0, "if_up needs an argument")
parse_if_up_arg(obj, arg);
-#endif
#if defined(__OpenBSD__)
END OBJ_ARG(obsd_sensors_temp, 0, "obsd_sensors_temp: needs an argument")
parse_obsd_sensor(obj, arg);
@@ -860,7 +860,7 @@ struct text_object *construct_text_objec
END OBJ(gw_ip, &update_gateway_info)
#endif /* !__linux__ */
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
END OBJ(apm_adapter, 0)
END OBJ(apm_battery_life, 0)
END OBJ(apm_battery_time, 0)
@@ -1371,7 +1371,7 @@ void free_text_objects(struct text_objec
for (obj = root->prev; obj; obj = root->prev) {
root->prev = obj->prev;
switch (obj->type) {
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__)
case OBJ_acpitemp:
close(data.i);
break;
@@ -1645,7 +1645,7 @@ void free_text_objects(struct text_objec
#endif /* HAVE_LUA */
case OBJ_pre_exec:
break;
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__)
case OBJ_battery:
free(data.s);
break;

View File

@@ -0,0 +1,69 @@
$NetBSD: patch-src_fs.c,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Check for sys/statvfs.h.
--- src/fs.c.orig 2012-05-03 21:08:27.000000000 +0000
+++ src/fs.c
@@ -44,6 +44,11 @@
#include <sys/statfs.h>
#endif
+/* NetBSD, Solaris */
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+
/* freebsd && netbsd */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -52,7 +57,7 @@
#include <sys/mount.h>
#endif
-#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__)
+#if !defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) && !defined (__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
#include <mntent.h>
#endif
@@ -118,6 +123,7 @@ struct fs_stat *prepare_fs_stat(const ch
static void update_fs_stat(struct fs_stat *fs)
{
+#ifdef HAVE_SYS_STATFS_H
struct statfs64 s;
if (statfs64(fs->path, &s) == 0) {
@@ -125,6 +131,14 @@ static void update_fs_stat(struct fs_sta
/* bfree (root) or bavail (non-roots) ? */
fs->avail = (long long)s.f_bavail * s.f_bsize;
fs->free = (long long)s.f_bfree * s.f_bsize;
+#else
+ struct statvfs s;
+
+ if (statvfs(fs->path, &s) == 0) {
+ fs->free = (long long)s.f_bfree * s.f_frsize;
+ fs->size = (long long)s.f_blocks * s.f_frsize;
+ fs->avail = (long long)s.f_bavail * s.f_frsize;
+#endif
get_fs_type(fs->path, fs->type);
} else {
NORM_ERR("statfs64 '%s': %s", fs->path, strerror(errno));
@@ -138,10 +152,17 @@ static void update_fs_stat(struct fs_sta
void get_fs_type(const char *path, char *result)
{
-#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__)
+#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) || defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)
+#ifdef HAVE_SYS_STATFS_H
struct statfs s;
+
if (statfs(path, &s) == 0) {
+#else
+ struct statvfs s;
+
+ if (statvfs(path, &s) == 0) {
+#endif
strncpy(result, s.f_fstypename, DEFAULT_TEXT_BUFFER_SIZE);
} else {
NORM_ERR("statfs '%s': %s", path, strerror(errno));

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-src_netbsd.h,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Many fixes and addons for conky to work on NetBSD.
--- src/netbsd.h.orig 2010-03-25 17:42:39.000000000 +0000
+++ src/netbsd.h
@@ -12,6 +12,8 @@
#include <kvm.h>
#include <nlist.h>
+#include <pthread.h>
+
#include <sys/time.h>
#include <sys/sysctl.h>
#include <sys/types.h>
@@ -27,10 +29,20 @@
#include <machine/param.h>
+#include <prop/proplib.h>
+
#include "conky.h"
#include "common.h"
+#define _DEV_SYSMON "/dev/sysmon"
+
int get_entropy_avail(unsigned int *);
int get_entropy_poolsize(unsigned int *);
+void sysmon_open(void);
+void sysmon_close(void);
+
+kvm_t *kd;
+extern int sysmon_fd;
+
#endif /*NETBSD_H_*/

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-src_text__object.h,v 1.1.1.1 2012/05/13 08:42:20 imil Exp $
Enable NetBSD as a suitable platform.
--- src/text_object.h.orig 2012-05-03 21:08:27.000000000 +0000
+++ src/text_object.h
@@ -166,9 +166,7 @@ enum text_object_type {
OBJ_wireless_link_qual_perc,
OBJ_wireless_link_bar,
#endif /* __linux__ */
-#if defined(__FreeBSD__) || defined(__linux__)
OBJ_if_up,
-#endif
OBJ_if_empty,
OBJ_if_match,
OBJ_if_existing,
@@ -311,7 +309,7 @@ enum text_object_type {
OBJ_pop3_unseen,
OBJ_pop3_used,
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
OBJ_apm_adapter,
OBJ_apm_battery_time,
OBJ_apm_battery_life,