[ghc-Agda] build with haskell-src-exts-1.13 using cabal-tweak-dep-ver and upstream patch

Jens Petersen petersen at fedoraproject.org
Fri Jun 22 08:15:59 UTC 2012


commit ccf62a39115ee0b76c4158881b75b400be2996a8
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri Jun 22 17:15:55 2012 +0900

    build with haskell-src-exts-1.13 using cabal-tweak-dep-ver and upstream patch
    
    also drop mtl version patch

 Agda-2.3.0.1-haskell-src-exts.patch |   31 +++++++++++++++++++------------
 Agda-2.3.0.1-mtl-2.1.patch          |   12 ------------
 ghc-Agda.spec                       |   13 ++++++++-----
 3 files changed, 27 insertions(+), 29 deletions(-)
---
diff --git a/Agda-2.3.0.1-haskell-src-exts.patch b/Agda-2.3.0.1-haskell-src-exts.patch
index 151bb81..1d1b340 100644
--- a/Agda-2.3.0.1-haskell-src-exts.patch
+++ b/Agda-2.3.0.1-haskell-src-exts.patch
@@ -1,12 +1,19 @@
-diff -u Agda-2.3.0.1/Agda.cabal\~ Agda-2.3.0.1/Agda.cabal
---- Agda-2.3.0.1/Agda.cabal~	2012-06-11 12:13:01.174134489 +0900
-+++ Agda-2.3.0.1/Agda.cabal	2012-06-22 09:52:32.132828546 +0900
-@@ -77,7 +77,7 @@
-     build-depends:  epic >= 0.1.13 && < 0.10
-   build-depends:    mtl >= 2.0,
-                     QuickCheck >= 2.3 && < 2.5,
--                    haskell-src-exts >= 1.9.6 && < 1.12,
-+                    haskell-src-exts >= 1.9.6 && < 2,
-                     containers >= 0.1 && < 0.5,
-                     pretty >= 1.0 && < 1.2,
-                     directory >= 1.0 && < 1.2,
+Thu Mar 29 00:11:54 JST 2012  Nils Anders Danielsson <nils.anders.danielsson at gmail.com>
+  * Added support for haskell-src-exts 1.12 and 1.13.
+diff -rN -u old-Agda/src/full/Agda/Compiler/MAlonzo/Compiler.hs new-Agda/src/full/Agda/Compiler/MAlonzo/Compiler.hs
+--- old-Agda/src/full/Agda/Compiler/MAlonzo/Compiler.hs	2012-06-22 11:47:55.669357752 +0900
++++ new-Agda/src/full/Agda/Compiler/MAlonzo/Compiler.hs	2012-06-22 11:47:58.279351479 +0900
+@@ -462,8 +462,13 @@
+   , "mazIncompleteMatch s = error (\"MAlonzo Runtime Error: incomplete pattern matching: \" ++ s)"
+   ]
+   where
++#if MIN_VERSION_haskell_src_exts(1,12,0)
++    parse = HS.parseWithMode
++              HS.defaultParseMode{HS.extensions = [HS.ExplicitForAll]}
++#else
+     parse = HS.parseWithMode
+               HS.defaultParseMode{HS.extensions = [HS.ExplicitForall]}
++#endif
+ 
+     ok (HS.ParseOk d)   = d
+     ok HS.ParseFailed{} = __IMPOSSIBLE__
diff --git a/ghc-Agda.spec b/ghc-Agda.spec
index f3702d7..34a9d76 100644
--- a/ghc-Agda.spec
+++ b/ghc-Agda.spec
@@ -49,8 +49,7 @@ BuildRequires:  ghc-xhtml-prof
 BuildRequires:  ghc-zlib-prof
 BuildRequires:  happy, alex
 BuildRequires:  emacs-haskell-mode
-Patch1:         Agda-2.3.0.1-mtl-2.1.patch
-Patch2:         Agda-2.3.0.1-haskell-src-exts.patch
+Patch1:         Agda-2.3.0.1-haskell-src-exts.patch
 
 %description
 %{common_description}
@@ -88,8 +87,11 @@ This provides the Emacs Lisp source files for the Agda interactive mode.
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-%patch1 -p1 -b .1.orig~
-%patch2 -p1 -b .2~
+
+cabal-tweak-dep-ver mtl "== 2.0.*" ">= 2.0"
+cabal-tweak-dep-ver haskell-src-exts "< 1.12" "< 1.14"
+
+%patch1 -p1 -b .orig
 
 
 %build
@@ -150,7 +152,8 @@ echo %{_datadir}/%{pkg_name}-%{version}/Agda.css >> ghc-%{pkg_name}.files
 
 %changelog
 * Thu Jun 21 2012 Jens Petersen <petersen at redhat.com> - 2.3.0.1-4
-- allow building with haskell-src-exts-1.13
+- upstream patch for building with haskell-src-exts-1.13
+- use new cabal-tweak-dep-ver script to change mtl and haskell-src-exts bounds
 
 * Mon Jun 11 2012 Jens Petersen <petersen at redhat.com> - 2.3.0.1-3
 - allow building with mtl-2.1


More information about the scm-commits mailing list