fixrbconfig 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/fixrbconfig +167 -0
- data/bin/fixrbconfig~ +166 -0
- metadata +40 -0
data/bin/fixrbconfig
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
puts "=" * 20
|
3
|
+
unless File.exist?("/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h")
|
4
|
+
puts "/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h does not exist. This probably means you haven't yet installed Xcode from the Tiger DVD. You won't be able to compile Ruby extensions without it. Please install it then rerun this program."
|
5
|
+
exit -1
|
6
|
+
end
|
7
|
+
|
8
|
+
OLD_PATH="/usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb"
|
9
|
+
BACKUP_PATH="/usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb.bak"
|
10
|
+
if File.exist?(BACKUP_PATH) then
|
11
|
+
puts "rbconfig.rb seems to already have been fixed (see #{BACKUP_PATH})"
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
puts "This program will replace your rbconfig.rb , located in #{OLD_PATH}"
|
15
|
+
puts "Press enter continue or ctrl-c to abort."
|
16
|
+
gets
|
17
|
+
require 'base64'
|
18
|
+
require 'fileutils'
|
19
|
+
enc = "CiMgVGhpcyBmaWxlIHdhcyBjcmVhdGVkIGJ5IG1rY29uZmlnLnJiIHdoZW4g
|
20
|
+
cnVieSB3YXMgYnVpbHQuICBBbnkKIyBjaGFuZ2VzIG1hZGUgdG8gdGhpcyBm
|
21
|
+
aWxlIHdpbGwgYmUgbG9zdCB0aGUgbmV4dCB0aW1lIHJ1YnkgaXMgYnVpbHQu
|
22
|
+
Cgptb2R1bGUgQ29uZmlnCiAgUlVCWV9WRVJTSU9OID09ICIxLjguMiIgb3IK
|
23
|
+
ICAgIHJhaXNlICJydWJ5IGxpYiB2ZXJzaW9uICgxLjguMikgZG9lc24ndCBt
|
24
|
+
YXRjaCBleGVjdXRh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SAibyIKICBDT05GSUdbIkNQ
|
72
|
+
UCJdID0gImdjYyAtRSIKICBDT05GSUdbIkVHUkVQIl0gPSAiZ3JlcCAtRSIK
|
73
|
+
ICBDT05GSUdbIkdOVV9MRCJdID0gIm5vIgogIENPTkZJR1siQ1BQT1VURklM
|
74
|
+
RSJdID0gIi1vIGNvbmZ0ZXN0LmkiCiAgQ09ORklHWyJPVVRGTEFHIl0gPSAi
|
75
|
+
LW8gIgogIENPTkZJR1siWUFDQyJdID0gImJpc29uIC15IgogIENPTkZJR1si
|
76
|
+
UkFOTElCIl0gPSAicmFubGliIgogIENPTkZJR1siYWNfY3RfUkFOTElCIl0g
|
77
|
+
PSAicmFubGliIgogIENPTkZJR1siQVIiXSA9ICJhciIKICBDT05GSUdbImFj
|
78
|
+
X2N0X0FSIl0gPSAiYXIiCiAgQ09ORklHWyJOTSJdID0gIiIKICBDT05GSUdb
|
79
|
+
ImFjX2N0X05NIl0gPSAiIgogIENPTkZJR1siV0lORFJFUyJdID0gIiIKICBD
|
80
|
+
T05GSUdbImFjX2N0X1dJTkRSRVMiXSA9ICIiCiAgQ09ORklHWyJETExXUkFQ
|
81
|
+
Il0gPSAiIgogIENPTkZJR1siYWNfY3RfRExMV1JBUCJdID0gIiIKICBDT05G
|
82
|
+
SUdbIkxOX1MiXSA9ICJsbiAtcyIKICBDT05GSUdbIlNFVF9NQUtFIl0gPSAi
|
83
|
+
IgogIENPTkZJR1siTElCT0JKUyJdID0gIiIKICBDT05GSUdbIkFMTE9DQSJd
|
84
|
+
ID0gIiIKICBDT05GSUdbIkRMREZMQUdTIl0gPSAiIgogIENPTkZJR1siQVJD
|
85
|
+
SF9GTEFHIl0gPSAiIgogIENPTkZJR1siU1RBVElDIl0gPSAiIgogIENPTkZJ
|
86
|
+
R1siQ0NETEZMQUdTIl0gPSAiIC1mbm8tY29tbW9uIgogIENPTkZJR1siTERT
|
87
|
+
SEFSRUQiXSA9ICJjYyAkKFJDX0NGTEFHUykgLWR5bmFta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bWUiXSA9ICIiCiAgQ09ORklHWyJSVUJZ
|
104
|
+
V19JTlNUQUxMX05BTUUiXSA9ICIiCiAgQ09ORklHWyJSVUJZX1NPX05BTUUi
|
105
|
+
XSA9ICIkKFJVQllfSU5TVEFMTF9OQU1FKSIKICBDT05GSUdbIkxJQlJVQllf
|
106
|
+
QSJdID0gImxpYiQoUlVCWV9TT19OQU1FKS1zdGF0aWMuYSIKICBDT05GSUdb
|
107
|
+
IkxJQlJVQllfU08iXSA9ICJsaWIkKFJVQllfU09fTkFNRSkuc28uJChNQUpP
|
108
|
+
UikuJChNSU5PUikuJChURUVOWSkiCiAgQ09ORklHWyJMSUJSVUJZX0FMSUFT
|
109
|
+
RVMiXSA9ICJsaWIkKFJVQllfU09fTkFNRSkuc28iCiAgQ09ORklHWyJMSUJS
|
110
|
+
VUJZIl0gPSAiJChMSUJSVUJZX0EpIgogIENPTkZJR1siTElCUlVCWUFSRyJd
|
111
|
+
ID0gIiQoTElCUlVCWUFSR19TVEFUSUMpIgogIENPTkZJR1siTElCUlVCWUFS
|
112
|
+
R19TVEFUSUMiXSA9ICIiCiAgQ09ORklHWyJMSUJSVUJZQVJHX1NIQVJFRCJd
|
113
|
+
ID0gIiIKICBDT05GSUdbIlNPTElCUyJdID0gIiIKICBDT05GSUdbIkRMRExJ
|
114
|
+
QlMiXSA9ICIiCiAgQ09ORklHWyJFTkFCTEVfU0hBUkVEIl0gPSAibm8iCiAg
|
115
|
+
Q09ORklHWyJNQUlOTElCUyJdID0gIiIKICBDT05GSUdbIkNPTU1PTl9MSUJT
|
116
|
+
Il0gPSAiIgogIENPTkZJR1siQ09NTU9OX01BQ1JPUyJdID0gIiIKICBDT05G
|
117
|
+
SUdbIkNPTU1PTl9IRUFERVJTIl0gPSAiIgogIENPTkZJR1siRVhQT1JUX1BS
|
118
|
+
RUZJWCJdID0gIiIKICBDT05GSUdbIk1BS0VGSUxFUyJdID0gIk1ha2VmaWxl
|
119
|
+
IgogIENPTkZJR1siYXJj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151
|
+
ICAgQ29uZmlnOjpleHBhbmQodmFsKQogIGVuZAplbmQKQ1JPU1NfQ09NUElM
|
152
|
+
SU5HID0gbmlsIHVubGVzcyBkZWZpbmVkPyBDUk9TU19DT01QSUxJTkcK"
|
153
|
+
unless File.stat(OLD_PATH).writable?
|
154
|
+
puts "Can't write to file '#{OLD_PATH}'"
|
155
|
+
puts "try running the command using `sudo fixrbconfig`"
|
156
|
+
exit -1
|
157
|
+
end
|
158
|
+
puts "Backing up original rbconfig.rb in #{BACKUP_PATH}"
|
159
|
+
FileUtils.cp(OLD_PATH, BACKUP_PATH)
|
160
|
+
rbconfig = Base64.decode64(enc)
|
161
|
+
File.open(OLD_PATH, "w") do |file|
|
162
|
+
file.write(rbconfig)
|
163
|
+
end
|
164
|
+
puts
|
165
|
+
puts
|
166
|
+
puts "All Done! You should be able to compile C extensions now!"
|
167
|
+
puts
|
data/bin/fixrbconfig~
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
puts "=" * 20
|
3
|
+
unless File.exist?("/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h")
|
4
|
+
puts "/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h does not exist. This probably means you haven't yet installed Xcode from the Tiger DVD. You won't be able to compile Ruby extensions without it. Please install it then rerun this program."
|
5
|
+
exit -1
|
6
|
+
end
|
7
|
+
|
8
|
+
OLD_PATH="/usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb"
|
9
|
+
BACKUP_PATH="/usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb.bak"
|
10
|
+
if File.exist?(BACKUP_PATH) then
|
11
|
+
puts "rbconfig.rb seems to already have been fixed (see #{BACKUP_PATH})"
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
puts "This program will replace your rbconfig.rb , located in #{OLD_PATH}"
|
15
|
+
puts "Press enter continue or ctrl-c to abort."
|
16
|
+
gets
|
17
|
+
require 'base64'
|
18
|
+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2V0X29zIl0g
|
66
|
+
PSAiZGFyd2luOC4wIgogIENPTkZJR1siQ0MiXSA9ICJnY2MiCiAgQ09ORklH
|
67
|
+
WyJhY19jdF9DQyJdID0gImdjYyIKICBDT05GSUdbIkNGTEFHUyJdID0gIiAt
|
68
|
+
YXJjaCBwcGMgLWcgLU9zIC1waXBlIC1mbm8tY29tbW9uICAtYXJjaCBwcGMg
|
69
|
+
LXBpcGUgLXBpcGUgLWZuby1jb21tb24iCiAgQ09ORklHWyJMREZMQUdTIl0g
|
70
|
+
PSAiIC1hcmNoIHBwYyAgICAgICAgICAgICIKICBDT05GSUdbIkNQUEZMQUdT
|
71
|
+
Il0gPSAiIgogIENPTkZJR1siT0JKRVhUIl0gPSAibyIKICBDT05GSUdbIkNQ
|
72
|
+
UCJdID0gImdjYyAtRSIKICBDT05GSUdbIkVHUkVQIl0gPSAiZ3JlcCAtRSIK
|
73
|
+
ICBDT05GSUdbIkdOVV9MRCJdID0gIm5vIgogIENPTkZJR1siQ1BQT1VURklM
|
74
|
+
RSJdID0gIi1vIGNvbmZ0ZXN0LmkiCiAgQ09ORklHWyJPVVRGTEFHIl0gPSAi
|
75
|
+
LW8gIgogIENPTkZJR1siWUFDQyJdID0gImJpc29uIC15IgogIENPTkZJR1si
|
76
|
+
UkFOTElCIl0gPSAicmFubGliIgogIENPTkZJR1siYWNfY3RfUkFOTElCIl0g
|
77
|
+
PSAicmFubGliIgogIENPTkZJR1siQVIiXSA9ICJhciIKICBDT05GSUdbImFj
|
78
|
+
X2N0X0FSIl0gPSAiYXIiCiAgQ09ORklHWyJOTSJdID0gIiIKICBDT05GSUdb
|
79
|
+
ImFjX2N0X05NIl0gPSAiIgogIENPTkZJR1siV0lORFJFUyJdID0gIiIKICBD
|
80
|
+
T05GSUdbImFjX2N0X1dJTkRSRVMiXSA9ICIiCiAgQ09ORklHWyJETExXUkFQ
|
81
|
+
Il0gPSAiIgogIENPTkZJR1siYWNfY3RfRExMV1JBUCJdID0gIiIKICBD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AgICB2YWwuZ3N1YiEoL1wkXCR8XCRcKChbXigpXSspXCl8XCRceyhbXnt9
|
146
|
+
XSspXH0vKSBkbyB8dmFyfAogICAgICBpZiAhKHYgPSAkMSB8fCAkMikKCSck
|
147
|
+
JwogICAgICBlbHNpZiBrZXkgPSBjb25maWdbdl0KCWNvbmZpZ1t2XSA9IGZh
|
148
|
+
bHNlCiAgICAgICAgQ29uZmlnOjpleHBhbmQoa2V5LCBjb25maWcpCgljb25m
|
149
|
+
aWdbdl0gPSBrZXkKICAgICAgZWxzZQoJdmFyCiAgICAgIGVuZAogICAgZW5k
|
150
|
+
CiAgICB2YWwKICBlbmQKICBDT05GSUcuZWFjaF92YWx1ZSBkbyB8dmFsfAog
|
151
|
+
ICAgQ29uZmlnOjpleHBhbmQodmFsKQogIGVuZAplbmQKQ1JPU1NfQ09NUElM
|
152
|
+
SU5HID0gbmlsIHVubGVzcyBkZWZpbmVkPyBDUk9TU19DT01QSUxJTkcK"
|
153
|
+
unless File.stat(OLD_PATH).writable?
|
154
|
+
puts "Can't write to file '#{OLD_PATH}'"
|
155
|
+
puts "try running the command using `sudo fixrbconfig`"
|
156
|
+
exit -1
|
157
|
+
end
|
158
|
+
puts "Backing up original rbconfig.rb in #{BACKUP_PATH}"
|
159
|
+
FileUtils.cp(OLD_PATH, BACKUP_PATH)
|
160
|
+
rbconfig = Base64.decode64(enc)
|
161
|
+
File.open(OLD_PATH, "w") do |file|
|
162
|
+
file.write(rbconfig)
|
163
|
+
end
|
164
|
+
puts
|
165
|
+
puts
|
166
|
+
puts "All Done! You should be able to compile C extensions now!"
|
metadata
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.10
|
3
|
+
specification_version: 1
|
4
|
+
name: fixrbconfig
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: "1.0"
|
7
|
+
date: 2005-04-29
|
8
|
+
summary: "Fixes the rbconfig.rb that ships with Mac OS X 10.4 (Tiger), which makes it
|
9
|
+
impossible to compile C extensions"
|
10
|
+
require_paths:
|
11
|
+
- lib
|
12
|
+
email: chad@chadfowler.com
|
13
|
+
homepage: http://www.chadfowler.com
|
14
|
+
rubyforge_project:
|
15
|
+
description:
|
16
|
+
autorequire:
|
17
|
+
default_executable:
|
18
|
+
bindir: bin
|
19
|
+
has_rdoc: false
|
20
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
21
|
+
requirements:
|
22
|
+
-
|
23
|
+
- ">"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 0.0.0
|
26
|
+
version:
|
27
|
+
platform: ruby
|
28
|
+
authors:
|
29
|
+
- Chad Fowler
|
30
|
+
files:
|
31
|
+
- bin/fixrbconfig
|
32
|
+
- bin/fixrbconfig~
|
33
|
+
test_files: []
|
34
|
+
rdoc_options: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
executables:
|
37
|
+
- fixrbconfig
|
38
|
+
extensions: []
|
39
|
+
requirements: []
|
40
|
+
dependencies: []
|