Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

+ Extended build to look for homebrew setup (hcatlin)

[git-p4: depot-paths = "//src/image_science/dev/": change = 5984]
commit 1816f8c61cedf5df0f1cf6b8db347a4994745619 1 parent d5b3523
Ryan Davis authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  lib/image_science.rb
8  lib/image_science.rb
@@ -88,9 +88,11 @@ def cropped_thumbnail(size) # :yields: image
88 88
   end
89 89
 
90 90
   inline do |builder|
91  
-    if test ?d, "/opt/local" then
92  
-      builder.add_compile_flags "-I/opt/local/include"
93  
-      builder.add_link_flags "-L/opt/local/lib"
  91
+    %w[/opt/local /usr/local].each do |dir|
  92
+      if File.directory? "#{dir}/include" then
  93
+        builder.add_compile_flags "-I#{dir}/include"
  94
+        builder.add_link_flags "-L#{dir}/lib"
  95
+      end
94 96
     end
95 97
 
96 98
     builder.add_link_flags "-lfreeimage"

3 notes on commit 1816f8c

Josh French

This patch alone is worth a new gem release. FreeImage has historically been a pain to install, Homebrew cleared that up; ImageScience should be just as easy.

Steve

Yes, this patch is worth a new gem release

Benjamin Booth

Yes, please!

Please sign in to comment.
Something went wrong with that request. Please try again.