From 627d67fb9873259c9ce94b5761901c07c5773325 Mon Sep 17 00:00:00 2001
From: Enno Boland <eb@s01.de>
Date: Fri, 3 Oct 2014 23:26:15 +0200
Subject: [PATCH] vice: fix build with giflib-5.1.0; prevent installation to
 /usr/lib64

---
 srcpkgs/vice/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/vice/template b/srcpkgs/vice/template
index 4fa4e82751..db58fa244f 100644
--- a/srcpkgs/vice/template
+++ b/srcpkgs/vice/template
@@ -23,3 +23,10 @@ if [ "$build_option_pulseaudio" ]; then
 else
 	configure_args+=" --without-pulse"
 fi
+pre_configure() {
+	# make it build with giflib-5.1.0
+	# see http://wiki.linuxfromscratch.org/blfs/ticket/5076#comment:2
+	sed -i "/EGifCloseFile/s:sdata->fd:&, NULL:g" src/gfxoutputdrv/gifdrv.c
+	# Do not install data to /usr/lib64
+	sed -i 's:VICEDIR=.*:VICEDIR="$PREFIX/share/vice":g' configure
+}