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 B3FFD13881E for ; Fri, 25 Sep 2015 23:24:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E30B21C00D; Fri, 25 Sep 2015 23:24:24 +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 BC05D21C00D for ; Fri, 25 Sep 2015 23:24:23 +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 B235E340ADB for ; Fri, 25 Sep 2015 23:24:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7283B189 for ; Fri, 25 Sep 2015 23:24:20 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1443223455.62c95511627bb27be1f5eca75a78d7ddbfdccfb1.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/gtk2hs-buildtools/files/, dev-haskell/gtk2hs-buildtools/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.0.4-ia64.patch dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.0.4-r3.ebuild X-VCS-Directories: dev-haskell/gtk2hs-buildtools/ dev-haskell/gtk2hs-buildtools/files/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 62c95511627bb27be1f5eca75a78d7ddbfdccfb1 X-VCS-Branch: master Date: Fri, 25 Sep 2015 23:24:20 +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: 00d2177d-3de2-4778-8f5f-e15cfc50e19d X-Archives-Hash: 0088dbddb085fd5eda3e5d20a68cba22 commit: 62c95511627bb27be1f5eca75a78d7ddbfdccfb1 Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Sep 25 23:23:57 2015 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Sep 25 23:24:15 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62c95511 dev-haskell/gtk2hs-buildtools: add support for '__builtin_offsetof (struct sigcontext, sc_gr[0])', bug #498638 Bug: https://bugs.gentoo.org/498638 Package-Manager: portage-2.2.20 .../files/gtk2hs-buildtools-0.13.0.4-ia64.patch | 47 ++++++++++++++++++++++ .../gtk2hs-buildtools-0.13.0.4-r3.ebuild | 38 +++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.0.4-ia64.patch b/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.0.4-ia64.patch new file mode 100644 index 0000000..3caf5f7 --- /dev/null +++ b/dev-haskell/gtk2hs-buildtools/files/gtk2hs-buildtools-0.13.0.4-ia64.patch @@ -0,0 +1,47 @@ +ia64 is is a special showflake. + +Technically does nothing bad, +but it alone uses '__builtin_offsetof (struct sigcontext' +in system headers. c2hs does not handle that. + +https://bugs.gentoo.org/498638 +diff --git a/c2hs/c/C.hs b/c2hs/c/C.hs +index f79b6d9..aa1b5e4 100644 +--- a/c2hs/c/C.hs ++++ b/c2hs/c/C.hs +@@ -1 +1,2 @@ ++{-# LANGUAGE CPP, PatternGuards #-} + -- C->Haskell Compiler: interface to C processing routines +@@ -94,2 +95,20 @@ isuffix = ".i" + ++-- This stanza workarounds very specific limitation ++-- of c2hs of not being able to expang __builtin_offsetof ++-- used by all glib/gtk headers at least on ia64. ++raw_mangle :: String -> String ++raw_mangle s = case s of ++ [] -> [] ++#ifdef ia64_HOST_ARCH ++ _ | Just (h, rest) <- chop_head "__builtin_offsetof (struct sigcontext, sc_gr[0])" ++ "200" -- ia64/linux/glibc, sigh ++ -> h ++ raw_mangle rest ++#endif /* ia64_HOST_ARCH */ ++ (h:t) -> h : raw_mangle t ++ where chop_head prefix new_prefix = ++ case splitAt p_len s of ++ (h, t) | h == prefix -> Just (new_prefix, t) ++ _ -> Nothing ++ where p_len = length prefix ++ + -- given a file name (with suffix), parse that file as a C header and do the +@@ -106,3 +124,3 @@ loadAttrC fname = do + traceInfoRead fname +- contents <- readFileCIO fname ++ contents <- raw_mangle `fmap` readFileCIO fname + +@@ -126,4 +144,4 @@ loadAttrC fname = do + errmsgs <- showErrors +- fatal ("C header contains \ +- \errors:\n\n" ++ errmsgs) -- fatal error ++ fatal ("C header contains " ++ ++ "errors:\n\n" ++ errmsgs) -- fatal error + else do diff --git a/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.0.4-r3.ebuild b/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.0.4-r3.ebuild new file mode 100644 index 0000000..8397870 --- /dev/null +++ b/dev-haskell/gtk2hs-buildtools/gtk2hs-buildtools-0.13.0.4-r3.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +# ebuild generated by hackport 0.4.5.9999 + +CABAL_FEATURES="bin" +inherit haskell-cabal + +DESCRIPTION="Tools to build the Gtk2Hs suite of User Interface libraries" +HOMEPAGE="http://projects.haskell.org/gtk2hs/" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="+closuresignals" + +RDEPEND="dev-haskell/random:= + >=dev-lang/ghc-7.4.1:= + || ( ( >=dev-lang/ghc-7.7:= dev-haskell/hashtables:= )