summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashad <mohammedrashadkm@gmail.com>2015-06-06 16:46:17 (GMT)
committerRashad <mohammedrashadkm@gmail.com>2015-06-06 16:46:17 (GMT)
commita97c6bf0b42a7ec8bddf45253e9a236bd218954c (patch)
treed32bc650222694e3e0abfac632c3bf8d6e3ccdb7
parent600a9f385ba11595097d5dd6d7b4ce2bd02083bd (diff)
downloadmxe-a97c6bf0b42a7ec8bddf45253e9a236bd218954c.zip
mxe-a97c6bf0b42a7ec8bddf45253e9a236bd218954c.tar.gz
mxe-a97c6bf0b42a7ec8bddf45253e9a236bd218954c.tar.bz2
new package openjpeg with fixes
-rw-r--r--index.html4
-rw-r--r--src/openjpeg-1-dllfix.patch16
-rw-r--r--src/openjpeg-2-dllmacro.patch16
-rw-r--r--src/openjpeg.mk29
4 files changed, 65 insertions, 0 deletions
diff --git a/index.html b/index.html
index a0cfbdb..e36e8a4 100644
--- a/index.html
+++ b/index.html
@@ -1965,6 +1965,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="website"><a href="http://www.openexr.com/">OpenEXR</a></td>
</tr>
<tr>
+ <td class="package">openjpeg</td>
+ <td class="website"><a href="http://www.openjpeg.org/">OpenJPEG</a></td>
+ </tr>
+ <tr>
<td class="package">openmp-validation</td>
<td class="website"><a href="http://web.cs.uh.edu/~openuh/">OpenMP Validation Suite</a></td>
</tr>
diff --git a/src/openjpeg-1-dllfix.patch b/src/openjpeg-1-dllfix.patch
new file mode 100644
index 0000000..ce38dba
--- /dev/null
+++ b/src/openjpeg-1-dllfix.patch
@@ -0,0 +1,16 @@
+# This file is part of MXE.
+# See index.html for further information.
+#Author: Julien Michel <julien.michel@orfeo-toolbox.org>
+
+diff -bur openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.c openjpeg-2.0.1/src/lib/openjp2/openjpeg.c
+--- openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.c 2014-10-15 10:56:09.435396565 +0530
++++ openjpeg-2.0.1/src/lib/openjp2/openjpeg.c 2014-10-15 10:57:18.038964950 +0530
+@@ -132,7 +132,7 @@
+ #ifdef _WIN32
+ #ifndef OPJ_STATIC
+ BOOL APIENTRY
+-DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
++DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
+
+ OPJ_ARG_NOT_USED(lpReserved);
+ OPJ_ARG_NOT_USED(hModule);
diff --git a/src/openjpeg-2-dllmacro.patch b/src/openjpeg-2-dllmacro.patch
new file mode 100644
index 0000000..09b3046
--- /dev/null
+++ b/src/openjpeg-2-dllmacro.patch
@@ -0,0 +1,16 @@
+# This file is part of MXE.
+# See index.html for further information.
+#Author: Julien Michel <julien.michel@orfeo-toolbox.org>
+diff -bur openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.h openjpeg-2.0.1.diff/src/lib/openjp2/openjpeg.h
+--- openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.h 2014-04-22 13:24:20.000000000 +0530
++++ openjpeg-2.0.1.diff/src/lib/openjp2/openjpeg.h 2014-10-07 04:12:01.325229155 +0530
+@@ -76,7 +76,8 @@
+ #define OPJ_DEPRECATED(func) func
+ #endif
+
+-#if defined(OPJ_STATIC) || !defined(_WIN32)
++
++#if defined(OPJ_STATIC) || defined(__MINGW32__) || !defined(_WIN32)
+ /* http://gcc.gnu.org/wiki/Visibility */
+ #if __GNUC__ >= 4
+ #define OPJ_API __attribute__ ((visibility ("default")))
diff --git a/src/openjpeg.mk b/src/openjpeg.mk
new file mode 100644
index 0000000..0ffeafe
--- /dev/null
+++ b/src/openjpeg.mk
@@ -0,0 +1,29 @@
+# This file is part of MXE.
+# See index.html for further information.
+#Author: Julien Michel <julien.michel@orfeo-toolbox.org>
+
+PKG := openjpeg
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 2.1.0
+$(PKG)_CHECKSUM := c2a255f6b51ca96dc85cd6e85c89d300018cb1cb
+$(PKG)_SUBDIR := openjpeg-$($(PKG)_VERSION)
+$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
+$(PKG)_URL := https://sourceforge.net/projects/openjpeg.mirror/files/$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc tiff libpng zlib lcms
+
+#git commit 3d95bcf
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'https://sourceforge.net/projects/openjpeg.mirror/files/' | \
+ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ mkdir '$(1).build'
+ cd '$(1).build' && cmake \
+ -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
+ -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \
+ -DBUILD_TESTING=FALSE \
+ '$(1)'
+ $(MAKE) -C '$(1).build' install
+endef