[Git][haskell-team/DHG_packages][master] bustle: fix build by disabling hgettext support

Gianfranco Costamagna gitlab at salsa.debian.org
Fri May 8 09:58:41 BST 2020



Gianfranco Costamagna pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
c2908226 by Gianfranco Costamagna at 2020-05-08T10:58:05+02:00
bustle: fix build by disabling hgettext support

- - - - -


5 changed files:

- p/bustle/debian/changelog
- p/bustle/debian/control
- + p/bustle/debian/patches/aae6843f51f54679d440fb3813e61355dc8406b9.patch
- + p/bustle/debian/patches/ee4b81cbc232d47ba9940f1987777b17452e71ff.patch
- p/bustle/debian/patches/series


Changes:

=====================================
p/bustle/debian/changelog
=====================================
@@ -1,3 +1,12 @@
+bustle (0.7.5-2) unstable; urgency=medium
+
+  * Add upstream patches to make it build without gettext support
+    (From NixOS) (Closes: #939826)
+    - debian/patches/ee4b81cbc232d47ba9940f1987777b17452e71ff.patch:
+    - debian/patches/aae6843f51f54679d440fb3813e61355dc8406b9.patch:
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Fri, 08 May 2020 10:52:24 +0200
+
 bustle (0.7.5-1) unstable; urgency=medium
 
   * New upstream release


=====================================
p/bustle/debian/control
=====================================
@@ -15,7 +15,7 @@ Build-Depends: debhelper (>= 10)
  , libpcap0.8-dev
  , libghc-dbus-dev
  , libghc-pcap-dev
- , libghc-hgettext-dev
+# , libghc-hgettext-dev
  , help2man
  , intltool
 Standards-Version: 4.1.4


=====================================
p/bustle/debian/patches/aae6843f51f54679d440fb3813e61355dc8406b9.patch
=====================================
@@ -0,0 +1,44 @@
+From aae6843f51f54679d440fb3813e61355dc8406b9 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar at gmail.com>
+Date: Fri, 18 Oct 2019 01:33:19 +0200
+Subject: [PATCH] =?UTF-8?q?Setup.hs:=20Don=E2=80=99t=20import=20Gettext.hs?=
+ =?UTF-8?q?=20without=20hgettext?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Gettext.hs is broken with Cabal ≥ 2.4 so until we fix it, I made importing it
+conditional on the value of `hgettext` flag, so that the builds still work.
+---
+ Setup.hs | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/Setup.hs b/Setup.hs
+index dd86bba..50e7b54 100644
+--- a/Setup.hs
++++ b/Setup.hs
+@@ -1,4 +1,8 @@
++{-# LANGUAGE CPP #-}
+ {-# OPTIONS_GHC -Wall #-}
++
++#if defined(VERSION_hgettext)
++
+ import System.FilePath ( (</>), (<.>) )
+ 
+ import Distribution.PackageDescription
+@@ -92,3 +96,12 @@ generateModule pkg lbi =
+     tar = GetText.targetDataDir lbi
+ 
+ -- Cargo-culted from hgettext
++
++#else
++
++import Distribution.Simple
++
++main :: IO ()
++main = defaultMain
++
++#endif
+-- 
+2.26.2
+


=====================================
p/bustle/debian/patches/ee4b81cbc232d47ba9940f1987777b17452e71ff.patch
=====================================
@@ -0,0 +1,54 @@
+From ee4b81cbc232d47ba9940f1987777b17452e71ff Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar at gmail.com>
+Date: Fri, 18 Oct 2019 01:46:19 +0200
+Subject: [PATCH] UI: Fix build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Bustle/UI.hs:490:3: error:
+    • No instance for (Control.Monad.Fail.MonadFail
+                         (Bustle BConfig BState))
+        arising from a do statement
+        with the failable pattern ‘[openItem, openTwoItem]’
+    • In a stmt of a 'do' block:
+        [openItem, openTwoItem] <- mapM
+                                     (getW castToMenuItem) ["open", "openTwo"]
+      In the expression:
+        do builder <- io builderNew
+           io
+             $ builderAddFromFile builder =<< getDataFileName "data/bustle.ui"
+           let getW cast name = io $ builderGetObject builder cast name
+           window <- getW castToWindow "diagramWindow"
+           ....
+      In an equation for ‘emptyWindow’:
+          emptyWindow
+            = do builder <- io builderNew
+                 io
+                   $ builderAddFromFile builder =<< getDataFileName "data/bustle.ui"
+                 let getW cast name = ...
+                 ....
+    |
+490 |   [openItem, openTwoItem] <- mapM (getW castToMenuItem) ["open", "openTwo"]
+    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+---
+ Bustle/UI.hs | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Bustle/UI.hs b/Bustle/UI.hs
+index 28ede19..6666c72 100644
+--- a/Bustle/UI.hs
++++ b/Bustle/UI.hs
+@@ -487,7 +487,8 @@ emptyWindow = do
+   subtitle <- getW castToLabel "headerSubtitle"
+   spinner  <- getW castToSpinner "headerSpinner"
+ 
+-  [openItem, openTwoItem] <- mapM (getW castToMenuItem) ["open", "openTwo"]
++  openItem <- getW castToMenuItem "open"
++  openTwoItem <- getW castToMenuItem "openTwo"
+   recordSessionItem <- getW castToMenuItem "recordSession"
+   recordSystemItem <- getW castToMenuItem "recordSystem"
+   recordAddressItem <- getW castToMenuItem "recordAddress"
+-- 
+2.26.2
+


=====================================
p/bustle/debian/patches/series
=====================================
@@ -1 +1,3 @@
 use-system-usr-prefix.patch
+ee4b81cbc232d47ba9940f1987777b17452e71ff.patch
+aae6843f51f54679d440fb3813e61355dc8406b9.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/c290822688d0ae6ea67be526d43c8fbad53d8d3e

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/c290822688d0ae6ea67be526d43c8fbad53d8d3e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20200508/3f18a7ca/attachment-0001.html>


More information about the Pkg-haskell-commits mailing list