aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2010-10-06 13:58:11 +0800
committersunpoet <sunpoet@FreeBSD.org>2010-10-06 13:58:11 +0800
commit26c9617246cb214fc93627f33296368a7e03f254 (patch)
treecc5376b4cce5783f9967f56831b559b2b566bb5e
parent754f406bb9d88b93cdeb4ef164036da2f1f586ec (diff)
downloadfreebsd-ports-gnome-26c9617246cb214fc93627f33296368a7e03f254.tar.gz
freebsd-ports-gnome-26c9617246cb214fc93627f33296368a7e03f254.tar.zst
freebsd-ports-gnome-26c9617246cb214fc93627f33296368a7e03f254.zip
- Add NLS option
- Add LICENSE - Pass maintainership to submitter - Update to 22.13 while I'm here PR: ports/146709 Submitted by: Douglas William Thrift <douglas at douglasthrift.net> (new maintainer) Approved by: sunpoet (myself, maintainer), pgollucci (mentor)
-rw-r--r--sysutils/psmisc/Makefile28
-rw-r--r--sysutils/psmisc/distinfo6
-rw-r--r--sysutils/psmisc/files/patch-src-Makefile.in61
-rw-r--r--sysutils/psmisc/files/patch-src-pstree.c52
-rw-r--r--sysutils/psmisc/pkg-plist28
5 files changed, 125 insertions, 50 deletions
diff --git a/sysutils/psmisc/Makefile b/sysutils/psmisc/Makefile
index c5ca22925b9c..91bd75e8da1f 100644
--- a/sysutils/psmisc/Makefile
+++ b/sysutils/psmisc/Makefile
@@ -6,21 +6,39 @@
#
PORTNAME= psmisc
-PORTVERSION= 22.12
+PORTVERSION= 22.13
CATEGORIES= sysutils
-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/
-MAINTAINER= sunpoet@FreeBSD.org
+MAINTAINER= douglas@douglasthrift.net
COMMENT= A port of the Linux pstree, killall and pidof commands
+BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
+
CONFLICTS= pidof-[0-9]* pstree-2.[0-9]*
-CONFIGURE_ARGS= --disable-nls
+LICENSE= GPLv2
+
GNU_CONFIGURE= yes
USE_GMAKE= yes
+OPTIONS= NLS "Native Language Support via gettext utilities" on
+
+.include <bsd.port.options.mk>
+
MAN1= killall.1 pstree.1
-PLIST_FILES= bin/killall bin/pidof bin/pstree bin/pstree.x11
+
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS= --disable-nls
+PLIST_SUB+= NLS="@comment "
+.else
+USE_GETTEXT= yes
+CONFIGURE_ARGS= --enable-nls
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+PLIST_SUB+= NLS=""
+.endif
post-patch:
@${REINPLACE_CMD} -e '/^#define COMM_LEN / s|16|254|' ${WRKSRC}/src/comm.h
diff --git a/sysutils/psmisc/distinfo b/sysutils/psmisc/distinfo
index d8f0adfab377..ea333b2091be 100644
--- a/sysutils/psmisc/distinfo
+++ b/sysutils/psmisc/distinfo
@@ -1,3 +1,3 @@
-MD5 (psmisc-22.12.tar.gz) = 16c83a351c292cfc845b27d6395e05fb
-SHA256 (psmisc-22.12.tar.gz) = ba2f41a501da6137b2d94e54e855bea8246f65167c613d3990bd0ce49e996a7a
-SIZE (psmisc-22.12.tar.gz) = 374354
+MD5 (psmisc-22.13.tar.gz) = e2c339e6b65b730042084023784a729e
+SHA256 (psmisc-22.13.tar.gz) = 06d25e8ebb4722dbcede98a787c39a9ed341f8e58fde10c0b2d6b35990b35daa
+SIZE (psmisc-22.13.tar.gz) = 382389
diff --git a/sysutils/psmisc/files/patch-src-Makefile.in b/sysutils/psmisc/files/patch-src-Makefile.in
index a750eb1673a4..8a2a1837da20 100644
--- a/sysutils/psmisc/files/patch-src-Makefile.in
+++ b/sysutils/psmisc/files/patch-src-Makefile.in
@@ -1,5 +1,5 @@
---- src/Makefile.in.orig 2010-07-12 19:38:08.000000000 +0800
-+++ src/Makefile.in 2010-07-31 18:58:38.000000000 +0800
+--- src/Makefile.in.orig 2010-07-12 04:38:08.000000000 -0700
++++ src/Makefile.in 2010-08-11 23:39:30.652095791 -0700
@@ -34,8 +34,8 @@
POST_UNINSTALL = :
build_triplet = @build@
@@ -37,32 +37,37 @@
prtstat_SOURCES = prtstat.c prtstat.h
BUILT_SOURCES = signames.h
EXTRA_DIST = signames.c
-@@ -545,14 +543,20 @@
-
+@@ -299,19 +297,19 @@
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ fuser$(EXEEXT): $(fuser_OBJECTS) $(fuser_DEPENDENCIES)
+ @rm -f fuser$(EXEEXT)
+- $(LINK) $(fuser_OBJECTS) $(fuser_LDADD) $(LIBS)
++ $(LINK) $(fuser_OBJECTS) $(fuser_LDADD) $(LIBS) $(INTLLIBS)
+ killall$(EXEEXT): $(killall_OBJECTS) $(killall_DEPENDENCIES)
+ @rm -f killall$(EXEEXT)
+- $(LINK) $(killall_OBJECTS) $(killall_LDADD) $(LIBS)
++ $(LINK) $(killall_OBJECTS) $(killall_LDADD) $(LIBS) $(INTLLIBS)
+ peekfd$(EXEEXT): $(peekfd_OBJECTS) $(peekfd_DEPENDENCIES)
+ @rm -f peekfd$(EXEEXT)
+- $(LINK) $(peekfd_OBJECTS) $(peekfd_LDADD) $(LIBS)
++ $(LINK) $(peekfd_OBJECTS) $(peekfd_LDADD) $(LIBS) $(INTLLIBS)
+ prtstat$(EXEEXT): $(prtstat_OBJECTS) $(prtstat_DEPENDENCIES)
+ @rm -f prtstat$(EXEEXT)
+- $(LINK) $(prtstat_OBJECTS) $(prtstat_LDADD) $(LIBS)
++ $(LINK) $(prtstat_OBJECTS) $(prtstat_LDADD) $(LIBS) $(INTLLIBS)
+ pstree$(EXEEXT): $(pstree_OBJECTS) $(pstree_DEPENDENCIES)
+ @rm -f pstree$(EXEEXT)
+- $(LINK) $(pstree_OBJECTS) $(pstree_LDADD) $(LIBS)
++ $(LINK) $(pstree_OBJECTS) $(pstree_LDADD) $(LIBS) $(INTLLIBS)
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -547,7 +545,7 @@
signames.h: signames.c Makefile
-- export LC_ALL=C ; \
-- @CPP@ -dM $< |\
+ export LC_ALL=C ; \
+ @CPP@ -dM $< |\
- tr -s '\t ' ' ' | sort -n -k 3 | sed \
-- 's:#define SIG\([A-Z]\+[0-9]*\) \([0-9]\+\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
-- grep -v '[0-9][0-9][0-9]' >signames.h || \
-- { rm -f signames.h; exit 1; }
-- grep '^{ 1,"HUP" },$$' signames.h >/dev/null || \
-- { rm -f signames.h; exit 1; }
-+ @CPP@ -dM $< | {\
-+ signames=`kill -l | tr a-z A-Z`; \
-+ while read define name value; do \
-+ [ "$$define" = '#define' ] || continue; \
-+ case "$$value" in \
-+ *[!0-9]*) continue; \
-+ esac; \
-+ for signame in $$signames; do \
-+ if [ "$$name" = "SIG$$signame" ]; then \
-+ echo "{ $$value, \"$$signame\" },"; \
-+ fi; \
-+ done; \
-+ done; \
-+ } | sort -n -k 2 > signames.h
-
- install-exec-hook:
- cd $(DESTDIR)$(bindir) && \
++ tr -s '\t ' ' ' | sort -n -k 3 | gsed \
+ 's:#define SIG\([A-Z]\+[0-9]*\) \([0-9]\+\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
+ grep -v '[0-9][0-9][0-9]' >signames.h || \
+ { rm -f signames.h; exit 1; }
diff --git a/sysutils/psmisc/files/patch-src-pstree.c b/sysutils/psmisc/files/patch-src-pstree.c
index 5759cff4a134..c8005758f0a6 100644
--- a/sysutils/psmisc/files/patch-src-pstree.c
+++ b/sysutils/psmisc/files/patch-src-pstree.c
@@ -1,14 +1,16 @@
--- src/pstree.c.orig 2009-12-27 15:46:47.000000000 +0900
+++ src/pstree.c 2010-01-03 00:52:21.437862505 +0900
-@@ -37,6 +37,7 @@
+@@ -37,6 +37,9 @@
#include <term.h>
#include <termios.h>
#include <langinfo.h>
++#ifdef __FreeBSD__
+#include <limits.h>
++#endif
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
-@@ -590,7 +591,11 @@
+@@ -590,7 +594,11 @@
struct dirent *de;
FILE *file;
struct stat st;
@@ -20,31 +22,53 @@
char *buffer;
size_t buffer_size;
char readbuf[BUFSIZ + 1];
-@@ -623,7 +628,7 @@
+@@ -623,7 +631,11 @@
if ((pid = (pid_t) atoi(de->d_name)) != 0) {
if (! (path = malloc(strlen(PROC_BASE) + strlen(de->d_name) + 10)))
exit(2);
-- sprintf(path, "%s/%d/stat", PROC_BASE, pid);
++#ifdef __FreeBSD__
+ sprintf(path, "%s/%d/status", PROC_BASE, pid);
++#else
+ sprintf(path, "%s/%d/stat", PROC_BASE, pid);
++#endif
if ((file = fopen(path, "r")) != NULL) {
empty = 0;
sprintf(path, "%s/%d", PROC_BASE, pid);
-@@ -638,6 +643,10 @@
+@@ -638,6 +650,29 @@
perror(path);
exit(1);
}
+#ifdef __FreeBSD__
-+ if (fscanf(file, "%s %*d %d", comm, &ppid) == 2)
-+ add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0);
++ /* Read comm and ppid */
++ if (fscanf(file, "%s %*d %d", readbuf, &ppid) == 2) {
++ tmpptr = readbuf;
++ size = 0;
++ /* Unescape comm */
++ do {
++ if (*tmpptr == '\\')
++ {
++ char tmp = tmpptr[4];
++ tmpptr[4] = 0;
++ comm[size++] = strtol(++tmpptr, NULL, 8);
++ tmpptr += 2;
++ tmpptr[1] = tmp;
++ }
++ else
++ comm[size++] = *tmpptr;
++ } while (*++tmpptr);
++ comm[size] = 0;
++ /* Balance braces */
++ {
++ {
+#else
size = fread(readbuf, 1, BUFSIZ, file);
if (ferror(file) == 0) {
readbuf[size] = 0;
-@@ -725,6 +734,7 @@
- }
- }
- }
+@@ -692,6 +727,7 @@
+ (void) closedir(taskdir);
+ }
+ free(taskpath);
+#endif /*__FreeBSD__*/
- (void) fclose(file);
- }
- free(path);
+ if (!print_args)
+ #ifdef WITH_SELINUX
+ add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0, scontext);
diff --git a/sysutils/psmisc/pkg-plist b/sysutils/psmisc/pkg-plist
new file mode 100644
index 000000000000..abd2ff344bf1
--- /dev/null
+++ b/sysutils/psmisc/pkg-plist
@@ -0,0 +1,28 @@
+@comment $FreeBSD$
+bin/killall
+bin/pidof
+bin/pstree
+bin/pstree.x11
+%%NLS%%share/locale/bg/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/de/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/el/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/eu/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/id/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/it/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/psmisc.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/psmisc.mo