File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,10 @@ The build process may be configured through the following environment variables:
82
82
| ` RUBY_BUILD_CURL_OPTS ` | Additional options to pass to ` curl ` for downloading. |
83
83
| ` RUBY_BUILD_WGET_OPTS ` | Additional options to pass to ` wget ` for downloading. |
84
84
| ` RUBY_BUILD_MIRROR_URL ` | Custom mirror URL root. |
85
- | ` RUBY_BUILD_MIRROR_PACKAGE_URL ` | Custom complete mirror URL (e.g. http://mirror.example.com/package-1.0.0.tar.gz). |
85
+ | ` RUBY_BUILD_MIRROR_PACKAGE_URL ` | Custom complete mirror URL (e.g. http://mirror.example.com/package-1.0.0.tar.gz). |
86
86
| ` RUBY_BUILD_SKIP_MIRROR ` | Bypass the download mirror and fetch all package files from their original URLs. |
87
87
| ` RUBY_BUILD_ROOT ` | Custom build definition directory. (Default: ` share/ruby-build ` ) |
88
+ | ` RUBY_BUILD_TARBALL_OVERRIDE ` | Override the URL to fetch the ruby tarball from, optionally followed by ` #checksum ` . |
88
89
| ` RUBY_BUILD_DEFINITIONS ` | Additional paths to search for build definitions. (Colon-separated list) |
89
90
| ` CC ` | Path to the C compiler. |
90
91
| ` RUBY_CFLAGS ` | Additional ` CFLAGS ` options (_ e.g.,_ to override ` -O3 ` ). |
Original file line number Diff line number Diff line change @@ -381,6 +381,10 @@ fetch_tarball() {
381
381
local checksum
382
382
local extracted_dir
383
383
384
+ if is_ruby_package " $1 " && [ -n " $RUBY_BUILD_TARBALL_OVERRIDE " ]; then
385
+ package_url=" $RUBY_BUILD_TARBALL_OVERRIDE "
386
+ fi
387
+
384
388
if [ " $package_url " != " ${package_url/ \# } " ]; then
385
389
checksum=" ${package_url#*# } "
386
390
package_url=" ${package_url%%#* } "
@@ -1257,14 +1261,23 @@ isolated_gem_install() {
1257
1261
1258
1262
apply_ruby_patch () {
1259
1263
local patchfile
1260
- case " $1 " in
1261
- ruby-* | jruby-* | rubinius-* | truffleruby-* )
1264
+ if is_ruby_package " $1 " ; then
1262
1265
patchfile=" $( mktemp " ${TMP} /ruby-patch.XXXXXX" ) "
1263
1266
cat " ${2:- -} " > " $patchfile "
1264
1267
1265
1268
local striplevel=0
1266
1269
grep -q ' ^--- a/' " $patchfile " && striplevel=1
1267
1270
patch -p$striplevel --force -i " $patchfile "
1271
+ fi
1272
+ }
1273
+
1274
+ is_ruby_package () {
1275
+ case " $1 " in
1276
+ ruby-* | jruby-* | rubinius-* | truffleruby[+-]* | mruby-* | picoruby-* )
1277
+ return 0
1278
+ ;;
1279
+ * )
1280
+ return 1
1268
1281
;;
1269
1282
esac
1270
1283
}
You can’t perform that action at this time.
0 commit comments