media-gfx/maim: Fix building with libjpeg
authorDavid Seifert <soap@gentoo.org>
Thu, 11 Apr 2019 10:36:50 +0000 (12:36 +0200)
committerDavid Seifert <soap@gentoo.org>
Thu, 11 Apr 2019 10:38:40 +0000 (12:38 +0200)
Bug: https://bugs.gentoo.org/656520
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: David Seifert <soap@gentoo.org>
media-gfx/maim/files/maim-5.5.1-libjpeg-9c.patch [new file with mode: 0644]
media-gfx/maim/maim-5.5.1.ebuild

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 (file)
index 0000000..83029fa
--- /dev/null
@@ -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;
index cb8869b7b8094ea03cec53b2ccdd913ed32cb28a..a225be4803afda69240cabd62b36398a180a8c59 100644 (file)
@@ -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)