changeset 5634:90c2dc72dd16

Add openjpeg * src/openjpeg.mk: new file * dist-files.mk, index.html: add ref to new file
author John Donoghue <john.donoghue@ieee.org>
date Wed, 06 Jan 2021 13:36:01 -0500
parents 8a8a240f3590
children a7e3baa1e86e
files dist-files.mk index.html src/openjpeg.mk
diffstat 3 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sat Jan 02 08:45:15 2021 -0500
+++ b/dist-files.mk	Wed Jan 06 13:36:01 2021 -0500
@@ -552,6 +552,7 @@
   opencv-1-fixes.patch \
   opencv.mk \
   openexr.mk \
+  openjpeg.mk \
   openscenegraph-1-fixes.patch \
   openscenegraph.mk \
   openssl-1-fixes.patch \
--- a/index.html	Sat Jan 02 08:45:15 2021 -0500
+++ b/index.html	Wed Jan 06 13:36:01 2021 -0500
@@ -2446,6 +2446,10 @@
         <td class="website"><a href="http://www.openexr.com/">OpenEXR</a></td>
     </tr>
     <tr>
+        <td class="package">openjpeg</td>
+        <td class="website"><a href="https://www.openjpeg.org/">OpenJPEG</a></td>
+    </tr>
+    <tr>
         <td class="package">openscenegraph</td>
         <td class="website"><a href="http://www.openscenegraph.org/">OpenSceneGraph</a></td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/openjpeg.mk	Wed Jan 06 13:36:01 2021 -0500
@@ -0,0 +1,33 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := openjpeg
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 2.4.0
+$(PKG)_CHECKSUM := bbbf4dc4d9ce95286843cd39ac2febd3fd516c9d
+$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE     := $($(PKG)_SUBDIR).tar.gz
+$(PKG)_URL      := https://github.com/uclouvain/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz
+$(PKG)_DEPS     := lcms libpng tiff zlib
+
+$(PKG)_CMAKE_FLAGS :=
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'https://github.com/uclouvain/openjpeg/tags' | \
+    $(SED) -n 's|.*releases/tag/v\([0-9][^"]*\).*|\1|p' | $(SORT) -V | \
+    tail -1
+endef
+
+define $(PKG)_BUILD
+    cd '$(1)' && cmake \
+        $($(PKG)_CMAKE_FLAGS) \
+        -DBUILD_PKGCONFIG_FILES=ON \
+        -DBUILD_TESTING=OFF \
+        $(CMAKE_CCACHE_FLAGS) \
+        $(CMAKE_BUILD_SHARED_OR_STATIC) \
+        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
+        .
+
+    $(MAKE) -C '$(1)' -j '$(JOBS)' VERBOSE=1
+    $(MAKE) -C '$(1)' -j '1' VERBOSE=1 DESTDIR='$(3)' install
+endef