Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3C56C84D1D for ; Wed, 2 Aug 2023 07:57:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id uX1sq7A2oDPo for ; Wed, 2 Aug 2023 07:57:36 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 8DD5084CC8 for ; Wed, 2 Aug 2023 07:57:36 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 81AEBFBDB; Wed, 2 Aug 2023 07:57:36 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1690963056114450" MIME-Version: 1.0 Date: Wed, 2 Aug 2023 07:57:36 +0000 From: "Adam Ciarcinski" Subject: CVS commit: pkgsrc/graphics/GraphicsMagick To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: adam@netbsd.org X-Mailer: log_accum Message-Id: <20230802075736.81AEBFBDB@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_1690963056114450 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: adam Date: Wed Aug 2 07:57:36 UTC 2023 Modified Files: pkgsrc/graphics/GraphicsMagick: distinfo hacks.mk Added Files: pkgsrc/graphics/GraphicsMagick/patches: patch-coders_jpeg.c Log Message: GraphicsMagick: fix for libjpeg-turbo 3.0.0 To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 pkgsrc/graphics/GraphicsMagick/distinfo cvs rdiff -u -r1.1 -r1.2 pkgsrc/graphics/GraphicsMagick/hacks.mk cvs rdiff -u -r0 -r1.1 \ pkgsrc/graphics/GraphicsMagick/patches/patch-coders_jpeg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1690963056114450 Content-Disposition: inline Content-Length: 3668 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/graphics/GraphicsMagick/distinfo diff -u pkgsrc/graphics/GraphicsMagick/distinfo:1.57 pkgsrc/graphics/GraphicsMagick/distinfo:1.58 --- pkgsrc/graphics/GraphicsMagick/distinfo:1.57 Wed Jan 25 06:40:45 2023 +++ pkgsrc/graphics/GraphicsMagick/distinfo Wed Aug 2 07:57:36 2023 @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.57 2023/01/25 06:40:45 adam Exp $ +$NetBSD: distinfo,v 1.58 2023/08/02 07:57:36 adam Exp $ BLAKE2s (GraphicsMagick-1.3.40.tar.xz) = 72e78a94e255d00850d118813fed2f9a46d7a61c7300e28e75ee2895fde2c3a9 SHA512 (GraphicsMagick-1.3.40.tar.xz) = e64902aa2a8702d03d188350bd4252a2263e431611f9a70f38cd8beede8a38cc91bb4de3603fedf15420ebbba488f609f218e9b45e356b9f8dc8e4a75f380ee5 Size (GraphicsMagick-1.3.40.tar.xz) = 5507792 bytes +SHA1 (patch-coders_jpeg.c) = b4d6b79c06561b22baff3bcc81fcb12e900808c9 SHA1 (patch-config_delegates.mgk.in) = c52192a35bede530d310688a576ef2181a9f073c SHA1 (patch-configure) = 327dcb718ebaf65f2d2c97440c1cc7fdb9e03482 Index: pkgsrc/graphics/GraphicsMagick/hacks.mk diff -u pkgsrc/graphics/GraphicsMagick/hacks.mk:1.1 pkgsrc/graphics/GraphicsMagick/hacks.mk:1.2 --- pkgsrc/graphics/GraphicsMagick/hacks.mk:1.1 Thu Aug 14 15:23:59 2014 +++ pkgsrc/graphics/GraphicsMagick/hacks.mk Wed Aug 2 07:57:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: hacks.mk,v 1.1 2014/08/14 15:23:59 jperkin Exp $ +# $NetBSD: hacks.mk,v 1.2 2023/08/02 07:57:36 adam Exp $ .if !defined(GRAPHICSMAGICK_HACKS_MK) GRAPHICSMAGICK_HACKS_MK= # defined @@ -6,7 +6,7 @@ GRAPHICSMAGICK_HACKS_MK= # defined # Gain 2-3X speedup by working around GCC optimisation bug # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53967 .include "../../mk/compiler.mk" -.if !empty(CC_VERSION:Mgcc-4.*) && ${MACHINE_ARCH} == "x86_64" +.if ${CC_VERSION:Mgcc-4.*} && ${MACHINE_ARCH} == "x86_64" PKG_HACKS+= frename-registers CFLAGS+= -frename-registers .endif Added files: Index: pkgsrc/graphics/GraphicsMagick/patches/patch-coders_jpeg.c diff -u /dev/null pkgsrc/graphics/GraphicsMagick/patches/patch-coders_jpeg.c:1.1 --- /dev/null Wed Aug 2 07:57:36 2023 +++ pkgsrc/graphics/GraphicsMagick/patches/patch-coders_jpeg.c Wed Aug 2 07:57:36 2023 @@ -0,0 +1,36 @@ +$NetBSD: patch-coders_jpeg.c,v 1.1 2023/08/02 07:57:36 adam Exp $ + +Fix for libjpeg-turbo 3.0.0. +https://sourceforge.net/p/graphicsmagick/bugs/711/ + +--- coders/jpeg.c.orig 2022-12-26 16:56:04.000000000 +0000 ++++ coders/jpeg.c +@@ -954,7 +954,7 @@ EstimateJPEGQuality(const struct jpeg_de + i; + + save_quality=0; +-#ifdef D_LOSSLESS_SUPPORTED ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(D_LOSSLESS_SUPPORTED) + if (image->compression==LosslessJPEGCompression) + { + save_quality=100; +@@ -1461,7 +1461,9 @@ static Image *ReadJPEGImage(const ImageI + } + #endif + #if (JPEG_LIB_VERSION >= 61) && defined(D_PROGRESSIVE_SUPPORTED) +-#ifdef D_LOSSLESS_SUPPORTED ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(D_LOSSLESS_SUPPORTED) ++ /* This code is based on a patch to IJG JPEG 6b, or somesuch. Standard ++ library does not have a 'process' member. */ + image->interlace= + jpeg_info.process == JPROC_PROGRESSIVE ? LineInterlace : NoInterlace; + image->compression=jpeg_info.process == JPROC_LOSSLESS ? +@@ -2896,7 +2896,7 @@ static MagickPassFail WriteJPEGImage(con + if ((image->compression == LosslessJPEGCompression) || + (quality > 100)) + { +-#if defined(C_LOSSLESS_SUPPORTED) ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(C_LOSSLESS_SUPPORTED) + if (quality < 100) + ThrowException(&image->exception,CoderWarning, + LosslessToLossyJPEGConversion,(char *) NULL); --_----------=_1690963056114450--