aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/pydf
diff options
context:
space:
mode:
authorbeech <beech@FreeBSD.org>2012-06-14 05:15:28 +0800
committerbeech <beech@FreeBSD.org>2012-06-14 05:15:28 +0800
commit4f8e0cdabca1b1667c59a45a2e21832af20b8614 (patch)
tree148e2789a2c7a9bf1941100fc57404a5561fe793 /sysutils/pydf
parent7937bdb5ba7d17cf1bff645777492719fdbd9930 (diff)
downloadfreebsd-ports-gnome-4f8e0cdabca1b1667c59a45a2e21832af20b8614.tar.gz
freebsd-ports-gnome-4f8e0cdabca1b1667c59a45a2e21832af20b8614.tar.zst
freebsd-ports-gnome-4f8e0cdabca1b1667c59a45a2e21832af20b8614.zip
- Update to 10
- Fix portlint warning PR: ports/168373 Submitted by: koobs <koobs.freebsd@gmail.com> Approved by: Maintainer timeout (2-Weeks+)
Diffstat (limited to 'sysutils/pydf')
-rw-r--r--sysutils/pydf/Makefile4
-rw-r--r--sysutils/pydf/distinfo4
-rw-r--r--sysutils/pydf/files/patch-pydf117
3 files changed, 4 insertions, 121 deletions
diff --git a/sysutils/pydf/Makefile b/sysutils/pydf/Makefile
index 3bf6adbfd64a..d1f0c8f0723f 100644
--- a/sysutils/pydf/Makefile
+++ b/sysutils/pydf/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= pydf
-PORTVERSION= 9
+PORTVERSION= 10
CATEGORIES= sysutils
MASTER_SITES= http://kassiopeia.juls.savba.sk/~garabik/software/pydf/
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -16,8 +16,8 @@ COMMENT= A python implementation of df
LICENSE= unknown
LICENSE_NAME= Public Domain
-LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT}
LICENSE_FILE= ${WRKSRC}/COPYING
+LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT}
SUB_FILES= pkg-message
diff --git a/sysutils/pydf/distinfo b/sysutils/pydf/distinfo
index 44a6d68539b1..1a62e6b1515e 100644
--- a/sysutils/pydf/distinfo
+++ b/sysutils/pydf/distinfo
@@ -1,2 +1,2 @@
-SHA256 (pydf_9.tar.gz) = 57f0c10449b1e3c37618f145f96b150768e15fb22af9c72f628f66a3632012c0
-SIZE (pydf_9.tar.gz) = 12942
+SHA256 (pydf_10.tar.gz) = 71be682c86a352afbafcf612cbc236f6f5810d80635685869a9c9b320203e241
+SIZE (pydf_10.tar.gz) = 13430
diff --git a/sysutils/pydf/files/patch-pydf b/sysutils/pydf/files/patch-pydf
index ab27531487c5..e69de29bb2d1 100644
--- a/sysutils/pydf/files/patch-pydf
+++ b/sysutils/pydf/files/patch-pydf
@@ -1,117 +0,0 @@
---- pydf.old 2010-10-05 23:50:06.000000000 +0200
-+++ pydf 2010-10-06 00:28:36.000000000 +0200
-@@ -1,6 +1,6 @@
--#! /usr/bin/python
-+#! %%PYTHON_CMD%%
-
--import sys, os, string, subprocess, struct
-+import sys, os, string, struct
- from optparse import OptionParser
-
- from math import log
-@@ -10,6 +10,14 @@
- # will not give the same result for broken symbolic links, but who cares...
- os.path.lexists = os.path.exists
-
-+if sys.version_info < (3, 0):
-+ # getoutput() and getstatusoutput() methods have
-+ # been moved from commands to the subprocess module
-+ # with Python >= 3.x
-+ import commands as cmd
-+else:
-+ import subprocess as cmd
-+
- str_ljust = str.ljust
- str_rjust = str.rjust
- str_center = str.center
-@@ -61,7 +69,7 @@
-
-
- def get_terminal_width_resize():
-- c = subprocess.getoutput('resize').split('\n')
-+ c = cmd.getoutput('resize').split('\n')
- c = [x for x in c if x.startswith('COLUMNS=')]
- if c:
- c = c[0]
-@@ -167,7 +175,7 @@
- #end of default definitions
-
- # read configuration file
--for conffile in ["/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]:
-+for conffile in ["%%PREFIX%/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]:
- if os.path.isfile(conffile):
- exec(compile(open(conffile).read(), conffile, 'exec'))
-
-@@ -290,7 +298,7 @@
- break
- else:
- # fallback, first try to parse mount output
-- status, mout = subprocess.getstatusoutput('mount')
-+ status, mout = cmd.getstatusoutput('mount')
- if status !=0:
- return dummy_result
- mlines = mout.split('\n')
-@@ -300,11 +308,16 @@
- continue
- device, on = line.split(' on ', 1)
- device = device.split()[0]
-- onparts = on.split()
-+ onparts = on.rstrip(")").split(" (")
- on = onparts[0]
-- # option format: (a,b,..)
-- opts = onparts[-1][1:-1].split(',')
-- r[on] = (device, '', opts)
-+ l = onparts[1].split(", ")
-+ if len(l) == 2:
-+ typ, opts = l
-+ else:
-+ typ = l[0]
-+ opts = ''
-+ opts = opts.split(", ")
-+ r[on] = (device, typ, opts)
-
- if r:
- return r
-@@ -334,7 +347,11 @@
- def get_row_mp(mp):
- if mp:
- if mp in mountpoints:
-- device, fstype, opts = mountpoints[mp]
-+ if len(mountpoints[mp]) == 2:
-+ device, fstype = mountpoints[mp]
-+ opts = ''
-+ else:
-+ device, fstype, opts = mountpoints[mp]
- else:
- # oops, the mountpoint is not in /etc/mtab or equivalent
- # return dummy values
-@@ -346,9 +363,9 @@
- status = os.statvfs(mp)
- except (OSError, IOError):
- status = DumbStatus()
-- fs_blocksize = status.f_bsize
-+ fs_blocksize = status.f_frsize
- if fs_blocksize == 0:
-- fs_blocksize = status.f_frsize
-+ fs_blocksize = status.f_bsize
- free = status.f_bfree
- size = status.f_blocks
- avail = status.f_bavail
-@@ -377,7 +394,7 @@
- used_f = myformat(used, sizeformat, fs_blocksize)
- avail_f = myformat(avail, sizeformat, fs_blocksize)
- try:
-- perc = round(100.*used/size, 1)
-+ perc = round(100.*used/(avail+used), 1)
- perc_f = str(perc)
- except ZeroDivisionError:
- perc = 0
-@@ -446,7 +463,7 @@
- "test if fs (as type) is a special one"
- "in addition, a filesystem is special if it has number of blocks equal to 0"
- fs = fs.lower()
-- return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs" ]
-+ return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs", "procfs", "devfs", "linprocfs", "fdescfs" ]
-
- def get_table(mps):
- "table is a list of rows"