From c70eb6f363ebbc4e3e87a6b915898839e713d55b Mon Sep 17 00:00:00 2001 From: jasper Date: Fri, 13 Dec 2013 07:50:53 +0000 Subject: [PATCH] import ruby-shadow-2.3.1 This module provides access to shadow passwords on Linux, OSX, FreeBSD, OpenBSD and Solaris. ok aja@ --- sysutils/ruby-shadow/Makefile | 22 ++++++++++++ sysutils/ruby-shadow/distinfo | 2 ++ sysutils/ruby-shadow/patches/patch-extconf_rb | 34 +++++++++++++++++++ sysutils/ruby-shadow/patches/patch-pwd_depend | 20 +++++++++++ .../ruby-shadow/patches/patch-pwd_shadow_c | 20 +++++++++++ .../ruby-shadow/patches/patch-shadow_depend | 20 +++++++++++ .../ruby-shadow/patches/patch-shadow_shadow_c | 20 +++++++++++ sysutils/ruby-shadow/pkg/DESCR | 2 ++ sysutils/ruby-shadow/pkg/PLIST | 23 +++++++++++++ 9 files changed, 163 insertions(+) create mode 100644 sysutils/ruby-shadow/Makefile create mode 100644 sysutils/ruby-shadow/distinfo create mode 100644 sysutils/ruby-shadow/patches/patch-extconf_rb create mode 100644 sysutils/ruby-shadow/patches/patch-pwd_depend create mode 100644 sysutils/ruby-shadow/patches/patch-pwd_shadow_c create mode 100644 sysutils/ruby-shadow/patches/patch-shadow_depend create mode 100644 sysutils/ruby-shadow/patches/patch-shadow_shadow_c create mode 100644 sysutils/ruby-shadow/pkg/DESCR create mode 100644 sysutils/ruby-shadow/pkg/PLIST diff --git a/sysutils/ruby-shadow/Makefile b/sysutils/ruby-shadow/Makefile new file mode 100644 index 00000000000..010b67adb41 --- /dev/null +++ b/sysutils/ruby-shadow/Makefile @@ -0,0 +1,22 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +COMMENT = module to access shadow passwords + +DISTNAME = ruby-shadow-2.3.1 +PKGNAME = ${DISTNAME:S/ruby-//} +CATEGORIES = sysutils + +MAINTAINER = Jasper Lievisse Adriaanse + +# PD +PERMIT_PACKAGE_CDROM = Yes + +MODULES = lang/ruby + +BUILD_DEPENDS = sysutils/e2fsprogs + +WANTLIB = pthread + +CONFIGURE_STYLE = ruby gem ext + +.include diff --git a/sysutils/ruby-shadow/distinfo b/sysutils/ruby-shadow/distinfo new file mode 100644 index 00000000000..bf545b5a996 --- /dev/null +++ b/sysutils/ruby-shadow/distinfo @@ -0,0 +1,2 @@ +SHA256 (ruby-shadow-2.3.1.gem) = h05eflMVI7OuV+yjqS5YIZODeTeR6wT3dAlZRVlC59I= +SIZE (ruby-shadow-2.3.1.gem) = 9216 diff --git a/sysutils/ruby-shadow/patches/patch-extconf_rb b/sysutils/ruby-shadow/patches/patch-extconf_rb new file mode 100644 index 00000000000..176ecab9ac4 --- /dev/null +++ b/sysutils/ruby-shadow/patches/patch-extconf_rb @@ -0,0 +1,34 @@ +$OpenBSD: patch-extconf_rb,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +From d8c613cdb17edf9628fa10569ba31562fae67fcf Mon Sep 17 00:00:00 2001 +From: Adam Palmblad +Date: Fri, 15 Nov 2013 09:46:05 -0800 +Subject: [PATCH] Attempt to resolve BSD make issues. + +Add OpenBSD support. + +--- extconf.rb.orig Thu Jan 1 01:00:00 1970 ++++ extconf.rb Thu Dec 12 21:42:09 2013 +@@ -16,7 +16,7 @@ $CFLAGS = case RUBY_VERSION + implementation = case CONFIG['host_os'] + when /linux/i; 'shadow' + when /sunos|solaris/i; 'shadow' +- when /freebsd/i; 'pwd' ++ when /freebsd|openbsd/i; 'pwd' + when /darwin/i; 'pwd' + else; nil + "This library works on OS X, FreeBSD, Solaris and Linux." +@@ -59,8 +59,11 @@ else + ok = false + end + ++have_header( "ruby/io.h") ++ + if ok ++ + create_makefile("shadow", implementation) + else + raise "You are missing some of the required functions from either shadow.h on Linux/Solaris, or pwd.h on FreeBSD/OS X." +-end +\ No newline at end of file ++end diff --git a/sysutils/ruby-shadow/patches/patch-pwd_depend b/sysutils/ruby-shadow/patches/patch-pwd_depend new file mode 100644 index 00000000000..ae0f8a9d500 --- /dev/null +++ b/sysutils/ruby-shadow/patches/patch-pwd_depend @@ -0,0 +1,20 @@ +$OpenBSD: patch-pwd_depend,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +From d8c613cdb17edf9628fa10569ba31562fae67fcf Mon Sep 17 00:00:00 2001 +From: Adam Palmblad +Date: Fri, 15 Nov 2013 09:46:05 -0800 +Subject: [PATCH] Attempt to resolve BSD make issues. + +--- pwd/depend.orig Thu Jan 1 01:00:00 1970 ++++ pwd/depend Thu Dec 12 21:41:53 2013 +@@ -1,9 +1 @@ +-ifneq (,$(findstring 1.9,$(ruby_version))) +- io_lib=$(hdrdir)/ruby/ruby/io.h +- hdr=$(hdrdir)/ruby/ruby.h +-else +- io_lib=$(hdrdir)/ruby/rubyio.h +- hdr=$(hdrdir)/ruby.h +-endif +- +-shadow.o: shadow.c $(hdr) $(io_lib) ++shadow.o: shadow.c diff --git a/sysutils/ruby-shadow/patches/patch-pwd_shadow_c b/sysutils/ruby-shadow/patches/patch-pwd_shadow_c new file mode 100644 index 00000000000..551eea9fc5e --- /dev/null +++ b/sysutils/ruby-shadow/patches/patch-pwd_shadow_c @@ -0,0 +1,20 @@ +$OpenBSD: patch-pwd_shadow_c,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +From d8c613cdb17edf9628fa10569ba31562fae67fcf Mon Sep 17 00:00:00 2001 +From: Adam Palmblad +Date: Fri, 15 Nov 2013 09:46:05 -0800 +Subject: [PATCH] Attempt to resolve BSD make issues. + +--- pwd/shadow.c.orig Thu Jan 1 01:00:00 1970 ++++ pwd/shadow.c Thu Dec 12 21:41:53 2013 +@@ -17,8 +17,8 @@ + #define PWTYPE struct passwd + + #include "ruby.h" +-#ifdef RUBY19 +-#include ++#ifdef HAVE_RUBY_IO_H ++#include "ruby/io.h" + #else + #include "rubyio.h" + #endif diff --git a/sysutils/ruby-shadow/patches/patch-shadow_depend b/sysutils/ruby-shadow/patches/patch-shadow_depend new file mode 100644 index 00000000000..e0944810367 --- /dev/null +++ b/sysutils/ruby-shadow/patches/patch-shadow_depend @@ -0,0 +1,20 @@ +$OpenBSD: patch-shadow_depend,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +From d8c613cdb17edf9628fa10569ba31562fae67fcf Mon Sep 17 00:00:00 2001 +From: Adam Palmblad +Date: Fri, 15 Nov 2013 09:46:05 -0800 +Subject: [PATCH] Attempt to resolve BSD make issues. + +--- shadow/depend.orig Thu Jan 1 01:00:00 1970 ++++ shadow/depend Thu Dec 12 21:41:53 2013 +@@ -1,9 +1 @@ +-ifneq (,$(findstring 1.9,$(ruby_version))) +- io_lib=$(hdrdir)/ruby/ruby/io.h +- hdr=$(hdrdir)/ruby/ruby.h +-else +- io_lib=$(hdrdir)/ruby/rubyio.h +- hdr=$(hdrdir)/ruby.h +-endif +- +-shadow.o: shadow.c $(hdr) $(io_lib) ++shadow.o: shadow.c diff --git a/sysutils/ruby-shadow/patches/patch-shadow_shadow_c b/sysutils/ruby-shadow/patches/patch-shadow_shadow_c new file mode 100644 index 00000000000..d4432c73210 --- /dev/null +++ b/sysutils/ruby-shadow/patches/patch-shadow_shadow_c @@ -0,0 +1,20 @@ +$OpenBSD: patch-shadow_shadow_c,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ + +From d8c613cdb17edf9628fa10569ba31562fae67fcf Mon Sep 17 00:00:00 2001 +From: Adam Palmblad +Date: Fri, 15 Nov 2013 09:46:05 -0800 +Subject: [PATCH] Attempt to resolve BSD make issues. + +--- shadow/shadow.c.orig Thu Jan 1 01:00:00 1970 ++++ shadow/shadow.c Thu Dec 12 21:41:53 2013 +@@ -9,8 +9,8 @@ + + #include + #include "ruby.h" +-#ifdef RUBY19 +-#include ++#ifdef HAVE_RUBY_IO_H ++#include "ruby/io.h" + #else + #include "rubyio.h" + #endif diff --git a/sysutils/ruby-shadow/pkg/DESCR b/sysutils/ruby-shadow/pkg/DESCR new file mode 100644 index 00000000000..25aa0c3395e --- /dev/null +++ b/sysutils/ruby-shadow/pkg/DESCR @@ -0,0 +1,2 @@ +This module provides access to shadow passwords on Linux, OSX, FreeBSD, +OpenBSD and Solaris. diff --git a/sysutils/ruby-shadow/pkg/PLIST b/sysutils/ruby-shadow/pkg/PLIST new file mode 100644 index 00000000000..531c2f9191c --- /dev/null +++ b/sysutils/ruby-shadow/pkg/PLIST @@ -0,0 +1,23 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2013/12/13 07:50:53 jasper Exp $ +${GEM_LIB}/cache/${DISTNAME}.gem +${GEM_LIB}/gems/${DISTNAME}/ +${GEM_LIB}/gems/${DISTNAME}/HISTORY +${GEM_LIB}/gems/${DISTNAME}/LICENSE +${GEM_LIB}/gems/${DISTNAME}/MANIFEST +${GEM_LIB}/gems/${DISTNAME}/Makefile +${GEM_LIB}/gems/${DISTNAME}/README +${GEM_LIB}/gems/${DISTNAME}/README.euc +${GEM_LIB}/gems/${DISTNAME}/extconf.rb +${GEM_LIB}/gems/${DISTNAME}/lib/ +${GEM_LIB}/gems/${DISTNAME}/lib/shadow.so +${GEM_LIB}/gems/${DISTNAME}/mkmf.log +${GEM_LIB}/gems/${DISTNAME}/pwd/ +${GEM_LIB}/gems/${DISTNAME}/pwd/depend +${GEM_LIB}/gems/${DISTNAME}/pwd/shadow.c +${GEM_LIB}/gems/${DISTNAME}/ruby-shadow.gemspec +${GEM_LIB}/gems/${DISTNAME}/shadow/ +${GEM_LIB}/gems/${DISTNAME}/shadow.o +${GEM_LIB}/gems/${DISTNAME}/shadow.so +${GEM_LIB}/gems/${DISTNAME}/shadow/depend +${GEM_LIB}/gems/${DISTNAME}/shadow/shadow.c +${GEM_LIB}/specifications/${DISTNAME}.gemspec