summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-04-22 15:01:07 +0000
committertaca <taca@pkgsrc.org>2010-04-22 15:01:07 +0000
commitdbbd40e690a956b15ee042932f6c780975bb70e4 (patch)
tree9c394a0bf0122fab984887829e6f491aaaede181 /sysutils
parent93ddfb60eb28ece8326d560da237bb3f1ee00de9 (diff)
downloadpkgsrc-dbbd40e690a956b15ee042932f6c780975bb70e4.tar.gz
Make ruby-quota really usable on Linux.
It wasn't considered about member of struct dqblk, unsigned 64bit integer. Bump PKG_REVISION.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ruby-quota/Makefile4
-rw-r--r--sysutils/ruby-quota/distinfo4
-rw-r--r--sysutils/ruby-quota/patches/patch-ab52
3 files changed, 48 insertions, 12 deletions
diff --git a/sysutils/ruby-quota/Makefile b/sysutils/ruby-quota/Makefile
index 02542978b1f..290da6de357 100644
--- a/sysutils/ruby-quota/Makefile
+++ b/sysutils/ruby-quota/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.18 2010/04/21 05:34:31 taca Exp $
+# $NetBSD: Makefile,v 1.19 2010/04/22 15:01:07 taca Exp $
#
DISTNAME= ruby-quota-0.5.1
PKGNAME= ${RUBY_PKGPREFIX}-quota-0.5.1
-PKGREVISION= 9
+PKGREVISION= 10
CATEGORIES= sysutils ruby
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ruby-quota/}
diff --git a/sysutils/ruby-quota/distinfo b/sysutils/ruby-quota/distinfo
index be87f7d0a8a..7fde90286a9 100644
--- a/sysutils/ruby-quota/distinfo
+++ b/sysutils/ruby-quota/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.12 2010/04/21 05:34:31 taca Exp $
+$NetBSD: distinfo,v 1.13 2010/04/22 15:01:07 taca Exp $
SHA1 (ruby-quota-0.5.1.tar.gz) = 9edf6054c465af80d7a3534b8fed89fbafc01ec1
RMD160 (ruby-quota-0.5.1.tar.gz) = 85189827a256d0cfeaa0e755db37b85c625c18df
Size (ruby-quota-0.5.1.tar.gz) = 5110 bytes
SHA1 (patch-aa) = 651521b6e9945320623f9c8abff27b705bb476b6
-SHA1 (patch-ab) = 6a7556f7fbd3e793ee83962f228ad86dcd301374
+SHA1 (patch-ab) = bde356be41b8619ad9743b8e0434a977cc3bbe15
diff --git a/sysutils/ruby-quota/patches/patch-ab b/sysutils/ruby-quota/patches/patch-ab
index f572a3d6c25..2b445210b6f 100644
--- a/sysutils/ruby-quota/patches/patch-ab
+++ b/sysutils/ruby-quota/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.7 2010/04/21 05:34:31 taca Exp $
+$NetBSD: patch-ab,v 1.8 2010/04/22 15:01:07 taca Exp $
--- quota.c.orig 2002-03-30 14:59:12.000000000 +0000
+++ quota.c
@@ -87,7 +87,18 @@ $NetBSD: patch-ab,v 1.7 2010/04/21 05:34:31 taca Exp $
switch( cmd ){
case Q_QUOTAON:
case Q_QUOTAOFF:
-@@ -235,7 +258,9 @@ rb_diskquota_get(VALUE dqb, struct dqblk
+@@ -230,12 +253,20 @@ rb_diskquota_get(VALUE dqb, struct dqblk
+ {
+ VALUE v;
+
++#if defined(USE_LINUX_QUOTA) && \
++ (defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26))
++#define GetMember(mem) \
++ ((v = rb_struct_getmember(dqb,rb_intern(mem))) == Qnil) ? 0 : (NUM2ULL(v))
++#else
+ #define GetMember(mem) \
+ ((v = rb_struct_getmember(dqb,rb_intern(mem))) == Qnil) ? 0 : (NUM2UINT(v))
++#endif
#if defined(USE_LINUX_QUOTA)
c_dqb->dqb_bhardlimit = GetMember("bhardlimit");
c_dqb->dqb_bsoftlimit = GetMember("bsoftlimit");
@@ -98,16 +109,41 @@ $NetBSD: patch-ab,v 1.7 2010/04/21 05:34:31 taca Exp $
c_dqb->dqb_curblocks = GetMember("curblocks");
#endif
c_dqb->dqb_ihardlimit = GetMember("ihardlimit");
-@@ -274,7 +299,7 @@ rb_diskquota_new(struct dqblk *c_dqb)
+@@ -271,20 +302,29 @@ rb_diskquota_new(struct dqblk *c_dqb)
+ VALUE dqb;
+
+ #if defined(USE_LINUX_QUOTA)
++#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
++ dqb = rb_struct_new(rb_sDiskQuota,
++ ULL2NUM(c_dqb->dqb_bhardlimit),
++ ULL2NUM(c_dqb->dqb_bsoftlimit),
++ ULL2NUM(c_dqb->dqb_curspace),
++ ULL2NUM(c_dqb->dqb_ihardlimit),
++ ULL2NUM(c_dqb->dqb_isoftlimit),
++ ULL2NUM(c_dqb->dqb_curinodes),
++ ULL2NUM(c_dqb->dqb_btime),
++ ULL2NUM(c_dqb->dqb_itime),
++ 0);
++#else
dqb = rb_struct_new(rb_sDiskQuota,
UINT2NUM(c_dqb->dqb_bhardlimit),
UINT2NUM(c_dqb->dqb_bsoftlimit),
-#if defined(USE_LINUX_QUOTA_24)
-+#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
- UINT2NUM(c_dqb->dqb_curspace),
- #else
+- UINT2NUM(c_dqb->dqb_curspace),
+-#else
UINT2NUM(c_dqb->dqb_curblocks),
-@@ -442,7 +467,7 @@ Init_quota()
+-#endif
+ UINT2NUM(c_dqb->dqb_ihardlimit),
+ UINT2NUM(c_dqb->dqb_isoftlimit),
+ UINT2NUM(c_dqb->dqb_curinodes),
+ UINT2NUM(c_dqb->dqb_btime),
+ UINT2NUM(c_dqb->dqb_itime),
+ 0);
++#endif
+ #elif defined(USE_BSD_QUOTA)
+ dqb = rb_struct_new(rb_sDiskQuota,
+ UINT2NUM(c_dqb->dqb_bhardlimit),
+@@ -442,7 +482,7 @@ Init_quota()
"curinodes",
"btimelimit",
"itimelimit",
@@ -116,7 +152,7 @@ $NetBSD: patch-ab,v 1.7 2010/04/21 05:34:31 taca Exp $
/* for compatibility */
#define DQ_ALIAS(a,b) rb_alias(rb_sDiskQuota,rb_intern(#a),rb_intern(#b))
-@@ -454,7 +479,7 @@ Init_quota()
+@@ -454,7 +494,7 @@ Init_quota()
DQ_ALIAS(fsoftlimit=, isoftlimit=);
DQ_ALIAS(curfiles=, curinodes=);
DQ_ALIAS(ftimelimit=, itimelimit=);