commit:     92d976e1989d6a319bad89b4c83d0507a80be435
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 10:36:50 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 10:38:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92d976e1

media-gfx/maim: Fix building with libjpeg

Bug: https://bugs.gentoo.org/656520
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-gfx/maim/files/maim-5.5.1-libjpeg-9c.patch | 16 ++++++++++++++++
 media-gfx/maim/maim-5.5.1.ebuild                 |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/media-gfx/maim/files/maim-5.5.1-libjpeg-9c.patch 
b/media-gfx/maim/files/maim-5.5.1-libjpeg-9c.patch
new file mode 100644
index 00000000000..83029fab828
--- /dev/null
+++ b/media-gfx/maim/files/maim-5.5.1-libjpeg-9c.patch
@@ -0,0 +1,16 @@
+Allow building with libjpeg-9c
+Bug: https://bugs.gentoo.org/656520
+
+--- a/src/image.cpp
++++ b/src/image.cpp
+@@ -187,8 +187,8 @@
+  
+     jpeg_set_defaults(&cinfo);
+     // Convert quality from scale 1-10 to 0-100
+-    jpeg_set_quality (&cinfo, (int)((float)quality-1.f)*(100.f/9.f), true);
+-    jpeg_start_compress(&cinfo, true);
++    jpeg_set_quality (&cinfo, (int)((float)quality-1.f)*(100.f/9.f), TRUE);
++    jpeg_start_compress(&cinfo, TRUE);
+  
+     JSAMPROW row_pointer;
+     unsigned char* buffer    = (unsigned char*)data;

diff --git a/media-gfx/maim/maim-5.5.1.ebuild b/media-gfx/maim/maim-5.5.1.ebuild
index cb8869b7b80..a225be4803a 100644
--- a/media-gfx/maim/maim-5.5.1.ebuild
+++ b/media-gfx/maim/maim-5.5.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -35,6 +35,8 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${PN}-5.5.1-libjpeg-9c.patch )
+
 src_configure() {
        local mycmakeargs=(
                -DMAIM_UNICODE=$(usex unicode)

Reply via email to