--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,8 +159,16 @@
+ have_jpeg=${ac_cv_lib_jpeg_jpeg_CreateCompress:-no}
+
+ # Check for libjasper.
+-AC_CHECK_LIB(jasper, jas_image_decode)
+-have_jasper=${ac_cv_lib_jasper_jas_image_decode:-no}
++AC_ARG_ENABLE([jasper],
++ AS_HELP_STRING([--enable-jasper], [enable JPEG2000 support]))
++
++have_jasper=no
++AS_IF([test "x$enable_jasper" = "xyes"], [
++ AC_SEARCH_LIBS([jas_image_decode], [jasper], [have_jasper=yes], [
++ AC_MSG_ERROR([unable to find the jas_image_decode() function])
++ ])
++])
++
+
+ # Check for tiff headers and library.
+ PKG_CHECK_MODULES(LIBTIFF, libtiff-4,
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
-IUSE="contrast fits gimp gnome gtk openmp timezone"
+IUSE="contrast fits gimp gnome gtk jpeg2k openmp timezone"
REQUIRED_USE="gimp? ( gtk )"
>=media-gfx/gtkimageview-1.5
>=x11-libs/gtk+-2.6:2
)
+ jpeg2k? ( media-libs/jasper:= )
"
DEPEND="${RDEPEND}
virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
+ "${FILESDIR}"/${P}-jasper-automagic.patch
"${FILESDIR}"/${P}-crashfix.patch
)
$(use_with gimp) \
$(use_enable gnome mime) \
$(use_with gtk) \
+ $(use_enable jpeg2k jasper) \
$(use_enable openmp) \
$(use_enable timezone dst-correction)
}