From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 62BEB13972E for ; Sat, 8 Aug 2015 05:51:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 81908E0864; 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 CBCB1E0863 for ; Sat, 8 Aug 2015 05:51:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C48E8340B82 for ; 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 16256EE for ; Sat, 8 Aug 2015 05:51:44 +0000 (UTC) From: "Anthony G. Basile" 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" Message-ID: <1439013279.075d1fb03605468209629f21f621f1a415a16b85.blueness@gentoo> Subject: [gentoo-commits] proj/grs:desktop-amd64-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: 075d1fb03605468209629f21f621f1a415a16b85 X-VCS-Branch: desktop-amd64-hardened Date: Sat, 8 Aug 2015 05:51:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 77f919df-6732-4288-8817-f0dac2ce60df X-Archives-Hash: ef40982a32c54a6c4966b80884e7011a commit: 075d1fb03605468209629f21f621f1a415a16b85 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Aug 8 05:54:08 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Aug 8 05:54:39 2015 +0000 URL: https://gitweb.gentoo.org/proj/grs.git/commit/?id=075d1fb0 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" +Date: Thu, 6 Aug 2015 04:11:03 -0400 +Subject: [PATCH 1/2] configure.ac: intelligently check for + +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 in configure.ac and skip its +inclusion in fontforge/cvundoes.c if it is not available. + +Signed-off-by: Anthony G. Basile +--- + 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 +@@ -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 + #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" +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 +--- + 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 ]]) + + #-------------------------------------------------------------------------- + # 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 +