From owner-svn-ports-head@freebsd.org Thu Nov 12 18:40:37 2015 Return-Path: Delivered-To: svn-ports-head@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 6E303A2D2DF; Thu, 12 Nov 2015 18:40:37 +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 1B9181191; Thu, 12 Nov 2015 18:40:37 +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 tACIeaPm026475; Thu, 12 Nov 2015 18:40:36 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tACIeaGx026474; Thu, 12 Nov 2015 18:40:36 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201511121840.tACIeaGx026474@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 18:40:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401388 - head/astro/xplanet/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.20 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: Thu, 12 Nov 2015 18:40:37 -0000 Author: antoine Date: Thu Nov 12 18:40:35 2015 New Revision: 401388 URL: https://svnweb.freebsd.org/changeset/ports/401388 Log: Allow building with giflib 5.1 PR: 204492 Modified: head/astro/xplanet/files/patch-src_libimage_gif.c Modified: head/astro/xplanet/files/patch-src_libimage_gif.c ============================================================================== --- head/astro/xplanet/files/patch-src_libimage_gif.c Thu Nov 12 18:35:53 2015 (r401387) +++ head/astro/xplanet/files/patch-src_libimage_gif.c Thu Nov 12 18:40:35 2015 (r401388) @@ -95,7 +95,19 @@ return(0); } } -@@ -178,7 +218,11 @@ write_gif(const char *filename, int widt +@@ -154,7 +194,11 @@ read_gif(const char *filename, int *widt + + free(buffer); + ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(infile, NULL); ++#else + DGifCloseFile(infile); ++#endif + return(1); + } + +@@ -178,7 +222,11 @@ write_gif(const char *filename, int widt return(0); } @@ -107,7 +119,7 @@ for (i = 0; i < width * height; i++) { -@@ -187,10 +231,15 @@ write_gif(const char *filename, int widt +@@ -187,10 +235,15 @@ write_gif(const char *filename, int widt blue[i] = (GifByteType) rgb[3*i+2]; } @@ -124,7 +136,7 @@ return(0); } -@@ -198,24 +247,36 @@ write_gif(const char *filename, int widt +@@ -198,24 +251,36 @@ write_gif(const char *filename, int widt free(green); free(blue); @@ -166,7 +178,7 @@ return(0); } -@@ -224,7 +285,11 @@ write_gif(const char *filename, int widt +@@ -224,7 +289,11 @@ write_gif(const char *filename, int widt { if (EGifPutLine(outfile, ptr, width) == GIF_ERROR) { @@ -179,11 +191,16 @@ return(0); } ptr += width; -@@ -233,7 +298,7 @@ write_gif(const char *filename, int widt +@@ -232,8 +301,12 @@ write_gif(const char *filename, int widt + EGifSpew(outfile); ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ if (EGifCloseFile(outfile, NULL) == GIF_ERROR) ++#else if (EGifCloseFile(outfile) == GIF_ERROR) - PrintGifError(); ++#endif + fprintf(stderr, "Can't close GIF file %s\n", filename); free(buffer);