Tue Oct 27 15:29:33 2009 UTC ()
* Fix build problem on Linux 2.6 and later.
* Fix module's version was still "0.4.1".

Bump PKGREVISION.


(taca)
diff -r1.15 -r1.16 pkgsrc/sysutils/ruby-quota/Makefile
diff -r1.9 -r1.10 pkgsrc/sysutils/ruby-quota/distinfo
diff -r1.1 -r1.2 pkgsrc/sysutils/ruby-quota/patches/patch-aa
diff -r1.4 -r1.5 pkgsrc/sysutils/ruby-quota/patches/patch-ab

cvs diff -r1.15 -r1.16 pkgsrc/sysutils/ruby-quota/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/ruby-quota/Makefile 2009/02/15 03:37:35 1.15
+++ pkgsrc/sysutils/ruby-quota/Makefile 2009/10/27 15:29:32 1.16
@@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
1# $NetBSD: Makefile,v 1.15 2009/02/15 03:37:35 taca Exp $ 1# $NetBSD: Makefile,v 1.16 2009/10/27 15:29:32 taca Exp $
2# 2#
3 3
4DISTNAME= ruby-quota-0.5.1 4DISTNAME= ruby-quota-0.5.1
5PKGNAME= ${RUBY_PKGPREFIX}-quota-0.5.1 5PKGNAME= ${RUBY_PKGPREFIX}-quota-0.5.1
6PKGREVISION= 6 6PKGREVISION= 7
7CATEGORIES= sysutils ruby 7CATEGORIES= sysutils ruby
8MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ruby-quota/} 8MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ruby-quota/}
9 9
10MAINTAINER= taca@NetBSD.org 10MAINTAINER= taca@NetBSD.org
11HOMEPAGE= http://sourceforge.net/projects/ruby-quota/ 11HOMEPAGE= http://sourceforge.net/projects/ruby-quota/
12COMMENT= Quota interface for Ruby 12COMMENT= Quota interface for Ruby
 13LICENSE= modified-bsd
13 14
14RUBY_HAS_ARCHLIB= yes 15RUBY_HAS_ARCHLIB= yes
15USE_RUBY_EXTCONF= yes 16USE_RUBY_EXTCONF= yes
16INSTALL_TARGET= site-install 17INSTALL_TARGET= site-install
17INSTALLATION_DIRS= ${RUBY_VENDORLIB} ${RUBY_DOC}/quota 18INSTALLATION_DIRS= ${RUBY_VENDORLIB} ${RUBY_DOC}/quota
18PKG_DESTDIR_SUPPORT= destdir 19PKG_DESTDIR_SUPPORT= destdir
19 20
20DOCS= ChangeLog README 21DOCS= ChangeLog README
21 22
22post-install: 23post-install:
23.for f in ${DOCS} 24.for f in ${DOCS}
24 ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}/quota 25 ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}/quota
25.endfor 26.endfor

cvs diff -r1.9 -r1.10 pkgsrc/sysutils/ruby-quota/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/ruby-quota/distinfo 2006/09/24 15:40:38 1.9
+++ pkgsrc/sysutils/ruby-quota/distinfo 2009/10/27 15:29:32 1.10
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.9 2006/09/24 15:40:38 joerg Exp $ 1$NetBSD: distinfo,v 1.10 2009/10/27 15:29:32 taca Exp $
2 2
3SHA1 (ruby-quota-0.5.1.tar.gz) = 9edf6054c465af80d7a3534b8fed89fbafc01ec1 3SHA1 (ruby-quota-0.5.1.tar.gz) = 9edf6054c465af80d7a3534b8fed89fbafc01ec1
4RMD160 (ruby-quota-0.5.1.tar.gz) = 85189827a256d0cfeaa0e755db37b85c625c18df 4RMD160 (ruby-quota-0.5.1.tar.gz) = 85189827a256d0cfeaa0e755db37b85c625c18df
5Size (ruby-quota-0.5.1.tar.gz) = 5110 bytes 5Size (ruby-quota-0.5.1.tar.gz) = 5110 bytes
6SHA1 (patch-aa) = 354277b1f3e174d7de742d965c0b788ec04350a8 6SHA1 (patch-aa) = 651521b6e9945320623f9c8abff27b705bb476b6
7SHA1 (patch-ab) = 061755cac0cbed45ed05157cd646c2746f30b71c 7SHA1 (patch-ab) = ffabc13dbc6fb6744daa3d49478f42847c941f81

cvs diff -r1.1 -r1.2 pkgsrc/sysutils/ruby-quota/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/sysutils/ruby-quota/patches/patch-aa 2004/11/28 04:21:42 1.1
+++ pkgsrc/sysutils/ruby-quota/patches/patch-aa 2009/10/27 15:29:33 1.2
@@ -1,11 +1,20 @@ @@ -1,11 +1,20 @@
1$NetBSD: patch-aa,v 1.1 2004/11/28 04:21:42 taca Exp $ 1$NetBSD: patch-aa,v 1.2 2009/10/27 15:29:33 taca Exp $
2 2
3--- extconf.rb.orig 2002-03-21 03:09:14.000000000 +0900 3--- extconf.rb.orig 2002-03-21 03:09:14.000000000 +0900
4+++ extconf.rb 4+++ extconf.rb
5@@ -16,5 +16,6 @@ have_header("sys/fs/ufs_quota.h") # for 5@@ -7,6 +7,8 @@
 6
 7 require "mkmf"
 8
 9+have_header("unistd.h")
 10+
 11 have_header("linux/quota.h") # for linux
 12 have_header("linux/types.h")
 13 have_header("sys/quota.h")
 14@@ -16,5 +18,6 @@ have_header("sys/fs/ufs_quota.h") # for
6  15
7 have_header("ufs/ufs/quota.h") # for *bsd 16 have_header("ufs/ufs/quota.h") # for *bsd
8 have_header("sys/ucred.h") # required by FreeBSD and NetBSD 17 have_header("sys/ucred.h") # required by FreeBSD and NetBSD
9+have_header("sys/statvfs.h") # required by NetBSD 18+have_header("sys/statvfs.h") # required by NetBSD
10  19
11 create_makefile("quota") 20 create_makefile("quota")

cvs diff -r1.4 -r1.5 pkgsrc/sysutils/ruby-quota/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/sysutils/ruby-quota/patches/patch-ab 2006/09/24 15:40:38 1.4
+++ pkgsrc/sysutils/ruby-quota/patches/patch-ab 2009/10/27 15:29:33 1.5
@@ -1,47 +1,110 @@ @@ -1,47 +1,110 @@
1$NetBSD: patch-ab,v 1.4 2006/09/24 15:40:38 joerg Exp $ 1$NetBSD: patch-ab,v 1.5 2009/10/27 15:29:33 taca Exp $
2 2
3--- quota.c.orig 2002-03-30 14:59:12.000000000 +0000 3--- quota.c.orig 2002-03-30 23:59:12.000000000 +0900
4+++ quota.c 4+++ quota.c
5@@ -51,6 +51,12 @@ 5@@ -5,9 +5,13 @@
 6
 7 #include "ruby.h"
 8
 9-#define RUBY_QUOTA_VERSION "0.4.1"
 10+#define RUBY_QUOTA_VERSION "0.5.1"
 11
 12-#ifdef HAVE_LINUX_QUOTA_H /* for linux-2.4.x */
 13+#ifdef HAVE_UNISTD_H
 14+#include <unistd.h>
 15+#endif
 16+
 17+#ifdef HAVE_LINUX_QUOTA_H /* for linux */
 18 # define USE_LINUX_QUOTA
 19 #endif
 20 #ifdef HAVE_SYS_FS_UFS_QUOTA_H /* for Solaris-2.6,7,8 */
 21@@ -29,10 +33,16 @@
 22 # include <sys/quota.h>
 23 #endif
 24 #include <linux/version.h>
 25-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 26+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 27+# define USE_LINUX_QUOTA_26
 28+# define qid_t uid_t
 29+# define dqblk if_dqblk
 30+#else
 31+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 32 # define USE_LINUX_QUOTA_24
 33 # define uid_t qid_t
 34 # define dqblk disk_dqblk
 35+# endif
 36 #endif
 37 #endif
 38
 39@@ -51,6 +61,12 @@
6 #if defined(SYS_UCRED_H) 40 #if defined(SYS_UCRED_H)
7 # include <sys/ucred.h> /* required by NetBSD,FreeBSD */ 41 # include <sys/ucred.h> /* required by NetBSD,FreeBSD */
8 #endif 42 #endif
9+#if defined(__DragonFly__) 43+#if defined(__DragonFly__)
10+# include <sys/param.h> 44+# include <sys/param.h>
11+# if __DragonFly_version >= 160000 45+# if __DragonFly_version >= 160000
12+# define dqblk ufs_dqblk 46+# define dqblk ufs_dqblk
13+# endif 47+# endif
14+#endif 48+#endif
15 #endif 49 #endif
16  50
17 static VALUE rb_mQuota; 51 static VALUE rb_mQuota;
18@@ -159,7 +165,11 @@ rb_quotactl(int cmd, char *dev, VALUE vu 52@@ -159,7 +175,11 @@ rb_quotactl(int cmd, char *dev, VALUE vu
19 char *path; 53 char *path;
20 int is_gid; 54 int is_gid;
21 uid_t uid; 55 uid_t uid;
22+#if defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__) 56+#if defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__)
23+ struct statvfs *buff; 57+ struct statvfs *buff;
24+#else 58+#else
25 struct statfs *buff; 59 struct statfs *buff;
26+#endif 60+#endif
27 int i, count, ret; 61 int i, count, ret;
28  62
29 buff = 0; 63 buff = 0;
30@@ -187,12 +197,16 @@ rb_quotactl(int cmd, char *dev, VALUE vu 64@@ -187,12 +207,16 @@ rb_quotactl(int cmd, char *dev, VALUE vu
31 static int 65 static int
32 rb_quotactl(int cmd, char *dev, VALUE vuid, caddr_t addr) 66 rb_quotactl(int cmd, char *dev, VALUE vuid, caddr_t addr)
33 { 67 {
34- struct quotctl qctl = {cmd, uid, addr}; 68- struct quotctl qctl = {cmd, uid, addr};
35+ struct quotctl qctl; 69+ struct quotctl qctl;
36 int fd; 70 int fd;
37 uid_t uid; 71 uid_t uid;
38  72
39 get_uid(vuid, &uid, 0); 73 get_uid(vuid, &uid, 0);
40  74
41+ qctl.op = cmd; 75+ qctl.op = cmd;
42+ qctl.uid = uid; 76+ qctl.uid = uid;
43+ qctl.addr = addr; 77+ qctl.addr = addr;
44+ 78+
45 switch( cmd ){ 79 switch( cmd ){
46 case Q_QUOTAON: 80 case Q_QUOTAON:
47 case Q_QUOTAOFF: 81 case Q_QUOTAOFF:
 82@@ -235,7 +259,9 @@ rb_diskquota_get(VALUE dqb, struct dqblk
 83 #if defined(USE_LINUX_QUOTA)
 84 c_dqb->dqb_bhardlimit = GetMember("bhardlimit");
 85 c_dqb->dqb_bsoftlimit = GetMember("bsoftlimit");
 86-#if !defined(USE_LINUX_QUOTA_24)
 87+#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
 88+ c_dqb->dqb_curspace = GetMember("curspace");
 89+#else
 90 c_dqb->dqb_curblocks = GetMember("curblocks");
 91 #endif
 92 c_dqb->dqb_ihardlimit = GetMember("ihardlimit");
 93@@ -274,7 +300,7 @@ rb_diskquota_new(struct dqblk *c_dqb)
 94 dqb = rb_struct_new(rb_sDiskQuota,
 95 UINT2NUM(c_dqb->dqb_bhardlimit),
 96 UINT2NUM(c_dqb->dqb_bsoftlimit),
 97-#if defined(USE_LINUX_QUOTA_24)
 98+#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
 99 UINT2NUM(c_dqb->dqb_curspace),
 100 #else
 101 UINT2NUM(c_dqb->dqb_curblocks),
 102@@ -454,7 +480,7 @@ Init_quota()
 103 DQ_ALIAS(fsoftlimit=, isoftlimit=);
 104 DQ_ALIAS(curfiles=, curinodes=);
 105 DQ_ALIAS(ftimelimit=, itimelimit=);
 106-#if defined(USE_LINUX_QUOTA_24)
 107+#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
 108 DQ_ALIAS(curspace, curblocks);
 109 DQ_ALIAS(curspace=, curblocks=);
 110 #endif