File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 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:
8282| ` RUBY_BUILD_CURL_OPTS ` | Additional options to pass to ` curl ` for downloading. |
8383| ` RUBY_BUILD_WGET_OPTS ` | Additional options to pass to ` wget ` for downloading. |
8484| ` 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). |
8686| ` RUBY_BUILD_SKIP_MIRROR ` | Bypass the download mirror and fetch all package files from their original URLs. |
8787| ` RUBY_BUILD_ROOT ` | Custom build definition directory. (Default: ` share/ruby-build ` ) |
88+ | ` RUBY_BUILD_TARBALL_OVERRIDE ` | Custom URL to fetch the ruby tarball from. Overrides the URL in the build definition. |
8889| ` RUBY_BUILD_DEFINITIONS ` | Additional paths to search for build definitions. (Colon-separated list) |
8990| ` CC ` | Path to the C compiler. |
9091| ` RUBY_CFLAGS ` | Additional ` CFLAGS ` options (_ e.g.,_ to override ` -O3 ` ). |
Original file line number Diff line number Diff line change @@ -371,6 +371,10 @@ fetch_tarball() {
371371 local checksum
372372 local extracted_dir
373373
374+ if is_ruby_package " $1 " && [ -n " $RUBY_BUILD_TARBALL_OVERRIDE " ]; then
375+ package_url=" $RUBY_BUILD_TARBALL_OVERRIDE "
376+ fi
377+
374378 if [ " $package_url " != " ${package_url/ \# } " ]; then
375379 checksum=" ${package_url#*# } "
376380 package_url=" ${package_url%%#* } "
@@ -1203,14 +1207,23 @@ isolated_gem_install() {
12031207
12041208apply_ruby_patch () {
12051209 local patchfile
1206- case " $1 " in
1207- ruby-* | jruby-* | rubinius-* | truffleruby-* )
1210+ if is_ruby_package " $1 " ; then
12081211 patchfile=" $( mktemp " ${TMP} /ruby-patch.XXXXXX" ) "
12091212 cat " ${2:- -} " > " $patchfile "
12101213
12111214 local striplevel=0
12121215 grep -q ' ^--- a/' " $patchfile " && striplevel=1
12131216 patch -p$striplevel --force -i " $patchfile "
1217+ fi
1218+ }
1219+
1220+ is_ruby_package () {
1221+ case " $1 " in
1222+ ruby-* | jruby-* | rubinius-* | truffleruby[+-]* | mruby-* | picoruby-* )
1223+ return 0
1224+ ;;
1225+ * )
1226+ return 1
12141227 ;;
12151228 esac
12161229}
You can’t perform that action at this time.
0 commit comments