aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSean Lynch2011-10-24 14:19:36 -0700
committerAdam Vandenberg2011-11-27 09:27:10 -0800
commit0307739c5d5c889f2d79eba6969a5a9cdc45da02 (patch)
tree0b4e505fbdcd7c60b270b37c412ccae338f68ad2 /Library
parent2288bb3cc71da27c7899538a57e921d6b07b2d74 (diff)
downloadhomebrew-0307739c5d5c889f2d79eba6969a5a9cdc45da02.tar.bz2
freeimage 3.15.1
* also build/install C++ wrapper Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/freeimage.rb80
1 files changed, 67 insertions, 13 deletions
diff --git a/Library/Formula/freeimage.rb b/Library/Formula/freeimage.rb
index 165059e19..70607d12a 100644
--- a/Library/Formula/freeimage.rb
+++ b/Library/Formula/freeimage.rb
@@ -1,18 +1,18 @@
require 'formula'
-class FreeimageHttpDownloadStrategy <CurlDownloadStrategy
+class FreeimageHttpDownloadStrategy < CurlDownloadStrategy
def stage
# need to convert newlines or patch chokes
- safe_system '/usr/bin/unzip', '-aqq', @tarball_path
+ safe_system '/usr/bin/unzip', '-aaqq', @tarball_path
chdir
end
end
class Freeimage < Formula
- url 'http://downloads.sourceforge.net/project/freeimage/Source%20Distribution/3.13.1/FreeImage3131.zip',
+ url 'http://downloads.sourceforge.net/project/freeimage/Source%20Distribution/3.15.1/FreeImage3151.zip',
:using => FreeimageHttpDownloadStrategy
- version '3.13.1'
- md5 'a2e20b223a2cf6a5791cc47686364e99'
+ version '3.15.1'
+ md5 '450d2ff278690b0d1d7d7d58fad083cc'
homepage 'http://sf.net/projects/freeimage'
def patches
@@ -22,12 +22,14 @@ class Freeimage < Formula
def install
system "gnumake -f Makefile.gnu"
system "gnumake -f Makefile.gnu install PREFIX=#{prefix}"
+ system "gnumake -f Makefile.fip"
+ system "gnumake -f Makefile.fip install PREFIX=#{prefix}"
end
end
__END__
---- old/Makefile.gnu 2009-07-27 20:35:26.000000000 -0400
-+++ new/Makefile.gnu 2009-11-16 10:53:33.000000000 -0300
+--- old/Makefile.gnu 2010-12-06 23:37:20.000000000 -0800
++++ new/Makefile.gnu 2011-10-19 13:42:59.000000000 -0700
@@ -5,8 +5,9 @@
# General configuration variables:
@@ -64,23 +66,75 @@ __END__
cp Source/FreeImage.h Dist
dos2unix:
-@@ -55,16 +55,17 @@
- $(CXX) $(CXXFLAGS) -c $< -o $@
+@@ -58,16 +58,14 @@
+ $(AR) r $@ $(MODULES)
- $(STATICLIB): $(MODULES)
-- $(AR) r $@ $(MODULES)
-+ $(LIBTOOL) -static -o $@ $(MODULES)
+ $(SHAREDLIB): $(MODULES)
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
++ $(CXX) -dynamiclib -install_name $(LIBNAME) -current_version $(VER_MAJOR).$(VER_MINOR) -compatibility_version $(VER_MAJOR) -o $@ $(MODULES)
+
+ install:
+ install -d $(INCDIR) $(INSTALLDIR)
+- install -m 644 -o root -g root $(HEADER) $(INCDIR)
+- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+- ldconfig
++ install -m 644 $(HEADER) $(INCDIR)
++ install -m 644 $(STATICLIB) $(INSTALLDIR)
++ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
++ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
+
+ clean:
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+--- old/Makefile.fip 2011-10-19 11:20:03.000000000 -0700
++++ new/Makefile.fip 2011-10-19 11:24:01.000000000 -0700
+@@ -5,8 +5,9 @@
+
+ # General configuration variables:
+ DESTDIR ?= /
+-INCDIR ?= $(DESTDIR)/usr/include
+-INSTALLDIR ?= $(DESTDIR)/usr/lib
++PREFIX ?= /usr/local
++INCDIR ?= $(DESTDIR)$(PREFIX)/include
++INSTALLDIR ?= $(DESTDIR)$(PREFIX)/lib
+
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+@@ -28,7 +29,7 @@
+ TARGET = freeimageplus
+ STATICLIB = lib$(TARGET).a
+ SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+-LIBNAME = lib$(TARGET).so
++LIBNAME = lib$(TARGET).dylib
+ VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
+ HEADER = Source/FreeImage.h
+ HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
+@@ -40,7 +41,7 @@
+
+ dist: FreeImage
+ cp *.a Dist
+- cp *.so Dist
++ cp *.dylib Dist
+ cp Source/FreeImage.h Dist
+ cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist
+
+@@ -59,14 +60,15 @@
+ $(AR) r $@ $(MODULES)
$(SHAREDLIB): $(MODULES)
-- $(CC) -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
+- $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
+ $(CXX) -dynamiclib -install_name $(LIBNAME) -current_version $(VER_MAJOR).$(VER_MINOR) -compatibility_version $(VER_MAJOR) -o $@ $(MODULES)
install:
install -d $(INCDIR) $(INSTALLDIR)
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
+- install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+ install -m 644 $(HEADER) $(INCDIR)
++ install -m 644 $(HEADERFIP) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ ln -s $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)