aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-07-23 21:38:08 -0500
committerJack Nagel2014-07-23 21:39:55 -0500
commitf3e83bc99282f4a69c99076f894268f23c2afea4 (patch)
tree3f0f882daf938faf09d946ff501420e11d607114 /Library/Formula
parentbb10e17009178a77aee62f60d9bcddd643f353cc (diff)
downloadhomebrew-f3e83bc99282f4a69c99076f894268f23c2afea4.tar.bz2
freeimage: refresh patch to fix dylib name issues
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/freeimage.rb86
1 files changed, 45 insertions, 41 deletions
diff --git a/Library/Formula/freeimage.rb b/Library/Formula/freeimage.rb
index f2e23fd1e..18281b036 100644
--- a/Library/Formula/freeimage.rb
+++ b/Library/Formula/freeimage.rb
@@ -30,11 +30,11 @@ end
__END__
diff --git a/Makefile.fip b/Makefile.fip
-index f4336d2..15e8c00 100644
+index 6006221..e306d35 100644
--- a/Makefile.fip
+++ b/Makefile.fip
@@ -5,8 +5,9 @@ include fipMakefile.srcs
-
+
# General configuration variables:
DESTDIR ?= /
-INCDIR ?= $(DESTDIR)/usr/include
@@ -42,38 +42,40 @@ index f4336d2..15e8c00 100644
+PREFIX ?= /usr/local
+INCDIR ?= $(DESTDIR)$(PREFIX)/include
+INSTALLDIR ?= $(DESTDIR)$(PREFIX)/lib
-
+
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
-@@ -27,8 +28,8 @@ endif
-
+@@ -35,9 +36,9 @@ endif
+
TARGET = freeimageplus
STATICLIB = lib$(TARGET).a
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
-LIBNAME = lib$(TARGET).so
-+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
+-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++SHAREDLIB = lib$(TARGET).$(VER_MAJOR).$(VER_MINOR).dylib
+LIBNAME = lib$(TARGET).dylib
- VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib
HEADER = Source/FreeImage.h
HEADERFIP = Wrapper/FreeImagePlus/FreeImagePlus.h
-@@ -40,7 +41,7 @@ all: dist
-
+
+@@ -48,7 +49,7 @@ all: dist
+
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 @@ $(STATICLIB): $(MODULES)
- $(AR) r $@ $(MODULES)
-
+ cp Wrapper/FreeImagePlus/FreeImagePlus.h Dist
+
+@@ -67,14 +68,15 @@ $(STATICLIB): $(MODULES)
+ $(AR) r $@ $(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) $(LDFLAGS) -o $@ $(MODULES)
-
+
install:
- install -d $(INCDIR) $(INSTALLDIR)
+ 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)
@@ -83,15 +85,15 @@ index f4336d2..15e8c00 100644
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ ln -s $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
-
+
clean:
- rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
diff --git a/Makefile.gnu b/Makefile.gnu
-index 0c967b8..e50ed7f 100644
+index 5f2c625..c98f44a 100644
--- a/Makefile.gnu
+++ b/Makefile.gnu
@@ -5,8 +5,9 @@ include Makefile.srcs
-
+
# General configuration variables:
DESTDIR ?= /
-INCDIR ?= $(DESTDIR)/usr/include
@@ -99,36 +101,38 @@ index 0c967b8..e50ed7f 100644
+PREFIX ?= /usr/local
+INCDIR ?= $(DESTDIR)$(PREFIX)/include
+INSTALLDIR ?= $(DESTDIR)$(PREFIX)/lib
-
+
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
-@@ -27,8 +28,8 @@ endif
-
+@@ -35,9 +36,9 @@ endif
+
TARGET = freeimage
STATICLIB = lib$(TARGET).a
-SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
-LIBNAME = lib$(TARGET).so
-+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).dylib
+-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++SHAREDLIB = lib$(TARGET).$(VER_MAJOR).$(VER_MINOR).dylib
+LIBNAME = lib$(TARGET).dylib
- VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
++VERLIBNAME = lib$(TARGET).$(VER_MAJOR).dylib
HEADER = Source/FreeImage.h
-
-@@ -40,7 +41,7 @@ all: dist
-
+
+
+@@ -48,7 +49,7 @@ all: dist
+
dist: FreeImage
- cp *.a Dist
+ cp *.a Dist
- cp *.so Dist
+ cp *.dylib Dist
- cp Source/FreeImage.h Dist
-
+ cp Source/FreeImage.h Dist
+
dos2unix:
-@@ -58,13 +59,13 @@ $(STATICLIB): $(MODULES)
- $(AR) r $@ $(MODULES)
-
+@@ -66,13 +67,13 @@ $(STATICLIB): $(MODULES)
+ $(AR) r $@ $(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) $(LDFLAGS) -o $@ $(MODULES)
-
+
install:
install -d $(INCDIR) $(INSTALLDIR)
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
@@ -137,18 +141,18 @@ index 0c967b8..e50ed7f 100644
+ install -m 644 $(HEADER) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
- ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
+ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+ ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
# ldconfig
diff --git a/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Source/OpenEXR/IlmImf/ImfAutoArray.h
-index edb8b10..3ecf3e0 100755
+index 7b4533f..98bf458 100644
--- a/Source/OpenEXR/IlmImf/ImfAutoArray.h
+++ b/Source/OpenEXR/IlmImf/ImfAutoArray.h
@@ -44,6 +44,7 @@
//
//-----------------------------------------------------------------------------
-
+
+#include <cstring>
#include "OpenEXRConfig.h"
-
- namespace Imf {
+ #if !defined(_WIN32) || defined(__MINGW32__)
+ // needed for memset