From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-827091-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 27FE4139357
	for <garchives@archives.gentoo.org>; Sat,  8 Aug 2015 05:51:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4690EE085D;
	Sat,  8 Aug 2015 05:51:49 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A8917E085D
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 Aug 2015 05:51:48 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B8D69340B81
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 Aug 2015 05:50:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 3BC1012C
	for <gentoo-commits@lists.gentoo.org>; Sat,  8 Aug 2015 05:51:44 +0000 (UTC)
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" <blueness@gentoo.org>
Message-ID: <1439013291.ab487f1a99d46dd4312197596fbf955e18c30cba.blueness@gentoo>
Subject: [gentoo-commits] proj/grs:desktop-amd64-uclibc-hardened commit in: core/etc/portage/patches/media-gfx/fontforge/
X-VCS-Repository: proj/grs
X-VCS-Files: core/etc/portage/patches/media-gfx/fontforge/0001-configure.ac-intelligently-check-for-execinfo.h.patch core/etc/portage/patches/media-gfx/fontforge/0002-configure.ac-check-for-locale_t.patch
X-VCS-Directories: core/etc/portage/patches/media-gfx/fontforge/
X-VCS-Committer: blueness
X-VCS-Committer-Name: Anthony G. Basile
X-VCS-Revision: ab487f1a99d46dd4312197596fbf955e18c30cba
X-VCS-Branch: desktop-amd64-uclibc-hardened
Date: Sat,  8 Aug 2015 05:51:44 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 0c14be2a-15a4-4162-b7a4-49216585d4ea
X-Archives-Hash: 13afafb4207a5089de8c6acedf3ba7e0

commit:     ab487f1a99d46dd4312197596fbf955e18c30cba
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  8 05:54:08 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Aug  8 05:54:51 2015 +0000
URL:        https://gitweb.gentoo.org/proj/grs.git/commit/?id=ab487f1a

media-gfx/fontforge: add configure.ac patches.

 ...ure.ac-intelligently-check-for-execinfo.h.patch | 58 ++++++++++++++++++++++
 .../0002-configure.ac-check-for-locale_t.patch     | 45 +++++++++++++++++
 2 files changed, 103 insertions(+)

diff --git a/core/etc/portage/patches/media-gfx/fontforge/0001-configure.ac-intelligently-check-for-execinfo.h.patch b/core/etc/portage/patches/media-gfx/fontforge/0001-configure.ac-intelligently-check-for-execinfo.h.patch
new file mode 100644
index 0000000..1f9ba81
--- /dev/null
+++ b/core/etc/portage/patches/media-gfx/fontforge/0001-configure.ac-intelligently-check-for-execinfo.h.patch
@@ -0,0 +1,58 @@
+From 15f0cb9e59b2fd4112236fc9abbb2bf3a29eca65 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Thu, 6 Aug 2015 04:11:03 -0400
+Subject: [PATCH 1/2] configure.ac: intelligently check for <execinfo.h>
+
+Currently, it is assume that only MINGW32 and CYGWIN on windows do
+not provide backtrace.  However, other libc's in the Linux world
+do not provide it either.  uClibc only provides it if configured
+to do so, and musl doesn't provide it at all.  As a result, the
+build fails on those systems.
+
+This patch checks for <execinfo.h> in configure.ac and skip its
+inclusion in fontforge/cvundoes.c if it is not available.
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ configure.ac         | 1 +
+ fontforge/cvundoes.c | 5 +++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e998a6f..ebeaf85 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -377,6 +377,7 @@ AC_CHECK_HEADERS([strings.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
+ if test x"${i_do_want_iconv}" = xyes; then
+    AC_CHECK_HEADERS([iconv.h])
+ fi
++AC_CHECK_HEADERS([execinfo.h])
+ gl_INIT
+ 
+ #--------------------------------------------------------------------------
+diff --git a/fontforge/cvundoes.c b/fontforge/cvundoes.c
+index 5d84830..72a5b96 100644
+--- a/fontforge/cvundoes.c
++++ b/fontforge/cvundoes.c
+@@ -24,6 +24,7 @@
+  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
++#include "config.h"
+ #include "fontforgevw.h"
+ #include "views.h"
+ #include <math.h>
+@@ -33,8 +34,8 @@
+ #include "inc/gfile.h"
+ #include "psfont.h"
+ 
+-#if defined(__MINGW32__)||defined(__CYGWIN__)
+-// no backtrace on windows yet
++#ifndef HAVE_EXECINFO_H
++// no backtrace available
+ #else
+     #include <execinfo.h>
+ #endif
+-- 
+2.4.6
+

diff --git a/core/etc/portage/patches/media-gfx/fontforge/0002-configure.ac-check-for-locale_t.patch b/core/etc/portage/patches/media-gfx/fontforge/0002-configure.ac-check-for-locale_t.patch
new file mode 100644
index 0000000..0aea86a
--- /dev/null
+++ b/core/etc/portage/patches/media-gfx/fontforge/0002-configure.ac-check-for-locale_t.patch
@@ -0,0 +1,45 @@
+From 734217599420766f9927f4d312577911dbf56791 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Sat, 8 Aug 2015 01:17:48 -0400
+Subject: [PATCH 2/2] configure.ac: check for locale_t
+
+fontforge/splinefont.h uses a "bad locale hack" for _WIN32 systems
+where locale_t is not provided.  However, there are other situations
+where locale_t may not be available.  For example, uClibc can be
+configured to not provide locales.  A better approach is to check
+for locale_t in configure.ac and enable the hack accordingly.
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ configure.ac           | 1 +
+ fontforge/splinefont.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ebeaf85..466214d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -387,6 +387,7 @@ gl_INIT
+ AC_C_BIGENDIAN
+ AC_TYPE_PID_T
+ AX_PTHREAD
++AC_CHECK_TYPES([locale_t], [], [], [[#include <locale.h>]])
+ 
+ #--------------------------------------------------------------------------
+ # Check to see if "this" compiler can use these flags, errors, or warnings.
+diff --git a/fontforge/splinefont.h b/fontforge/splinefont.h
+index 973f343..4f1de12 100644
+--- a/fontforge/splinefont.h
++++ b/fontforge/splinefont.h
+@@ -3548,7 +3548,7 @@ char * delimit_null(const char * input, char delimiter);
+ 
+ #include "ustring.h"
+ 
+-#ifdef _WIN32
++#ifndef HAVE_LOCALE_T
+ #define BAD_LOCALE_HACK
+ typedef char* locale_t;
+ #define LC_GLOBAL_LOCALE ((locale_t)-1)
+-- 
+2.4.6
+