summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--vars/build.vars6
-rw-r--r--vars/openjpeg.vars30
2 files changed, 35 insertions, 1 deletions
diff --git a/vars/build.vars b/vars/build.vars
index e7f9538d..f4dca4fc 100644
--- a/vars/build.vars
+++ b/vars/build.vars
@@ -474,7 +474,7 @@ NATIVE_PACKAGES_DEPS_MAKEFLAGS_INSTALL="PREFIX= prefix=";
NATIVE_PACKAGES_DEPS_PACKAGES="
libatomic_ops bdwgc clzip expat libxml2 alsa_lib apr apr_util bzip2
libdmtx libressl libnettle libunistring gnutls curl libz lmdb libpcap
-libpng libjpeg_turbo tiff giflib lcms2 libffi gdbm geoip pcre gettext_tiny
+libpng libjpeg_turbo tiff giflib lcms2 openjpeg libffi gdbm geoip pcre gettext_tiny
glib gzip libarchive musl_compat musl_fts libbsd libpipeline libtelnet
libevent libfetch libogg libvorbis libflac libtheora libsasl2 libsndfile
libgpg_error libassuan libfirm libgcrypt libksba libudns lua ncurses
@@ -574,6 +574,10 @@ NATIVE_PACKAGES_DEPS_PYTHON="${PREFIX}/bin/python2";
: ${PKG_LCMS2_SHA256SUM:=48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20};
: ${PKG_LCMS2_VERSION:=2.9};
: ${PKG_LCMS2_URL:=https://sourceforge.mirrorservice.org/l/lc/lcms/lcms/${PKG_LCMS2_VERSION}/lcms2-${PKG_LCMS2_VERSION}.tar.gz};
+: ${PKG_OPENJPEG_SHA256SUM:=63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9};
+: ${PKG_OPENJPEG_VERSION:=2.3.1};
+: ${PKG_OPENJPEG_URL:=https://github.com/uclouvain/openjpeg/archive/v${PKG_OPENJPEG_VERSION}.tar.gz};
+: ${PKG_OPENJPEG_SUBDIR:=openjpeg-${PKG_OPENJPEG_VERSION}};
: ${PKG_LIBFFI_SHA256SUM:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37};
: ${PKG_LIBFFI_VERSION:=3.2.1};
: ${PKG_LIBFFI_URL:=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_VERSION}.tar.gz};
diff --git a/vars/openjpeg.vars b/vars/openjpeg.vars
new file mode 100644
index 00000000..7b7f006f
--- /dev/null
+++ b/vars/openjpeg.vars
@@ -0,0 +1,30 @@
+#
+# set -o errexit -o noglob are assumed.
+#
+
+pkg_openjpeg_configure() {
+ rm -f config.cache;
+ env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \
+ PREFIX="" \
+ cmake -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \
+ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
+ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
+ -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \
+ -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \
+ -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \
+ -DCMAKE_INSTALL_PREFIX= \
+ -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \
+ -DLCMS2_INCLUDE_DIR="${PKG_PREFIX}/include" \
+ -DLCMS2_LIBRARY="${PKG_PREFIX}/lib/liblcms2.lib.a" \
+ -DPNG_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libpng.lib.a" \
+ -DPNG_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libpng.lib.a" \
+ -DPNG_PNG_INCLUDE_DIR="${PKG_PREFIX}/include" \
+ -DTIFF_INCLUDE_DIR="${PKG_PREFIX}/include" \
+ -DTIFF_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libtiff.lib.a" \
+ -DTIFF_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libtiff.lib.a" \
+ -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \
+ -DZLIB_LIBRARY_DEBUG="${PKG_PREFIX}/lib/libz.lib.a" \
+ -DZLIB_LIBRARY_RELEASE="${PKG_PREFIX}/lib/libz.lib.a" \
+ "../openjpeg-${PKG_VERSION}";
+}