From owner-svn-ports-head@FreeBSD.ORG Fri Dec 26 17:42:08 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31FDE38E; Fri, 26 Dec 2014 17:42:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048F766464; Fri, 26 Dec 2014 17:42:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQHg7Up029063; Fri, 26 Dec 2014 17:42:07 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQHg7or029062; Fri, 26 Dec 2014 17:42:07 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201412261742.sBQHg7or029062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Fri, 26 Dec 2014 17:42:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375642 - head/graphics/mtpaint/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 17:42:08 -0000 Author: antoine Date: Fri Dec 26 17:42:07 2014 New Revision: 375642 URL: https://svnweb.freebsd.org/changeset/ports/375642 QAT: https://qat.redports.org/buildarchive/r375642/ Log: Allow building with either giflib 4.2 or 5.0 Added: head/graphics/mtpaint/files/patch-src_png.c (contents, props changed) Added: head/graphics/mtpaint/files/patch-src_png.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mtpaint/files/patch-src_png.c Fri Dec 26 17:42:07 2014 (r375642) @@ -0,0 +1,57 @@ +--- src/png.c.orig 2011-10-27 20:56:24 UTC ++++ src/png.c +@@ -1510,7 +1510,11 @@ static int load_gif_frames(char *file_na + int res, val, disposal, bpp, cmask, lastzero = FALSE; + + ++#if GIFLIB_MAJOR >= 5 ++ if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1); ++#else + if (!(giffy = DGifOpenFileName(file_name))) return (-1); ++#endif + + /* Init state structure */ + memset(&stat, 0, sizeof(stat)); +@@ -1621,7 +1625,11 @@ static int load_gif(char *file_name, ls_ + int delay = settings->gif_delay, trans = -1;//, disposal = 0; + + ++#if GIFLIB_MAJOR >= 5 ++ if (!(giffy = DGifOpenFileName(file_name, NULL))) return (-1); ++#else + if (!(giffy = DGifOpenFileName(file_name))) return (-1); ++#endif + + /* Get global palette */ + settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap); +@@ -1682,10 +1690,18 @@ static int save_gif(char *file_name, ls_ + nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4; + nc += !nc + 1; // No less than 2 colors + ++#if GIFLIB_MAJOR >= 5 ++ gif_map = GifMakeMapObject(nc, NULL); ++#else + gif_map = MakeMapObject(nc, NULL); ++#endif + if (!gif_map) return -1; + ++#if GIFLIB_MAJOR >= 5 ++ giffy = EGifOpenFileName(file_name, FALSE, NULL); ++#else + giffy = EGifOpenFileName(file_name, FALSE); ++#endif + if (!giffy) goto fail0; + + for (i = 0; i < settings->colors; i++) +@@ -1732,7 +1748,11 @@ fail: EGifCloseFile(giffy); + umask(mode); + chmod(file_name, 0666 & ~mode); + #endif ++#if GIFLIB_MAJOR >= 5 ++fail0: GifFreeMapObject(gif_map); ++#else + fail0: FreeMapObject(gif_map); ++#endif + + return (msg); + }