Files
pkgsrc-ng/security/ruby-shadow/patches/patch-aa
2013-09-26 17:14:40 +02:00

34 lines
953 B
Plaintext

$NetBSD: patch-aa,v 1.1.1.1 2013/04/10 09:25:21 tonnerre Exp $
Do something more sensible if we detect an OSX-like system.
--- extconf.rb
+++ extconf.rb
@@ -11,10 +11,11 @@ $CFLAGS = case RUBY_VERSION
when /^2\./; '-DRUBY19'
else; ''
end
+$CFLAGS += " -Wall -pedantic"
#$LDFLAGS = "-lshadow"
-if( ! (ok = have_library("shadow","getspent")) )
+if !(ok = have_library("shadow","getspent"))
$LDFLAGS = ""
ok = have_func("getspent")
end
@@ -36,9 +37,10 @@ else
osx_ok &= have_func( "getpwnam" )
osx_ok &= have_func( "getpwnam_r" )
osx_ok &= have_func( "getpwuid" )
+ #osx_ok &= have_func( "getuid_r" )
osx_ok &= have_func( "setpassent" )
osx_ok &= have_func( "setpwent" )
- if osx_ok
- raise "It looks like you're on OSX. There is a branch that might help here: https://github.com/apalmblad/ruby-shadow/tree/osx"
- end
+ $CFLAGS += ' -DOSX'
+ create_makefile("shadow") if osx_ok
end
+