Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2016 16:03:35 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r409619 - in head/graphics/giflib: . files
Message-ID:  <201602261603.u1QG3ZgH023200@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Fri Feb 26 16:03:35 2016
New Revision: 409619
URL: https://svnweb.freebsd.org/changeset/ports/409619

Log:
  graphics/giflib: Add patches to prevent exporting reallocarray
  
  PR:		205676
  MFH:		2016Q1

Added:
  head/graphics/giflib/files/
  head/graphics/giflib/files/extra-patch-hide-reallocarray   (contents, props changed)
  head/graphics/giflib/files/extra-patch-unbundle-reallocarray   (contents, props changed)
  head/graphics/giflib/files/patch-lib_gif__lib.h   (contents, props changed)
Modified:
  head/graphics/giflib/Makefile

Modified: head/graphics/giflib/Makefile
==============================================================================
--- head/graphics/giflib/Makefile	Fri Feb 26 16:02:50 2016	(r409618)
+++ head/graphics/giflib/Makefile	Fri Feb 26 16:03:35 2016	(r409619)
@@ -3,6 +3,7 @@
 
 PORTNAME=	giflib
 PORTVERSION=	5.1.2
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}
 
@@ -25,13 +26,14 @@ INSTALL_TARGET=	install-strip
 .if ${PORT_OPTIONS:MDOCBOOK} && ${PORT_OPTIONS:MDOCS}
 BUILD_DEPENDS+=	xmlto:${PORTSDIR}/textproc/xmlto \
 		docbook-xml>0:${PORTSDIR}/textproc/docbook-xml
+.else
+CONFIGURE_ENV+=	have_xmlto=no
 .endif
 
-post-patch:
-.if ! ${PORT_OPTIONS:MDOCBOOK} || ! ${PORT_OPTIONS:MDOCS}
-	${REINPLACE_CMD} \
-		-e 's|SUBDIRS = lib util doc pic|SUBDIRS = lib util pic|' \
-		${WRKSRC}/Makefile.in
+.if ${OSVERSION} >= 1100072
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-unbundle-reallocarray
+.else
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-hide-reallocarray
 .endif
 
 post-install:

Added: head/graphics/giflib/files/extra-patch-hide-reallocarray
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/giflib/files/extra-patch-hide-reallocarray	Fri Feb 26 16:03:35 2016	(r409619)
@@ -0,0 +1,24 @@
+--- lib/dgif_lib.c.orig	2016-01-07 10:44:44 UTC
++++ lib/dgif_lib.c
+@@ -41,6 +41,9 @@ static int DGifDecompressInput(GifFileTy
+ static int DGifBufferedInput(GifFileType *GifFile, GifByteType *Buf,
+                              GifByteType *NextByte);
+ 
++extern void *
++reallocarray(void *optr, size_t nmemb, size_t size) __hidden;
++
+ /******************************************************************************
+  Open a new GIF file for read, given by its name.
+  Returns dynamically allocated GifFileType pointer which serves as the GIF
+--- lib/gifalloc.c.orig	2015-07-13 04:05:46 UTC
++++ lib/gifalloc.c
+@@ -12,6 +12,9 @@
+ 
+ #define MAX(x, y)    (((x) > (y)) ? (x) : (y))
+ 
++extern void *
++reallocarray(void *optr, size_t nmemb, size_t size) __hidden;
++
+ /******************************************************************************
+  Miscellaneous utility functions                          
+ ******************************************************************************/

Added: head/graphics/giflib/files/extra-patch-unbundle-reallocarray
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/giflib/files/extra-patch-unbundle-reallocarray	Fri Feb 26 16:03:35 2016	(r409619)
@@ -0,0 +1,27 @@
+--- lib/Makefile.in.orig	2016-01-07 12:54:02 UTC
++++ lib/Makefile.in
+@@ -134,7 +134,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" 
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+ libgif_la_LIBADD =
+ am_libgif_la_OBJECTS = dgif_lib.lo egif_lib.lo gif_font.lo gif_hash.lo \
+-	gifalloc.lo openbsd-reallocarray.lo gif_err.lo quantize.lo
++	gifalloc.lo gif_err.lo quantize.lo
+ libgif_la_OBJECTS = $(am_libgif_la_OBJECTS)
+ AM_V_lt = $(am__v_lt_@AM_V@)
+ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+@@ -331,7 +331,6 @@ libgif_la_SOURCES = dgif_lib.c  \
+ 					gif_hash.c  \
+ 					gif_hash.h	\
+                     gifalloc.c  \
+-		    openbsd-reallocarray.c \
+                     gif_err.c   \
+ 					gif_lib_private.h \
+ 		    quantize.c
+@@ -422,7 +421,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_font.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_hash.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifalloc.Plo@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openbsd-reallocarray.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantize.Plo@am__quote@
+ 
+ .c.o:

Added: head/graphics/giflib/files/patch-lib_gif__lib.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/giflib/files/patch-lib_gif__lib.h	Fri Feb 26 16:03:35 2016	(r409619)
@@ -0,0 +1,12 @@
+--- lib/gif_lib.h.orig	2016-01-07 12:51:53 UTC
++++ lib/gif_lib.h
+@@ -244,9 +244,6 @@ extern ColorMapObject *GifUnionColorMap(
+                                      GifPixelType ColorTransIn2[]);
+ extern int GifBitSize(int n);
+ 
+-extern void *
+-reallocarray(void *optr, size_t nmemb, size_t size);
+-
+ /******************************************************************************
+  Support for the in-core structures allocation (slurp mode).              
+ ******************************************************************************/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602261603.u1QG3ZgH023200>