1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

- fix ruby pluging with ruby19

PR:		155114
Submitted by:	Scot Hetzel
This commit is contained in:
Dirk Meyer 2011-03-07 21:15:14 +00:00
parent ccfa57122e
commit 1572220eee
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270470
2 changed files with 21 additions and 4 deletions

View File

@ -331,6 +331,7 @@ PLIST_SUB+= WITH_PYTHON="@comment "
.if defined(WITH_RUBY)
CONFIGURE_ARGS+= --enable-ruby
CONFIGURE_ENV+= RUBY="${RUBY}"
PLIST_SUB+= WITH_RUBY=""
USE_RUBY= yes
.include "${PORTSDIR}/Mk/bsd.ruby.mk"

View File

@ -1,6 +1,6 @@
--- configure.orig 2008-10-08 01:54:55.000000000 +0200
+++ configure 2009-02-27 11:12:03.000000000 +0100
@@ -6481,6 +6481,9 @@
--- configure.orig 2010-01-26 16:01:10.000000000 +0000
+++ configure 2011-02-28 06:36:25.156165774 +0000
@@ -6917,6 +6917,9 @@
*-apple-darwin* )
CFLAGS="${CFLAGS} -fno-common -Wall"
;;
@ -10,7 +10,7 @@
*-freebsd* )
CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
;;
@@ -26247,7 +26250,9 @@
@@ -24803,7 +24806,9 @@
LUA_INCLUDES=""
LUA_LIBS=""
@ -21,3 +21,19 @@
if test -n "$lua_inc"; then
CFLAGS="$CFLAGS -I$lua_inc"
@@ -27574,7 +27579,14 @@
if test "x$RUBY" = "x"; then
use_ruby="No (ruby not available)"
else
- RUBY_INCLUDES="-I`$RUBY $srcdir/config/config_ruby.rb INCLUDES`"
+ RUBY_VER="`$RUBY -rrbconfig -e \"puts Config::CONFIG['ruby_version']\"`"
+ if test "x$RUBY_VER" = "x1.8"; then
+ RUBY_INCLUDES="-I`$RUBY $srcdir/config/config_ruby.rb INCLUDES`"
+ else
+ RUBY_INC="`$RUBY -rrbconfig -e \"puts Config::CONFIG['rubyhdrdir']\"`"
+ RUBY_ARCH="`$RUBY -rrbconfig -e \"puts Config::CONFIG['arch']\"`"
+ RUBY_INCLUDES="-I$RUBY_INC -I$RUBY_INC/$RUBY_ARCH"
+ fi
# hack for powerpc-darwin8 (10.4)
RUBY_INCLUDES=`echo $RUBY_INCLUDES | sed 's/powerpc/universal/'`
RUBY_LIBS="-L`$RUBY $srcdir/config/config_ruby.rb lib` `$RUBY -rrbconfig -e \"puts Config::CONFIG['LIBRUBYARG_SHARED']\"`"