patch out TH from Setup and build on all archs (#992363)
This commit is contained in:
parent
1e94be5589
commit
96be48ec2d
|
@ -0,0 +1,30 @@
|
||||||
|
diff --git a/Setup.hs b/Setup.hs
|
||||||
|
index cee008e..ff13514 100644
|
||||||
|
--- a/Setup.hs
|
||||||
|
+++ b/Setup.hs
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
import Distribution.Simple
|
||||||
|
import Distribution.Simple.LocalBuildInfo
|
||||||
|
import Distribution.Simple.Setup
|
||||||
|
@@ -10,7 +9,6 @@ import System.Process
|
||||||
|
import System.Directory
|
||||||
|
import System.FilePath
|
||||||
|
import System.Exit
|
||||||
|
-import Language.Haskell.TH (appE, varE, mkName, conE)
|
||||||
|
|
||||||
|
main = defaultMainWithHooks hk
|
||||||
|
where
|
||||||
|
@@ -34,11 +32,7 @@ cArgsHC = map ("-optc" ++) cArgs
|
||||||
|
|
||||||
|
canUseRDRAND :: FilePath -> IO Bool
|
||||||
|
canUseRDRAND cc = do
|
||||||
|
- -- Template haskell to call withTempDirectory in a backward compatible way
|
||||||
|
- -- withTempDirectory normal False "" "testRDRAND" $ \tmpDir -> do
|
||||||
|
- $(if cabalVersion >= Version [1,17,0] []
|
||||||
|
- then appE (appE (varE $ mkName "withTempDirectory") (varE 'normal)) (conE (mkName "False"))
|
||||||
|
- else appE (varE $ mkName "withTempDirectory") (varE 'normal)) "" "testRDRAND" $ \tmpDir -> do
|
||||||
|
+ withTempDirectory normal "" "testRDRAND" $ \tmpDir -> do
|
||||||
|
writeFile (tmpDir ++ "/testRDRAND.c")
|
||||||
|
(unlines [ "#include <stdint.h>"
|
||||||
|
, "int main() {"
|
|
@ -7,22 +7,19 @@
|
||||||
|
|
||||||
Name: ghc-%{pkg_name}
|
Name: ghc-%{pkg_name}
|
||||||
Version: 0.2.2.1
|
Version: 0.2.2.1
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: A platform independent entropy source
|
Summary: A platform independent entropy source
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://hackage.haskell.org/package/%{pkg_name}
|
URL: http://hackage.haskell.org/package/%{pkg_name}
|
||||||
Source0: http://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
Source0: http://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
||||||
|
Patch1: entropy-0.2.2.1-no-TH.patch
|
||||||
|
|
||||||
BuildRequires: ghc-Cabal-devel
|
BuildRequires: ghc-Cabal-devel
|
||||||
BuildRequires: ghc-rpm-macros
|
BuildRequires: ghc-rpm-macros
|
||||||
# Begin cabal-rpm deps:
|
# Begin cabal-rpm deps:
|
||||||
BuildRequires: ghc-bytestring-devel
|
BuildRequires: ghc-bytestring-devel
|
||||||
# End cabal-rpm deps
|
# End cabal-rpm deps
|
||||||
# Setup uses TH
|
|
||||||
ExclusiveArch: %{ghc_arches_with_ghci}
|
|
||||||
ExcludeArch: armv7hl
|
|
||||||
BuildRequires: ghc-template-haskell-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A platform independent method to obtain cryptographically strong entropy
|
A platform independent method to obtain cryptographically strong entropy
|
||||||
|
@ -44,7 +41,7 @@ This package provides the Haskell %{pkg_name} library development files.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pkg_name}-%{version}
|
%setup -q -n %{pkg_name}-%{version}
|
||||||
|
%patch1 -p1 -b .orig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ghc_lib_build
|
%ghc_lib_build
|
||||||
|
@ -70,6 +67,10 @@ This package provides the Haskell %{pkg_name} library development files.
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 11 2014 Jens Petersen <petersen@redhat.com> - 0.2.2.1-4
|
||||||
|
- drop use of TemplateHaskell from Setup with patch from 0.2.2.2
|
||||||
|
so no longer need to restrict arch's (#992363)
|
||||||
|
|
||||||
* Tue Jul 8 2014 Jens Petersen <petersen@redhat.com> - 0.2.2.1-3
|
* Tue Jul 8 2014 Jens Petersen <petersen@redhat.com> - 0.2.2.1-3
|
||||||
- update to cblrpm-0.8.11
|
- update to cblrpm-0.8.11
|
||||||
- exclude arm due to TH segfault
|
- exclude arm due to TH segfault
|
||||||
|
|
Loading…
Reference in New Issue