From 97dd7d2a6830ab3cf952c308b9b1830a7c0fb5c2 Mon Sep 17 00:00:00 2001
From: Bradley Sepos <bradley@bradleysepos.com>
Date: Wed, 27 Dec 2017 18:03:01 -0500
Subject: [PATCH] contrib: Fix issues with fribidi.

The source tarball isn't exactly the same as the release tarball found on fribidi.org before it shuttered. Needs a little extra care and an anvil dropped on Mr. Horrible.
---
 contrib/fribidi/A02-remove-horrible-hack.patch | 18 ++++++++++++++++++
 contrib/fribidi/A03-no-doc.patch               | 12 ++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 contrib/fribidi/A02-remove-horrible-hack.patch
 create mode 100644 contrib/fribidi/A03-no-doc.patch

diff --git a/contrib/fribidi/A02-remove-horrible-hack.patch b/contrib/fribidi/A02-remove-horrible-hack.patch
new file mode 100644
index 000000000..16280a0f4
--- /dev/null
+++ b/contrib/fribidi/A02-remove-horrible-hack.patch
@@ -0,0 +1,18 @@
+diff -Naur fribidi-0.19.7.orig/Makefile.am fribidi-0.19.7/Makefile.am
+--- fribidi-0.19.7.orig/Makefile.am	2015-08-06 16:55:02.000000000 -0400
++++ fribidi-0.19.7/Makefile.am	2017-12-27 17:43:06.000000000 -0500
+@@ -36,13 +36,7 @@
+ 		$(srcdir)/ltmain.sh \
+ 		$(srcdir)/missing \
+ 		$(srcdir)/mkinstalldirs \
+-		$(srcdir)/ChangeLog \
+-		`find "$(srcdir)" -type f -name Makefile.in -print` \
+-		`$(srcdir)/bootstrap --write-configure`
+-# The last line above is a horrible hack.
+-# GNU Coding Standards recommends that `make maintainer-clean' should not 
+-# remove the configure script.
+-# We instead make configure call bootstrap.
++		$(srcdir)/ChangeLog
+ 
+ # Indent all C source and header files, using indent(1):
+ 
diff --git a/contrib/fribidi/A03-no-doc.patch b/contrib/fribidi/A03-no-doc.patch
new file mode 100644
index 000000000..838e5f7d7
--- /dev/null
+++ b/contrib/fribidi/A03-no-doc.patch
@@ -0,0 +1,12 @@
+diff -Naur fribidi-0.19.7.orig/Makefile.am fribidi-0.19.7/Makefile.am
+--- fribidi-0.19.7.orig/Makefile.am	2015-08-06 16:55:02.000000000 -0400
++++ fribidi-0.19.7/Makefile.am	2017-12-27 17:53:09.000000000 -0500
+@@ -11,7 +11,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+ 
+ ## The order of subdirs is important, don't change without a reason.
+-SUBDIRS = gen.tab charset lib bin doc test
++SUBDIRS = gen.tab charset lib bin test
+ 
+ EXTRA_DIST = bootstrap ChangeLog.old
+ 
-- 
2.40.0