file-jp2-load: Switch from Jasper to OpenJPEG library

This commit is contained in:
Mukund Sivaraman 2017-02-20 01:36:26 +05:30 committed by Jehan
parent d7e7ab48ba
commit 58a0a65160
4 changed files with 750 additions and 232 deletions

View File

@ -72,6 +72,7 @@ m4_define([lcms_required_version], [2.8])
m4_define([libpng_required_version], [1.6.25]) m4_define([libpng_required_version], [1.6.25])
m4_define([liblzma_required_version], [5.0.0]) m4_define([liblzma_required_version], [5.0.0])
m4_define([openexr_required_version], [1.6.1]) m4_define([openexr_required_version], [1.6.1])
m4_define([openjpeg_required_version], [2.1.0])
m4_define([gtk_mac_integration_required_version], [2.0.0]) m4_define([gtk_mac_integration_required_version], [2.0.0])
m4_define([intltool_required_version], [0.40.1]) m4_define([intltool_required_version], [0.40.1])
m4_define([perl_required_version], [5.10.0]) m4_define([perl_required_version], [5.10.0])
@ -1783,30 +1784,27 @@ AC_SUBST(WMF_LIBS)
AC_SUBST(WMF_CFLAGS) AC_SUBST(WMF_CFLAGS)
##################### ####################
# Check for libjasper # Check for OpenJPEG
##################### ####################
AC_ARG_WITH(libjasper, [ --without-libjasper build without JPEG-2000 support]) AC_ARG_WITH(jpeg2000, [ --without-jpeg2000 build without JPEG 2000 support])
have_jp2=no have_openjpeg=no
if test "x$with_libjasper" != xno && test -z "$JASPER_LIBS"; then if test "x$with_jpeg2000" != xno; then
have_jp2=yes have_openjpeg=yes
AC_CHECK_LIB(jasper, jas_init, PKG_CHECK_MODULES(OPENJPEG, libopenjp2 >= openjpeg_required_version,
FILE_JP2_LOAD='file-jp2-load$(EXEEXT)' ; JP2_LIBS=-ljasper, FILE_JP2_LOAD='file-jp2-load$(EXEEXT)'
[have_jp2="no (JasPer library not found)" have_openjpeg=yes,
AC_MSG_WARN(*** JP2 plug-in will not be built (JasPer library not found) ***)]) have_openjpeg="no (OpenJPEG not found)")
else
have_jp2="no (JasPer support disabled)"
fi fi
if test "x$have_jp2" = xyes; then if test "x$have_openjpeg" = xyes; then
MIME_TYPES="$MIME_TYPES;image/jp2;image/jpeg2000;image/jpx" MIME_TYPES="$MIME_TYPES;image/jp2"
fi fi
AM_CONDITIONAL(BUILD_JP2, test "x$have_jp2" = xyes) AM_CONDITIONAL(HAVE_OPENJPEG, test "x$have_openjpeg" = xyes)
AC_SUBST(FILE_JP2_LOAD) AC_SUBST(FILE_JP2_LOAD)
AC_SUBST(JP2_LIBS)
################ ################
@ -2732,7 +2730,7 @@ Optional Plug-Ins:
Ascii Art: $have_libaa Ascii Art: $have_libaa
Ghostscript: $have_gs Ghostscript: $have_gs
Help Browser: $have_webkit Help Browser: $have_webkit
JPEG 2000: $have_jp2 JPEG 2000: $have_openjpeg
MNG: $have_libmng MNG: $have_libmng
OpenEXR: $have_openexr OpenEXR: $have_openexr
WebP: $have_webp WebP: $have_webp

View File

@ -840,6 +840,8 @@ file_html_table_LDADD = \
$(INTLLIBS) \ $(INTLLIBS) \
$(file_html_table_RC) $(file_html_table_RC)
file_jp2_load_CFLAGS = $(OPENJPEG_CFLAGS)
file_jp2_load_SOURCES = \ file_jp2_load_SOURCES = \
file-jp2-load.c file-jp2-load.c
@ -854,7 +856,7 @@ file_jp2_load_LDADD = \
$(libgimpbase) \ $(libgimpbase) \
$(GTK_LIBS) \ $(GTK_LIBS) \
$(GEGL_LIBS) \ $(GEGL_LIBS) \
$(JP2_LIBS) \ $(OPENJPEG_LIBS) \
$(RT_LIBS) \ $(RT_LIBS) \
$(INTLLIBS) \ $(INTLLIBS) \
$(file_jp2_load_RC) $(file_jp2_load_RC)

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@
'file-glob' => {}, 'file-glob' => {},
'file-header' => { ui => 1, gegl => 1 }, 'file-header' => { ui => 1, gegl => 1 },
'file-html-table' => { ui => 1, gegl => 1 }, 'file-html-table' => { ui => 1, gegl => 1 },
'file-jp2-load' => { ui => 1, optional => 1, gegl => 1, libs => 'JP2_LIBS' }, 'file-jp2-load' => { ui => 1, optional => 1, gegl => 1, libs => 'OPENJPEG_LIBS', cflags => 'OPENJPEG_CFLAGS' },
'file-mng' => { ui => 1, gegl => 1, optional => 1, libs => 'MNG_LIBS', cflags => 'MNG_CFLAGS' }, 'file-mng' => { ui => 1, gegl => 1, optional => 1, libs => 'MNG_LIBS', cflags => 'MNG_CFLAGS' },
'file-pat' => { ui => 1, gegl => 1 }, 'file-pat' => { ui => 1, gegl => 1 },
'file-pcx' => { ui => 1, gegl => 1 }, 'file-pcx' => { ui => 1, gegl => 1 },