0001-Allow-to-disable-versioned-paths.patch

Vit Ondruch, 12/08/2011 11:40 PM

Download (3.52 KB)

View differences:

configure.in
2954 2954
fi
2955 2955
AC_SUBST(USE_RUBYGEMS)
2956 2956

  
2957
AC_ARG_ENABLE(versioned-paths,
2958
	AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]),
2959
	[enable_versioned_paths="$enableval"], [enable_versioned_paths=yes])
2960
if test x"$enable_versioned_paths" = xno; then
2961
    AC_DEFINE(DISABLE_VERSIONED_PATHS, 1)
2962
    USE_VERSIONED_PATHS=NO
2963
else
2964
    USE_VERSIONED_PATHS=YES
2965
fi
2966
AC_SUBST(USE_VERSIONED_PATHS)
2967

  
2957 2968
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
2958 2969
AS_MKDIR_P("${arch_hdrdir}")
2959 2970
config_h="${arch_hdrdir}/config.h"
tool/mkconfig.rb
42 42
vars = {}
43 43
continued_name = nil
44 44
continued_line = nil
45
path_version = "/$(ruby_version)"
45 46
File.foreach "config.status" do |line|
46 47
  next if /^#/ =~ line
47 48
  name = nil
......
138 139
    case name
139 140
    when "ruby_version"
140 141
      version = val[/\A"(.*)"\z/, 1]
142
    when /^USE_VERSIONED_PATHS$/
143
      path_version = nil if /NO/ =~ val
141 144
    end
142 145
  end
143 146
#  break if /^CEOF/
......
195 198
print(*v_fast)
196 199
print(*v_others)
197 200
print <<EOS
198
  CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
201
  CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
199 202
  CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
200
  CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
203
  CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
201 204
  CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
202
  CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
205
  CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
203 206
  CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
204 207
  CONFIG["topdir"] = File.dirname(__FILE__)
205 208
  MAKEFILE_CONFIG = {}
version.c
38 38
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
39 39
#endif
40 40

  
41
#ifdef DISABLE_VERSIONED_PATHS
42
#define RUBY_LIB                    RUBY_LIB_PREFIX
43
#define RUBY_SITE_LIB2              RUBY_SITE_LIB
44
#define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB
45
#else
41 46
#define RUBY_LIB                    RUBY_LIB_PREFIX  "/"RUBY_LIB_VERSION
42 47
#define RUBY_SITE_LIB2              RUBY_SITE_LIB    "/"RUBY_LIB_VERSION
43 48
#define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB  "/"RUBY_LIB_VERSION
49
#endif
44 50
#define RUBY_ARCHLIB                RUBY_LIB         "/"RUBY_ARCH
45 51
#define RUBY_SITE_ARCHLIB           RUBY_SITE_LIB2   "/"RUBY_SITEARCH
46 52
#define RUBY_VENDOR_ARCHLIB         RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
......
75 81
    RUBY_SITE_THIN_ARCHLIB "\0"
76 82
#endif
77 83
    RUBY_SITE_ARCHLIB "\0"
84
#ifndef DISABLE_VERSIONED_PATHS
78 85
    RUBY_SITE_LIB "\0"
79 86
#endif
87
#endif
80 88

  
81 89
#ifndef NO_RUBY_VENDOR_LIB
82 90
    RUBY_VENDOR_LIB2 "\0"
......
84 92
    RUBY_VENDOR_THIN_ARCHLIB "\0"
85 93
#endif
86 94
    RUBY_VENDOR_ARCHLIB "\0"
95
#ifndef DISABLE_VERSIONED_PATHS
87 96
    RUBY_VENDOR_LIB "\0"
88 97
#endif
98
#endif
89 99

  
90 100
    RUBY_LIB "\0"
91 101
#ifdef RUBY_THIN_ARCHLIB
92
-