Skip to content

Commit

Permalink
update config.{guess,sub} to support newer architectures
Browse files Browse the repository at this point in the history
fix PR#76 => westonplatter#76
  • Loading branch information
ryoga-chan committed Nov 22, 2023
1 parent 9141857 commit d8ed3cb
Show file tree
Hide file tree
Showing 4 changed files with 3,773 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ ext/phashion_ext
!ext/phashion_ext/extconf.rb
!ext/phashion_ext/phashion_ext.c
!ext/phashion_ext/pHash-0.9.6.tar.gz
!ext/phashion_ext/patches
!ext/phashion_ext/patches/*
lib/phashion_ext.bundle
6 changes: 5 additions & 1 deletion ext/phashion_ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
raise "'#{cmd}' failed" unless system(cmd)

puts "patching pHash sources for PNG alpha channel support"
puts(cmd = "patch -d pHash-0.9.6 -p1 < #{File.join 'patches', 'png_alpha.diff'}")
puts(cmd = "patch -d pHash-0.9.6 -p1 < patches/png_alpha.diff")
raise "'#{cmd}' failed" unless system(cmd)

puts "updating config.{guess,sub} to support newer architectures"
FileUtils.cp_f 'patches/config.sub' , BASEDIR
FileUtils.cp_f 'patches/config.guess', BASEDIR

Dir.chdir(BUNDLE_PATH) do
puts(cmd = "env CXXFLAGS='#{$CXXFLAGS}' CFLAGS='#{$CFLAGS}' LDFLAGS='#{$LDFLAGS}' ./configure --prefix=#{BASEDIR} --disable-audio-hash --disable-video-hash --disable-shared --with-pic 2>&1")
raise "'#{cmd}' failed" unless system(cmd)
Expand Down
Loading

0 comments on commit d8ed3cb

Please sign in to comment.