aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/e17-module-uptime
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2010-12-14 07:30:56 +0000
committerStanislav Sedov <stas@FreeBSD.org>2010-12-14 07:30:56 +0000
commit4e6b9d37ad988e5ce212eb64d3da6c89f036995b (patch)
treec034200ad770d5a81c162443b728bd36b7987a9c /x11-wm/e17-module-uptime
parent32d827c027cde0f59dfae87babbc1499241115ab (diff)
Notes
Diffstat (limited to 'x11-wm/e17-module-uptime')
-rw-r--r--x11-wm/e17-module-uptime/Makefile18
-rw-r--r--x11-wm/e17-module-uptime/distinfo5
-rw-r--r--x11-wm/e17-module-uptime/files/extra::e_mod_main.c58
-rw-r--r--x11-wm/e17-module-uptime/files/patch-src_e_mod_main.c63
-rw-r--r--x11-wm/e17-module-uptime/pkg-plist85
5 files changed, 139 insertions, 90 deletions
diff --git a/x11-wm/e17-module-uptime/Makefile b/x11-wm/e17-module-uptime/Makefile
index 94103cfa8911..2fb960fdedc1 100644
--- a/x11-wm/e17-module-uptime/Makefile
+++ b/x11-wm/e17-module-uptime/Makefile
@@ -6,31 +6,27 @@
#
PORTNAME= uptime
-PORTVERSION= 20080223
-PORTREVISION= 5
-CATEGORIES= x11-wm
-MASTER_SITES= ftp://ftp.springdaemons.com/pub/snapshots/e17/
+PORTVERSION= 20101003
+CATEGORIES= x11-wm enlightenment
+MASTER_SITES= http://files.roorback.net/e17/2010-10-03/modules/
PKGNAMEPREFIX= e17-module-
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= stas@FreeBSD.org
COMMENT= An e17 uptime and load average indicator module
-BUILD_DEPENDS= enlightenment-config:${PORTSDIR}/x11-wm/enlightenment
-RUN_DEPENDS= enlightenment-config:${PORTSDIR}/x11-wm/enlightenment
+BUILD_DEPENDS= enlightenment:${PORTSDIR}/x11-wm/enlightenment
+RUN_DEPENDS= enlightenment:${PORTSDIR}/x11-wm/enlightenment
+DIST_SUBDIR= e17
GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gnometarget pkgconfig
-USE_EFL= edje
+USE_EFL= edje libtool_hack modarch_hack
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 900007
-EXTRA_PATCHES= ${FILESDIR}/extra::e_mod_main.c
-.endif
-
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
diff --git a/x11-wm/e17-module-uptime/distinfo b/x11-wm/e17-module-uptime/distinfo
index 45f29f45c564..0bd6692faa62 100644
--- a/x11-wm/e17-module-uptime/distinfo
+++ b/x11-wm/e17-module-uptime/distinfo
@@ -1,3 +1,2 @@
-MD5 (uptime-20080223.tar.bz2) = 5e9d0e8da1f42c000179f32fd5366d72
-SHA256 (uptime-20080223.tar.bz2) = 73d354196917e907aa8568981cb650407d010954454745d76018ffe0f5c92e67
-SIZE (uptime-20080223.tar.bz2) = 272634
+SHA256 (e17/uptime-20101003.tar.bz2) = ae58970b52927d5b587206fd1f6c9c5b2e8fdc45eb0ff86a7ca95c80eb8966c2
+SIZE (e17/uptime-20101003.tar.bz2) = 497628
diff --git a/x11-wm/e17-module-uptime/files/extra::e_mod_main.c b/x11-wm/e17-module-uptime/files/extra::e_mod_main.c
deleted file mode 100644
index 5c67b053ff41..000000000000
--- a/x11-wm/e17-module-uptime/files/extra::e_mod_main.c
+++ /dev/null
@@ -1,58 +0,0 @@
---- e_mod_main.c
-+++ e_mod_main.c
-@@ -4,7 +4,7 @@
- #include <stdlib.h>
- #include <stdint.h>
- #include <sys/types.h>
--#include <utmp.h>
-+#include <utmpx.h>
-
- #if TIME_WITH_SYS_TIME
- # include <sys/time.h>
-@@ -445,11 +445,7 @@
- struct timeval boottime;
- time_t now;
-
-- FILE *utmp;
-- struct timespec tp;
-- struct utmp ut;
-- char ttybuf[MAXPATHLEN];
-- struct stat st;
-+ struct utmpx *utmpstruct;
- #endif
-
- if (!inst)
-@@ -498,26 +494,15 @@
- if (ret < 0)
- warn ("getloadavg()");
- # endif
--
-- /* retrive number of active users */
-- utmp = fopen (_PATH_UTMP, "r");
-- if (utmp == NULL)
-- inst->nusers = -1;
-- else
-+ inst->nusers = 0;
-+ setutxent ();
-+ while ((utmpstruct = getutxent ()))
- {
-- for (inst->nusers = 0; fread (&ut, sizeof (ut), 1, utmp);)
-- {
-- if (ut.ut_name[0] == '\0')
-- continue;
-- (void) snprintf (ttybuf, sizeof (ttybuf), "%s%.*s", _PATH_DEV,
-- UT_LINESIZE, ut.ut_line);
-- if (stat (ttybuf, &st) != 0)
-- continue; /* broken record */
--
-- inst->nusers++;
-- }
-- fclose (utmp);
-+ if ((utmpstruct->ut_type == USER_PROCESS) &&
-+ (utmpstruct->ut_user[0] != '\0'))
-+ inst->nusers++;
- }
-+ endutxent ();
- #else /* unsupported */
- inst->uptime = -1;
- inst->nusers = -1;
diff --git a/x11-wm/e17-module-uptime/files/patch-src_e_mod_main.c b/x11-wm/e17-module-uptime/files/patch-src_e_mod_main.c
new file mode 100644
index 000000000000..08e57c47e9c1
--- /dev/null
+++ b/x11-wm/e17-module-uptime/files/patch-src_e_mod_main.c
@@ -0,0 +1,63 @@
+--- src/e_mod_main.c.orig 2010-12-13 22:26:02.000000000 -0800
++++ src/e_mod_main.c 2010-12-13 22:31:44.000000000 -0800
+@@ -4,7 +4,17 @@
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <sys/types.h>
++#if defined(__FreeBSD__)
++#include <sys/param.h>
++#if __FreeBSD_version >= 900007
++#define USE_UTMPX
++#endif
++#endif
++#if defined(USE_UTMPX)
++#include <utmpx.h>
++#else
+ #include <utmp.h>
++#endif
+
+ #if TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+@@ -434,12 +444,16 @@
+ struct timeval boottime;
+ time_t now;
+
++#if defined(USE_UTMPX)
++ struct utmpx *utmpstruct;
++#else
+ FILE *utmp;
+ struct timespec tp;
+ struct utmp ut;
+ char ttybuf[MAXPATHLEN];
+ struct stat st;
+ #endif
++#endif
+
+ if (!inst) return;
+
+@@ -487,6 +501,17 @@
+ # endif
+
+ /* retrive number of active users */
++#if defined(USE_UTMPX)
++ inst->nusers = 0;
++ setutxent ();
++ while ((utmpstruct = getutxent ()))
++ {
++ if ((utmpstruct->ut_type == USER_PROCESS) &&
++ (utmpstruct->ut_user[0] != '\0'))
++ inst->nusers++;
++ }
++ endutxent ();
++#else
+ utmp = fopen (_PATH_UTMP, "r");
+ if (!utmp)
+ inst->nusers = -1;
+@@ -504,6 +529,7 @@
+ }
+ fclose (utmp);
+ }
++#endif
+ #else /* unsupported */
+ inst->uptime = -1;
+ inst->nusers = -1;
diff --git a/x11-wm/e17-module-uptime/pkg-plist b/x11-wm/e17-module-uptime/pkg-plist
index af2dfdfb44aa..50db1e021a16 100644
--- a/x11-wm/e17-module-uptime/pkg-plist
+++ b/x11-wm/e17-module-uptime/pkg-plist
@@ -1,30 +1,79 @@
-lib/enlightenment/modules/uptime/%%E17_ARCH%%/module.a
-lib/enlightenment/modules/uptime/%%E17_ARCH%%/module.la
-lib/enlightenment/modules/uptime/%%E17_ARCH%%/module.so
-lib/enlightenment/modules/uptime/module.desktop
-lib/enlightenment/modules/uptime/uptime.edj
lib/enlightenment/modules/uptime/e-module-uptime.edj
+lib/enlightenment/modules/uptime/uptime.edj
+lib/enlightenment/modules/uptime/module.desktop
+lib/enlightenment/modules/uptime/%%E17_ARCH%%/module.so
+%%NLS%%lib/enlightenment/modules/uptime/locale/fr/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/nl/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/cs/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/zh_CN/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/he/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/lt/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/pl/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/es/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/hu/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/nb/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/hr/LC_MESSAGES/uptime.mo
%%NLS%%lib/enlightenment/modules/uptime/locale/bg/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/sk/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/tr/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/it/LC_MESSAGES/uptime.mo
%%NLS%%lib/enlightenment/modules/uptime/locale/eo/LC_MESSAGES/uptime.mo
%%NLS%%lib/enlightenment/modules/uptime/locale/fi/LC_MESSAGES/uptime.mo
-%%NLS%%lib/enlightenment/modules/uptime/locale/fr/LC_MESSAGES/uptime.mo
-%%NLS%%lib/enlightenment/modules/uptime/locale/it/LC_MESSAGES/uptime.mo
-%%NLS%%lib/enlightenment/modules/uptime/locale/ja/LC_MESSAGES/uptime.mo
%%NLS%%lib/enlightenment/modules/uptime/locale/sv/LC_MESSAGES/uptime.mo
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/bg/LC_MESSAGES
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/bg
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/eo/LC_MESSAGES
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/eo
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fi/LC_MESSAGES
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fi
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fr/LC_MESSAGES
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fr
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/it/LC_MESSAGES
-%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/it
+%%NLS%%lib/enlightenment/modules/uptime/locale/pt/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/ru/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/de/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/ja/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/uk/LC_MESSAGES/uptime.mo
+%%NLS%%lib/enlightenment/modules/uptime/locale/el/LC_MESSAGES/uptime.mo
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/el/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/el
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/uk/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/uk
%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/ja/LC_MESSAGES
%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/ja
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/de/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/de
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/ru/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/ru
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/pt/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/pt
%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/sv/LC_MESSAGES
%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/sv
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fi/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fi
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/eo/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/eo
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/it/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/it
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/tr/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/tr
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/sk/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/sk
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/bg/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/bg
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/hr/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/hr
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/nb/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/nb
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/hu/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/hu
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/es/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/es
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/pl/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/pl
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/lt/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/lt
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/he/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/he
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/zh_CN/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/zh_CN
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/cs/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/cs
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/nl/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/nl
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fr/LC_MESSAGES
+%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale/fr
%%NLS%%@dirrm lib/enlightenment/modules/uptime/locale
@dirrm lib/enlightenment/modules/uptime/%%E17_ARCH%%
@dirrm lib/enlightenment/modules/uptime