diff options
author | Fabian Groffen <grobian@gentoo.org> | 2009-04-26 21:01:28 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2009-04-26 21:01:28 +0000 |
commit | 2b3364694534754aefe03f47e446810a518c48f3 (patch) | |
tree | e6d52c43242dd296a1ab0c332734130aa0955a9d /media-libs/openjpeg/files | |
parent | Bump to 4.65, closes #249780. Based on the ebuild by jlec, incorporating chan... (diff) | |
download | gentoo-2-2b3364694534754aefe03f47e446810a518c48f3.tar.gz gentoo-2-2b3364694534754aefe03f47e446810a518c48f3.tar.bz2 gentoo-2-2b3364694534754aefe03f47e446810a518c48f3.zip |
Add compilation patches for FreeBSD and Darwin, fix bug #253012, thanks Dan Coats for the initial patch for FreeBSD
(Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/openjpeg/files')
-rw-r--r-- | media-libs/openjpeg/files/openjpeg-1.3-darwin.patch | 41 | ||||
-rw-r--r-- | media-libs/openjpeg/files/openjpeg-1.3-freebsd.patch | 20 |
2 files changed, 61 insertions, 0 deletions
diff --git a/media-libs/openjpeg/files/openjpeg-1.3-darwin.patch b/media-libs/openjpeg/files/openjpeg-1.3-darwin.patch new file mode 100644 index 000000000000..7115ebadc38a --- /dev/null +++ b/media-libs/openjpeg/files/openjpeg-1.3-darwin.patch @@ -0,0 +1,41 @@ +* <grobian@gentoo.org>: small compilation fix for Darwin, and produce + correct(ly named) dylibs + +--- libopenjpeg/opj_malloc.h ++++ libopenjpeg/opj_malloc.h +@@ -75,7 +75,7 @@ + #else /* Not WIN32 */
+ #if defined(__sun)
+ #define HAVE_MEMALIGN
+- #elif defined(__GNUC__)
++ #elif defined(__GNUC__) && !defined(__APPLE__)
+ #if defined(__FreeBSD__)
+ #include <stdlib.h>
+ #include <osreldate.h>
+--- Makefile ++++ Makefile +@@ -26,8 +26,15 @@ + + TARGET = openjpeg + STATICLIB = lib$(TARGET).a ++ifeq ($(TARGOS),Darwin) ++SHAREDLIB = lib$(TARGET).$(VER_MAJOR).$(VER_MINOR).dylib ++LIBNAME = lib$(TARGET).$(VER_MAJOR).dylib ++LIBCMD = -dynamiclib -install_name $(INSTALL_LIBDIR)/$(LIBNAME) ++else + SHAREDLIB = lib$(TARGET).so.$(VER_MAJOR).$(VER_MINOR) + LIBNAME = lib$(TARGET).so.$(VER_MAJOR) ++LIBCMD = -shared -Wl,-soname,$(LIBNAME) ++endif + + + +@@ -54,7 +61,7 @@ + $(AR) r $@ $(MODULES) + + $(SHAREDLIB): $(MODULES) +- $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES) ++ $(CC) $(LDFLAGS) $(LIBCMD) -o $@ $(MODULES) $(LIBRARIES) + + install: OpenJPEG + install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)' diff --git a/media-libs/openjpeg/files/openjpeg-1.3-freebsd.patch b/media-libs/openjpeg/files/openjpeg-1.3-freebsd.patch new file mode 100644 index 000000000000..5dbe02ca8641 --- /dev/null +++ b/media-libs/openjpeg/files/openjpeg-1.3-freebsd.patch @@ -0,0 +1,20 @@ +http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/graphics/openjpeg/files/patch-opj_malloc.h?rev=1.1;content-type=text%2Fplain + +patch modified not to contain a bogus empty #if block + +--- libopenjpeg/opj_malloc.h ++++ libopenjpeg/opj_malloc.h +@@ -76,8 +76,13 @@ + #if defined(__sun)
+ #define HAVE_MEMALIGN
+ #elif defined(__GNUC__)
++ #if defined(__FreeBSD__)
++ #include <stdlib.h>
++ #include <osreldate.h>
++ #else
+ #define HAVE_MEMALIGN
+ #include <malloc.h>
++ #endif
+ /* Linux x86_64 and OSX always align allocations to 16 bytes */
+ #elif !defined(__amd64__) && !defined(__APPLE__)
+ /* FIXME: Yes, this is a big assumption */
|