From owner-svn-ports-all@freebsd.org Thu Nov 12 15:41:23 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08334A2D100; Thu, 12 Nov 2015 15:41:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 AFE111ADC; Thu, 12 Nov 2015 15:41:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tACFfLhZ073881; Thu, 12 Nov 2015 15:41:21 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tACFfLML073880; Thu, 12 Nov 2015 15:41:21 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201511121541.tACFfLML073880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Thu, 12 Nov 2015 15:41:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401360 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 15:41:23 -0000 Author: antoine Date: Thu Nov 12 15:41:21 2015 New Revision: 401360 URL: https://svnweb.freebsd.org/changeset/ports/401360 Log: Allow building with giflib 5.1 PR: 204492 Modified: head/graphics/mtpaint/files/patch-src_png.c Modified: head/graphics/mtpaint/files/patch-src_png.c ============================================================================== --- head/graphics/mtpaint/files/patch-src_png.c Thu Nov 12 15:37:31 2015 (r401359) +++ head/graphics/mtpaint/files/patch-src_png.c Thu Nov 12 15:41:21 2015 (r401360) @@ -12,7 +12,19 @@ /* Init state structure */ memset(&stat, 0, sizeof(stat)); -@@ -1621,7 +1625,11 @@ static int load_gif(char *file_name, ls_ +@@ -1608,7 +1612,11 @@ static int load_gif_frames(char *file_na + } + res = 1; + fail: mem_free_chanlist(w_set.img); ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(giffy, NULL); ++#else + DGifCloseFile(giffy); ++#endif + return (res); + } + +@@ -1621,7 +1629,11 @@ static int load_gif(char *file_name, ls_ int delay = settings->gif_delay, trans = -1;//, disposal = 0; @@ -24,7 +36,19 @@ /* Get global palette */ settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap); -@@ -1682,10 +1690,18 @@ static int save_gif(char *file_name, ls_ +@@ -1659,7 +1671,11 @@ static int load_gif(char *file_name, ls_ + } + } + res = 1; ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++fail: DGifCloseFile(giffy, NULL); ++#else + fail: DGifCloseFile(giffy); ++#endif + return (res); + } + +@@ -1682,10 +1698,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 @@ -43,7 +67,18 @@ if (!giffy) goto fail0; for (i = 0; i < settings->colors; i++) -@@ -1732,7 +1748,11 @@ fail: EGifCloseFile(giffy); +@@ -1725,14 +1749,22 @@ static int save_gif(char *file_name, ls_ + if (!settings->silent) progress_end(); + msg = 0; + ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++fail: EGifCloseFile(giffy, NULL); ++#else + fail: EGifCloseFile(giffy); ++#endif + #ifndef WIN32 + /* giflib creates files with 0600 permissions, which is nasty - WJ */ + mode = umask(0022); umask(mode); chmod(file_name, 0666 & ~mode); #endif