summaryrefslogtreecommitdiffstats
path: root/redhat/tdebindings/kdebindings-3.5.13.1-fix_ruby_detect_when_pc_file_is_19.patch
blob: f9fc1aec8015ade84184291e3d9805fa766b2a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
commit 10fc891a7e282d2cbab27ab53d9b980147fadb9a
Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
Date:   1348248800 -0500

    Fix Ruby detection when .pc file is ruby-1.9

diff --git a/korundum/rubylib/korundum/configure.in.in b/korundum/rubylib/korundum/configure.in.in
index 924f42f..e19d5b4 100644
--- a/korundum/rubylib/korundum/configure.in.in
+++ b/korundum/rubylib/korundum/configure.in.in
@@ -10,15 +10,17 @@ else
   AC_MSG_CHECKING(for ruby dirs)
   if test -n "$PKGCONFIG"; then
     RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
-    if test -z "$RUBY_VERSION"; then
+    if test -n "$RUBY_VERSION"; then
+      RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
+    else
       RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
+      RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
     fi
     if test -n "$RUBY_VERSION"; then
       RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
       RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
       RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
       RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
-      RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
       AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
     fi
   fi
diff --git a/qtruby/rubylib/qtruby/configure.in.in b/qtruby/rubylib/qtruby/configure.in.in
index e7f4f2c..f0594c6 100644
--- a/qtruby/rubylib/qtruby/configure.in.in
+++ b/qtruby/rubylib/qtruby/configure.in.in
@@ -10,8 +10,11 @@ else
   AC_MSG_CHECKING(for ruby dirs)
   if test -n "$PKGCONFIG"; then
     RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null`
-    if test -z "$RUBY_VERSION"; then
+    if test -n "$RUBY_VERSION"; then
+      RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
+    else
       RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null`
+      RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags`
     fi
     if test -n "$RUBY_VERSION"; then
       RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
@@ -20,7 +23,6 @@ else
       RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
       RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
       RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
-      RUBY_CFLAGS=`$PKGCONFIG ruby --cflags`
       AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
     fi
   fi