mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Add mechanism to strip "-m32" and substitute "lib32" into "lib"
for the case of ARM to avoid SHORTARCH flood.
This commit is contained in:
1
crew
1
crew
@@ -15,6 +15,7 @@ CREW_CONFIG_PATH = CREW_PREFIX + '/etc/crew/'
|
||||
CREW_BREW_DIR = CREW_PREFIX + '/tmp/crew/'
|
||||
CREW_DEST_DIR = CREW_BREW_DIR + '/dest'
|
||||
|
||||
ARCH = `uname -m | tr -d '\n\r'`
|
||||
SHORTARCH = `getconf LONG_BIT | tr -d '\n\r'`
|
||||
|
||||
$LOAD_PATH.unshift "#{CREW_LIB_PATH}lib"
|
||||
|
||||
@@ -28,6 +28,12 @@ class Package
|
||||
end
|
||||
|
||||
def self.system(*args)
|
||||
# strip -m32 option and convert lib32 to lib for the case of ARM to avoid SHORTARCH flood
|
||||
if ARCH == "armv7l"
|
||||
args = args.map {|s| s.gsub("-m32", "")}
|
||||
args = args.map {|s| s.gsub("lib32", "lib")}
|
||||
puts *args
|
||||
end
|
||||
Kernel.system(*args)
|
||||
exitstatus = $?.exitstatus
|
||||
raise InstallError.new("`#{args.join(" ")}` exited with #{exitstatus}") unless exitstatus == 0
|
||||
|
||||
Reference in New Issue
Block a user