summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lermytte <gentoo@lermytte.be>2016-11-28 00:07:16 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-04-04 17:41:35 +0200
commit2da389e51d92dbe277d6e7b5cfd8194d5cae4ec3 (patch)
treefde59b23c7e674459e60ee201d8a4e0090a8d7b5 /media-gfx/ufraw
parentmedia-gfx/ufraw: Fix runtime crash (diff)
downloadgentoo-2da389e51d92dbe277d6e7b5cfd8194d5cae4ec3.tar.gz
gentoo-2da389e51d92dbe277d6e7b5cfd8194d5cae4ec3.tar.bz2
gentoo-2da389e51d92dbe277d6e7b5cfd8194d5cae4ec3.zip
media-gfx/ufraw: add explicit jpeg2k support
Upstream links to libjasper when available. This commit patches configure.ac to make libjasper support explicit and adds a jpeg2k USE flag to enable/disable it. Gentoo-bug: 470836 Package-Manager: portage-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/2939
Diffstat (limited to 'media-gfx/ufraw')
-rw-r--r--media-gfx/ufraw/files/ufraw-0.22-jasper-automagic.patch21
-rw-r--r--media-gfx/ufraw/ufraw-0.22-r1.ebuild5
2 files changed, 25 insertions, 1 deletions
diff --git a/media-gfx/ufraw/files/ufraw-0.22-jasper-automagic.patch b/media-gfx/ufraw/files/ufraw-0.22-jasper-automagic.patch
new file mode 100644
index 000000000000..93e1d691af1d
--- /dev/null
+++ b/media-gfx/ufraw/files/ufraw-0.22-jasper-automagic.patch
@@ -0,0 +1,21 @@
+--- 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,
diff --git a/media-gfx/ufraw/ufraw-0.22-r1.ebuild b/media-gfx/ufraw/ufraw-0.22-r1.ebuild
index 7f16fe8192fa..225999943e4e 100644
--- a/media-gfx/ufraw/ufraw-0.22-r1.ebuild
+++ b/media-gfx/ufraw/ufraw-0.22-r1.ebuild
@@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
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 )"
@@ -31,12 +31,14 @@ RDEPEND="
>=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
)
@@ -52,6 +54,7 @@ src_configure() {
$(use_with gimp) \
$(use_enable gnome mime) \
$(use_with gtk) \
+ $(use_enable jpeg2k jasper) \
$(use_enable openmp) \
$(use_enable timezone dst-correction)
}