From aa58e5c10b8d7d443c5b3e67cb28737c352a1c36 Mon Sep 17 00:00:00 2001
From: Enno Boland <eb@s01.de>
Date: Fri, 3 Oct 2014 22:51:46 +0200
Subject: [PATCH] libgdiplus: fix build with giflib-5.1.0

---
 srcpkgs/libgdiplus/template | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/srcpkgs/libgdiplus/template b/srcpkgs/libgdiplus/template
index e02d2f4e0c..53ce80621e 100644
--- a/srcpkgs/libgdiplus/template
+++ b/srcpkgs/libgdiplus/template
@@ -14,6 +14,12 @@ license="LGPL-2, MPL"
 distfiles="http://download.mono-project.com/sources/${pkgname}/$pkgname-$version.tar.bz2"
 checksum=6ddeb6c327bada7cb6e06d1a20714f526a0c69520dfd42c12ddd032c3c5d964e
 
+pre_configure() {
+	# make it build with giflib-5.1.0
+	# see http://wiki.linuxfromscratch.org/blfs/ticket/5076#comment:2
+	sed -i "/[DE]GifCloseFile/s:gif\|fp:&, NULL:g" src/gifcodec.c
+}
+
 libgdiplus-devel_package() {
 	short_desc+=" - Development files"
 	depends="libgdiplus>=${version}_${revision}"