new package openjpeg with fixes

This commit is contained in:
Rashad 2015-06-06 18:46:17 +02:00
parent 600a9f385b
commit a97c6bf0b4
4 changed files with 65 additions and 0 deletions

View File

@ -1964,6 +1964,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="package">openexr</td>
<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>

View File

@ -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);

View File

@ -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")))

29
src/openjpeg.mk Normal file
View File

@ -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