From owner-svn-ports-all@freebsd.org Thu Nov 12 12:54:31 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 95AC4A2B2ED; Thu, 12 Nov 2015 12:54:31 +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 46D7019CA; Thu, 12 Nov 2015 12:54:31 +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 tACCsUsL023932; Thu, 12 Nov 2015 12:54:30 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tACCsUre023931; Thu, 12 Nov 2015 12:54:30 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201511121254.tACCsUre023931@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 12:54:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r401341 - head/graphics/imlib2/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 12:54:31 -0000 Author: antoine Date: Thu Nov 12 12:54:30 2015 New Revision: 401341 URL: https://svnweb.freebsd.org/changeset/ports/401341 Log: Allow building with giflib 5.1 PR: 204492 Modified: head/graphics/imlib2/files/patch-src_modules_loaders_loader__gif.c Modified: head/graphics/imlib2/files/patch-src_modules_loaders_loader__gif.c ============================================================================== --- head/graphics/imlib2/files/patch-src_modules_loaders_loader__gif.c Thu Nov 12 12:51:55 2015 (r401340) +++ head/graphics/imlib2/files/patch-src_modules_loaders_loader__gif.c Thu Nov 12 12:54:30 2015 (r401341) @@ -12,3 +12,73 @@ if (!gif) { close(fd); +@@ -60,13 +64,21 @@ load(ImlibImage * im, ImlibProgressFunct + h = gif->Image.Height; + if (!IMAGE_DIMENSIONS_OK(w, h)) + { ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + return 0; + } + rows = malloc(h * sizeof(GifRowType *)); + if (!rows) + { ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + return 0; + } + for (i = 0; i < h; i++) +@@ -78,7 +90,11 @@ load(ImlibImage * im, ImlibProgressFunct + rows[i] = malloc(w * sizeof(GifPixelType)); + if (!rows[i]) + { ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + for (i = 0; i < h; i++) + { + if (rows[i]) +@@ -150,7 +166,11 @@ load(ImlibImage * im, ImlibProgressFunct + im->data = (DATA32 *) malloc(sizeof(DATA32) * w * h); + if (!im->data) + { ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + free(rows); + return 0; + } +@@ -181,7 +201,11 @@ load(ImlibImage * im, ImlibProgressFunct + last_per = (int)per; + if (!(progress(im, (int)per, 0, last_y, w, i))) + { ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + for (i = 0; i < h; i++) + { + free(rows[i]); +@@ -198,7 +222,11 @@ load(ImlibImage * im, ImlibProgressFunct + { + progress(im, 100, 0, last_y, w, h); + } ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + for (i = 0; i < h; i++) + { + free(rows[i]);