update to 0.1.31.0
This commit is contained in:
parent
71e1f15ae0
commit
ec6d8b5293
|
@ -1 +1,2 @@
|
|||
/hgettext-0.1.30.tar.gz
|
||||
/hgettext-0.1.31.0.tar.gz
|
||||
|
|
|
@ -5,19 +5,20 @@
|
|||
%global pkgver %{pkg_name}-%{version}
|
||||
|
||||
Name: ghc-%{pkg_name}
|
||||
Version: 0.1.30
|
||||
Release: 14%{?dist}
|
||||
Version: 0.1.31.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Haskell binding to libintl
|
||||
|
||||
License: BSD
|
||||
Url: https://hackage.haskell.org/package/%{pkg_name}
|
||||
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
|
||||
Patch0: hgettext-hse-1.18.patch
|
||||
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-rpm-macros
|
||||
# Begin cabal-rpm deps:
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: ghc-containers-devel
|
||||
BuildRequires: ghc-deepseq-devel
|
||||
BuildRequires: ghc-directory-devel
|
||||
BuildRequires: ghc-filepath-devel
|
||||
BuildRequires: ghc-haskell-src-exts-devel
|
||||
|
@ -27,7 +28,14 @@ BuildRequires: ghc-uniplate-devel
|
|||
# End cabal-rpm deps
|
||||
|
||||
%description
|
||||
Bindings to libintl.h (gettext, bindtextdomain).
|
||||
This package provides bindings to the 'gettext' internationalization and
|
||||
localization (i18n) library.
|
||||
|
||||
This package provides support for custom 'Setup.hs' scripts via the
|
||||
"Distribution.Simple.I18N.GetText" module.
|
||||
|
||||
A user-contributed tutorial can be found in the [Haskell
|
||||
Wiki](https://wiki.haskell.org/Internationalization_of_Haskell_programs_using_gettext).
|
||||
|
||||
|
||||
%package devel
|
||||
|
@ -47,7 +55,6 @@ This package provides the Haskell %{pkg_name} library development files.
|
|||
|
||||
%prep
|
||||
%setup -q -n %{pkgver}
|
||||
%patch0 -p1 -b .orig
|
||||
|
||||
|
||||
%build
|
||||
|
@ -56,6 +63,7 @@ This package provides the Haskell %{pkg_name} library development files.
|
|||
|
||||
%install
|
||||
%ghc_lib_install
|
||||
%ghc_fix_rpath %{pkgver}
|
||||
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
@ -72,8 +80,8 @@ This package provides the Haskell %{pkg_name} library development files.
|
|||
%ghc_pkg_recache
|
||||
|
||||
|
||||
# no license file!
|
||||
%files -f %{name}.files
|
||||
%license LICENSE
|
||||
|
||||
|
||||
%files devel -f %{name}-devel.files
|
||||
|
@ -81,6 +89,9 @@ This package provides the Haskell %{pkg_name} library development files.
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 24 2018 Jens Petersen <petersen@redhat.com> - 0.1.31.0-1
|
||||
- update to 0.1.31.0
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.30-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
From 5bf5932d6a40f5b830ffdbaa2cda2948eef52732 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <siarheit@google.com>
|
||||
Date: Sat, 1 Oct 2016 15:13:10 +0100
|
||||
Subject: [PATCH] update to support haskell-src-exts-1.18
|
||||
|
||||
One of major haskell-src-exts-1.18 changes
|
||||
is to parameterise AST with source location
|
||||
and add that field to every ast node.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
||||
---
|
||||
hgettext.cabal | 2 +-
|
||||
src/hgettext.hs | 11 +++++++++--
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hgettext.cabal b/hgettext.cabal
|
||||
index af934ac..37b659c 100644
|
||||
--- a/hgettext.cabal
|
||||
+++ b/hgettext.cabal
|
||||
@@ -26,6 +26,6 @@ Executable hgettext
|
||||
Main-Is: hgettext.hs
|
||||
Extensions: TemplateHaskell
|
||||
Hs-Source-Dirs: src
|
||||
- Build-Depends: base>=3.0.3.0 && <5, uniplate, haskell-src-exts
|
||||
+ Build-Depends: base>=3.0.3.0 && <5, uniplate, haskell-src-exts >= 1.18
|
||||
Other-Modules: Paths_hgettext
|
||||
|
||||
diff --git a/src/hgettext.hs b/src/hgettext.hs
|
||||
index c3b1b12..4139cae 100644
|
||||
--- a/src/hgettext.hs
|
||||
+++ b/src/hgettext.hs
|
||||
@@ -49,8 +49,15 @@ parseArgs args =
|
||||
where header = "Usage: hgettext [OPTION] [INPUTFILE] ..."
|
||||
|
||||
|
||||
-toTranslate :: String -> H.ParseResult H.Module -> [(Int, String)]
|
||||
-toTranslate f (H.ParseOk z) = nub [ (0, s) | H.App (H.Var (H.UnQual (H.Ident x))) (H.Lit (H.String s)) <- universeBi z, x == f]
|
||||
+toTranslate :: String -> H.ParseResult (H.Module H.SrcSpanInfo) -> [(Int, String)]
|
||||
+toTranslate f (H.ParseOk z) = nub [ (0, s)
|
||||
+ | H.App _
|
||||
+ (H.Var _
|
||||
+ (H.UnQual _
|
||||
+ (H.Ident _ x)))
|
||||
+ (H.Lit _
|
||||
+ (H.String _ s _slit)) <- universeBi z :: [H.Exp H.SrcSpanInfo]
|
||||
+ , x == f]
|
||||
toTranslate _ _ = []
|
||||
|
||||
-- Create list of messages from a single file
|
Loading…
Reference in New Issue