Fix DESTDIR issue once more (rhbz#921650).

This commit is contained in:
Vít Ondruch 2013-07-02 12:18:50 +02:00
parent 1e68c10ca8
commit e91db1d96b
2 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,70 @@
From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 2 Jul 2013 11:51:50 +0200
Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR"
This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36.
---
lib/mkmf.rb | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index ee89198..cca487e 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -189,21 +189,21 @@ module MakeMakefile
]
elsif $configure_args.has_key?('--vendor')
dirs = [
- ['BINDIR', '$(DESTDIR)$(bindir)'],
- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'],
- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'],
- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'],
- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['BINDIR', '$(bindir)'],
+ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
+ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'],
+ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'],
+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
]
else
dirs = [
- ['BINDIR', '$(DESTDIR)$(bindir)'],
- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'],
- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'],
- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'],
- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'],
- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
+ ['BINDIR', '$(bindir)'],
+ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
+ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
+ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
]
end
dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
@@ -1728,7 +1728,6 @@ SRC
end
def with_destdir(dir)
- return dir unless $extmk
dir = dir.sub($dest_prefix_pattern, '')
/\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
end
@@ -1787,8 +1786,8 @@ ECHO = $(ECHO1:0=@echo)
#### Start of system configuration section. ####
#{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}}
-topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace}
-hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace}
+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace}
+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace}
arch_hdrdir = #{$arch_hdrdir.quote}
PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
--
1.8.2.1

View File

@ -154,6 +154,9 @@ Patch16: ruby-2.0.0-p195-aarch64.patch
# in support for ABRT. # in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566 # http://bugs.ruby-lang.org/issues/8566
Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
# Fixes issues with DESTDIR.
# https://bugs.ruby-lang.org/issues/8115
Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(rubygems) >= %{rubygems_version}
@ -419,6 +422,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1 %patch17 -p1
%patch18 -p1
# Provide an example of usage of the tapset: # Provide an example of usage of the tapset:
cp -a %{SOURCE3} . cp -a %{SOURCE3} .