aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-04 16:07:50 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-04 16:07:50 +0900
commit6d3818266cb43e377975f082d66f2de268f1b366 (patch)
tree496145ef91e43a188fe8ed7796af7cfd69a18384
parent38feec14a51ef6b5f32960256e3d5ee87cf5b0da (diff)
downloadpoe-6d3818266cb43e377975f082d66f2de268f1b366.tar.gz
rakefile: RVM のパッチセットを流用することにした
-rw-r--r--.gitmodules3
-rw-r--r--Rakefile15
-rw-r--r--config.json7
m---------vendor/rvm0
4 files changed, 25 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..c1beb0e
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "vendor/rvm"]
+ path = vendor/rvm
+ url = https://github.com/rvm/rvm.git
diff --git a/Rakefile b/Rakefile
index 16ed5c4..e64a33a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -49,6 +49,21 @@ namespace :compiler do
system("curl -o archive.tar.gz #{Shellwords.escape(url)}") or raise("failed to download")
system("tar xf archive.tar.gz") or raise("failed to extract")
FileUtils.chdir("ruby-#{version}") {
+ patch_ccnames = ["ruby", "ruby/#{version.split("-")[0]}", "ruby/#{version.split("-").join("/")}"]
+ patch_ccnames.each { |patch_ccname|
+ rvm_patchsets_path = File.expand_path("../vendor/rvm/patchsets/#{patch_ccname}/default", __FILE__)
+ if File.exist?(rvm_patchsets_path)
+ puts "RVM patchset found (#{patch_ccname})... applying..."
+ patches = File.read(rvm_patchsets_path).lines.map(&:chomp)
+ patches.each { |patch|
+ patch_path = patch_ccnames
+ .map { |pp| File.expand_path("../vendor/rvm/patches/#{pp}/#{patch}.patch", __FILE__) }
+ .find(&File.method(:exist?))
+ patch_path and system("patch -R -p1 --silent --dry-run <#{patch_path} || patch -p1 <#{patch_path}") or
+ raise("failed to apply patch")
+ }
+ end
+ }
retriable {
system("./configure --prefix=#{prefix} --enable-shared --disable-install-doc") or raise("failed to configure")
system("make -j6") or raise("failed to make")
diff --git a/config.json b/config.json
index b53e0c3..43655e0 100644
--- a/config.json
+++ b/config.json
@@ -23,6 +23,13 @@
"/opt/bin/ruby",
"{}"
]
+ },
+ "ruby-1.9.3-p551": {
+ "version": "ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]",
+ "commandline": [
+ "/opt/bin/ruby",
+ "{}"
+ ]
}
},
"php": {
diff --git a/vendor/rvm b/vendor/rvm
new file mode 160000
+Subproject cbc4488028ccc682a872034ba823f61bf2d9cf6