Mon Aug 5 15:00:15 2013 UTC ()
Fix patch file code for modern GCC


(fhajny)
diff -r1.3 -r1.4 pkgsrc/security/ruby-shadow/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/security/ruby-shadow/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/security/ruby-shadow/patches/patch-ab

cvs diff -r1.3 -r1.4 pkgsrc/security/ruby-shadow/Makefile (expand / switch to unified diff)

--- pkgsrc/security/ruby-shadow/Makefile 2013/07/21 02:51:28 1.3
+++ pkgsrc/security/ruby-shadow/Makefile 2013/08/05 15:00:15 1.4
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: Makefile,v 1.3 2013/07/21 02:51:28 taca Exp $ 1# $NetBSD: Makefile,v 1.4 2013/08/05 15:00:15 fhajny Exp $
2 2
3SHADOW_VER= 2.2.0 3SHADOW_VER= 2.2.0
4DISTNAME= ruby-shadow-${SHADOW_VER} 4DISTNAME= ruby-shadow-${SHADOW_VER}
5PKGNAME= ${RUBY_PKGPREFIX}-shadow-${SHADOW_VER} 5PKGNAME= ${RUBY_PKGPREFIX}-shadow-${SHADOW_VER}
6PKGREVISION= 1 6PKGREVISION= 1
7CATEGORIES= database 7CATEGORIES= databases security
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://github.com/apalmblad/ruby-shadow 10HOMEPAGE= https://github.com/apalmblad/ruby-shadow
11COMMENT= Access to shadow passwords on Linux and Solaris 11COMMENT= Access to shadow passwords on Linux and Solaris
12 12
13USE_TOOLS+= gmake 13USE_TOOLS+= gmake
14 14
15GEM_CLEANBUILD= Makefile *.o mkmf.log shadow.${RUBY_DLEXT} .RUBYARCHDIR.time 15GEM_CLEANBUILD= Makefile *.o mkmf.log shadow.${RUBY_DLEXT} .RUBYARCHDIR.time
16 16
17CONFLICTS+= ruby[1-9][0-9][0-9]-shadow-[0-9]* 17CONFLICTS+= ruby[1-9][0-9][0-9]-shadow-[0-9]*
18 18
19.include "../../lang/ruby/gem.mk" 19.include "../../lang/ruby/gem.mk"
20.include "../../devel/libuuid/buildlink3.mk" 20.include "../../devel/libuuid/buildlink3.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/security/ruby-shadow/distinfo (expand / switch to unified diff)

--- pkgsrc/security/ruby-shadow/distinfo 2013/04/10 09:25:21 1.1.1.1
+++ pkgsrc/security/ruby-shadow/distinfo 2013/08/05 15:00:15 1.2
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1$NetBSD: distinfo,v 1.1.1.1 2013/04/10 09:25:21 tonnerre Exp $ 1$NetBSD: distinfo,v 1.2 2013/08/05 15:00:15 fhajny Exp $
2 2
3SHA1 (ruby-shadow-2.2.0.gem) = e9b2ee34c2b0b98552e3a6a939cc2dc09cc1a99f 3SHA1 (ruby-shadow-2.2.0.gem) = e9b2ee34c2b0b98552e3a6a939cc2dc09cc1a99f
4RMD160 (ruby-shadow-2.2.0.gem) = 03dcc27c75ac76cbb10efc07db9704c89fdc5484 4RMD160 (ruby-shadow-2.2.0.gem) = 03dcc27c75ac76cbb10efc07db9704c89fdc5484
5Size (ruby-shadow-2.2.0.gem) = 9216 bytes 5Size (ruby-shadow-2.2.0.gem) = 9216 bytes
6SHA1 (patch-aa) = 7500e90948f7aada86b45b152bcc346f0ddb04ba 6SHA1 (patch-aa) = 7500e90948f7aada86b45b152bcc346f0ddb04ba
7SHA1 (patch-ab) = 761f40443f1fec78a9023ff4600254ad4205d19e 7SHA1 (patch-ab) = 279c6ba165332a0259b50f05d623c673f9125365

cvs diff -r1.1.1.1 -r1.2 pkgsrc/security/ruby-shadow/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/security/ruby-shadow/patches/Attic/patch-ab 2013/04/10 09:25:22 1.1.1.1
+++ pkgsrc/security/ruby-shadow/patches/Attic/patch-ab 2013/08/05 15:00:15 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-ab,v 1.1.1.1 2013/04/10 09:25:22 tonnerre Exp $ 1$NetBSD: patch-ab,v 1.2 2013/08/05 15:00:15 fhajny Exp $
2 2
3Handle OSX-like password APIs. 3Handle OSX-like password APIs.
4 4
5--- shadow.c 5--- shadow.c
6+++ shadow.c 6+++ shadow.c
7@@ -7,8 +7,16 @@ 7@@ -7,8 +7,16 @@
8 * License: Free for any use with your own risk! 8 * License: Free for any use with your own risk!
9 * Modified at: <1999/8/19 06:48:18 by ttate> 9 * Modified at: <1999/8/19 06:48:18 by ttate>
10 */ 10 */
11- 11-
12+#ifndef OSX 12+#ifndef OSX
13 #include <shadow.h> 13 #include <shadow.h>
14+#define PWTYPE struct spwd 14+#define PWTYPE struct spwd
@@ -55,29 +55,29 @@ Handle OSX-like password APIs. @@ -55,29 +55,29 @@ Handle OSX-like password APIs.
55+ return rb_struct_new(rb_sPasswdEntry, 55+ return rb_struct_new(rb_sPasswdEntry,
56+ rb_tainted_str_new2(entry->pw_name), 56+ rb_tainted_str_new2(entry->pw_name),
57+ rb_tainted_str_new2(entry->pw_passwd ), 57+ rb_tainted_str_new2(entry->pw_passwd ),
58+ difftime( entry->pw_change, 0 ) / 24*60*60, 58+ difftime( entry->pw_change, 0 ) / 24*60*60,
59+ Qnil, /* days that password must stay same */ 59+ Qnil, /* days that password must stay same */
60+ Qnil, /* days until passwor changes. */ 60+ Qnil, /* days until passwor changes. */
61+ Qnil, /* days before expiration where user is warned */ 61+ Qnil, /* days before expiration where user is warned */
62+ Qnil, /* days after password expiration that account becomes inactive */ 62+ Qnil, /* days after password expiration that account becomes inactive */
63+ difftime( entry->pw_expire, 0 ) / 24*60*60, 63+ difftime( entry->pw_expire, 0 ) / 24*60*60,
64+ Qnil, 64+ Qnil,
65+ NULL); 65+ NULL);
66+} 66+}
67+#else 67+#else
68+static VALUE convert_pw_struct( spwd *entry ) 68+static VALUE convert_pw_struct( struct spwd *entry )
69+{ 69+{
70+ result = rb_struct_new(rb_sPasswdEntry, 70+ VALUE result = rb_struct_new(rb_sPasswdEntry,
71+ rb_tainted_str_new2(entry->sp_namp), 71+ rb_tainted_str_new2(entry->sp_namp),
72+ rb_tainted_str_new2(entry->sp_pwdp), 72+ rb_tainted_str_new2(entry->sp_pwdp),
73+ INT2FIX(entry->sp_lstchg), 73+ INT2FIX(entry->sp_lstchg),
74+ INT2FIX(entry->sp_min), 74+ INT2FIX(entry->sp_min),
75+ INT2FIX(entry->sp_max), 75+ INT2FIX(entry->sp_max),
76+ INT2FIX(entry->sp_warn), 76+ INT2FIX(entry->sp_warn),
77+ INT2FIX(entry->sp_inact), 77+ INT2FIX(entry->sp_inact),
78+ INT2FIX(entry->sp_expire), 78+ INT2FIX(entry->sp_expire),
79+ INT2FIX(entry->sp_flag), 79+ INT2FIX(entry->sp_flag),
80+ NULL); 80+ NULL);
81+} 81+}
82+#endif 82+#endif
83 #ifndef SOLARIS 83 #ifndef SOLARIS