From owner-svn-ports-head@FreeBSD.ORG Fri Dec 26 16:49:00 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E57154; Fri, 26 Dec 2014 16:49:00 +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 D3B1A3075; Fri, 26 Dec 2014 16:48:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBQGmxNs000656; Fri, 26 Dec 2014 16:48:59 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBQGmxMN000655; Fri, 26 Dec 2014 16:48:59 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201412261648.sBQGmxMN000655@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 16:48:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375632 - head/textproc/gladtex/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 16:49:00 -0000 Author: antoine Date: Fri Dec 26 16:48:58 2014 New Revision: 375632 URL: https://svnweb.freebsd.org/changeset/ports/375632 QAT: https://qat.redports.org/buildarchive/r375632/ Log: Allow building with either giflib 4.2 or 5.0 Modified: head/textproc/gladtex/files/patch-eqn2img.c Modified: head/textproc/gladtex/files/patch-eqn2img.c ============================================================================== --- head/textproc/gladtex/files/patch-eqn2img.c Fri Dec 26 16:11:24 2014 (r375631) +++ head/textproc/gladtex/files/patch-eqn2img.c Fri Dec 26 16:48:58 2014 (r375632) @@ -1,6 +1,6 @@ ---- ./eqn2img.c.orig 2013-03-07 15:44:58.000000000 +0100 -+++ ./eqn2img.c 2013-03-07 15:47:58.000000000 +0100 -@@ -367,7 +367,7 @@ +--- eqn2img.c.orig 2013-01-27 04:17:45 UTC ++++ eqn2img.c +@@ -367,7 +367,7 @@ png_bytepp png_read(char *filename, int info_ptr = png_create_info_struct(png_ptr); assert(info_ptr); @@ -9,7 +9,7 @@ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fclose(fp); return NULL; -@@ -580,7 +580,7 @@ +@@ -580,7 +580,7 @@ int png_write(png_bytepp image, char *im assert(info_ptr); /* error handling, libpng longjmps here on any error */ @@ -18,7 +18,39 @@ png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fclose(fp); return -1; -@@ -715,7 +715,7 @@ +@@ -623,19 +623,31 @@ int gif_write(png_bytepp image, char *im + }; + + if(img_name) { ++#if GIFLIB_MAJOR >= 5 ++ fp = EGifOpenFileName(img_name, 0, NULL); ++#else + fp = EGifOpenFileName(img_name, 0); ++#endif + if(!fp) + return -1; + } + else ++#if GIFLIB_MAJOR >= 5 ++ fp = EGifOpenFileHandle(STDOUT_FILENO, NULL); ++#else + fp = EGifOpenFileHandle(STDOUT_FILENO); ++#endif + + for(i=0; i<256; i++) { + pal[i].Red = (i*background.red + (255-i)*foreground.red)/255; + pal[i].Green = (i*background.green + (255-i)*foreground.green)/255; + pal[i].Blue = (i*background.blue + (255-i)*foreground.blue)/255; + } ++#if GIFLIB_MAJOR >= 5 ++ color_map = GifMakeMapObject(256, pal); ++#else + color_map = MakeMapObject(256, pal); ++#endif + + /* EGifSetGifVersion("89a"); this causes segfault (but is really required for transparency, I think) */ + EGifPutScreenDesc(fp, width, height, 256, 255, color_map); +@@ -715,7 +727,7 @@ int to_ps(char *basename, int verbose) { fprintf(stderr, " -> ps"); cmd = NEW(char, 2*strlen(basename) + 46);