pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/ruby-quota * Fix build problem on Linux 2.6 a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c335d0b46c43
branches:  trunk
changeset: 400791:c335d0b46c43
user:      taca <taca%pkgsrc.org@localhost>
date:      Tue Oct 27 15:29:32 2009 +0000

description:
* Fix build problem on Linux 2.6 and later.
* Fix module's version was still "0.4.1".

Bump PKGREVISION.

diffstat:

 sysutils/ruby-quota/Makefile         |   5 +-
 sysutils/ruby-quota/distinfo         |   6 +-
 sysutils/ruby-quota/patches/patch-aa |  13 +++++-
 sysutils/ruby-quota/patches/patch-ab |  73 +++++++++++++++++++++++++++++++++--
 4 files changed, 85 insertions(+), 12 deletions(-)

diffs (159 lines):

diff -r 9e1173d35a85 -r c335d0b46c43 sysutils/ruby-quota/Makefile
--- a/sysutils/ruby-quota/Makefile      Tue Oct 27 14:50:07 2009 +0000
+++ b/sysutils/ruby-quota/Makefile      Tue Oct 27 15:29:32 2009 +0000
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile,v 1.15 2009/02/15 03:37:35 taca Exp $
+# $NetBSD: Makefile,v 1.16 2009/10/27 15:29:32 taca Exp $
 #
 
 DISTNAME=      ruby-quota-0.5.1
 PKGNAME=       ${RUBY_PKGPREFIX}-quota-0.5.1
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    sysutils ruby
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=ruby-quota/}
 
 MAINTAINER=    taca%NetBSD.org@localhost
 HOMEPAGE=      http://sourceforge.net/projects/ruby-quota/
 COMMENT=       Quota interface for Ruby
+LICENSE=       modified-bsd
 
 RUBY_HAS_ARCHLIB=      yes
 USE_RUBY_EXTCONF=      yes
diff -r 9e1173d35a85 -r c335d0b46c43 sysutils/ruby-quota/distinfo
--- a/sysutils/ruby-quota/distinfo      Tue Oct 27 14:50:07 2009 +0000
+++ b/sysutils/ruby-quota/distinfo      Tue Oct 27 15:29:32 2009 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.9 2006/09/24 15:40:38 joerg Exp $
+$NetBSD: distinfo,v 1.10 2009/10/27 15:29:32 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) = 354277b1f3e174d7de742d965c0b788ec04350a8
-SHA1 (patch-ab) = 061755cac0cbed45ed05157cd646c2746f30b71c
+SHA1 (patch-aa) = 651521b6e9945320623f9c8abff27b705bb476b6
+SHA1 (patch-ab) = ffabc13dbc6fb6744daa3d49478f42847c941f81
diff -r 9e1173d35a85 -r c335d0b46c43 sysutils/ruby-quota/patches/patch-aa
--- a/sysutils/ruby-quota/patches/patch-aa      Tue Oct 27 14:50:07 2009 +0000
+++ b/sysutils/ruby-quota/patches/patch-aa      Tue Oct 27 15:29:32 2009 +0000
@@ -1,8 +1,17 @@
-$NetBSD: patch-aa,v 1.1 2004/11/28 04:21:42 taca Exp $
+$NetBSD: patch-aa,v 1.2 2009/10/27 15:29:33 taca Exp $
 
 --- extconf.rb.orig    2002-03-21 03:09:14.000000000 +0900
 +++ extconf.rb
-@@ -16,5 +16,6 @@ have_header("sys/fs/ufs_quota.h")  # for
+@@ -7,6 +7,8 @@
+ 
+ require "mkmf"
+ 
++have_header("unistd.h")
++
+ have_header("linux/quota.h")       # for linux
+ have_header("linux/types.h")
+ have_header("sys/quota.h")
+@@ -16,5 +18,6 @@ have_header("sys/fs/ufs_quota.h")  # for
  
  have_header("ufs/ufs/quota.h")     # for *bsd
  have_header("sys/ucred.h")         # required by FreeBSD and NetBSD
diff -r 9e1173d35a85 -r c335d0b46c43 sysutils/ruby-quota/patches/patch-ab
--- a/sysutils/ruby-quota/patches/patch-ab      Tue Oct 27 14:50:07 2009 +0000
+++ b/sysutils/ruby-quota/patches/patch-ab      Tue Oct 27 15:29:32 2009 +0000
@@ -1,8 +1,42 @@
-$NetBSD: patch-ab,v 1.4 2006/09/24 15:40:38 joerg Exp $
+$NetBSD: patch-ab,v 1.5 2009/10/27 15:29:33 taca Exp $
 
---- quota.c.orig       2002-03-30 14:59:12.000000000 +0000
+--- quota.c.orig       2002-03-30 23:59:12.000000000 +0900
 +++ quota.c
-@@ -51,6 +51,12 @@
+@@ -5,9 +5,13 @@
+ 
+ #include "ruby.h"
+ 
+-#define RUBY_QUOTA_VERSION "0.4.1"
++#define RUBY_QUOTA_VERSION "0.5.1"
+ 
+-#ifdef HAVE_LINUX_QUOTA_H       /* for linux-2.4.x */
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
++#ifdef HAVE_LINUX_QUOTA_H       /* for linux */
+ # define USE_LINUX_QUOTA
+ #endif
+ #ifdef HAVE_SYS_FS_UFS_QUOTA_H  /* for Solaris-2.6,7,8 */
+@@ -29,10 +33,16 @@
+ #  include <sys/quota.h>
+ #endif
+ #include <linux/version.h>
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++#  define USE_LINUX_QUOTA_26
++#  define qid_t uid_t
++#  define dqblk if_dqblk
++#else
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ #  define USE_LINUX_QUOTA_24
+ #  define uid_t qid_t
+ #  define dqblk disk_dqblk
++# endif
+ #endif
+ #endif
+ 
+@@ -51,6 +61,12 @@
  #if defined(SYS_UCRED_H)
  # include <sys/ucred.h>  /* required by NetBSD,FreeBSD */
  #endif
@@ -15,7 +49,7 @@
  #endif
  
  static VALUE rb_mQuota;
-@@ -159,7 +165,11 @@ rb_quotactl(int cmd, char *dev, VALUE vu
+@@ -159,7 +175,11 @@ rb_quotactl(int cmd, char *dev, VALUE vu
    char *path;
    int is_gid;
    uid_t uid;
@@ -27,7 +61,7 @@
    int i, count, ret;
    
    buff = 0;
-@@ -187,12 +197,16 @@ rb_quotactl(int cmd, char *dev, VALUE vu
+@@ -187,12 +207,16 @@ rb_quotactl(int cmd, char *dev, VALUE vu
  static int
  rb_quotactl(int cmd, char *dev, VALUE vuid, caddr_t addr)
  {
@@ -45,3 +79,32 @@
    switch( cmd ){
    case Q_QUOTAON:
    case Q_QUOTAOFF:
+@@ -235,7 +259,9 @@ rb_diskquota_get(VALUE dqb, struct dqblk
+ #if defined(USE_LINUX_QUOTA)
+   c_dqb->dqb_bhardlimit = GetMember("bhardlimit");
+   c_dqb->dqb_bsoftlimit = GetMember("bsoftlimit");
+-#if !defined(USE_LINUX_QUOTA_24)
++#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
++  c_dqb->dqb_curspace  = GetMember("curspace");
++#else
+   c_dqb->dqb_curblocks  = GetMember("curblocks");
+ #endif
+   c_dqb->dqb_ihardlimit = GetMember("ihardlimit");
+@@ -274,7 +300,7 @@ rb_diskquota_new(struct dqblk *c_dqb)
+   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_curblocks),
+@@ -454,7 +480,7 @@ Init_quota()
+   DQ_ALIAS(fsoftlimit=, isoftlimit=);
+   DQ_ALIAS(curfiles=,   curinodes=);
+   DQ_ALIAS(ftimelimit=, itimelimit=);
+-#if defined(USE_LINUX_QUOTA_24)
++#if defined(USE_LINUX_QUOTA_24) || defined(USE_LINUX_QUOTA_26)
+   DQ_ALIAS(curspace, curblocks);
+   DQ_ALIAS(curspace=, curblocks=);
+ #endif



Home | Main Index | Thread Index | Old Index