From b1c97a6c82fc1a1c242aede99297603642431f20 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Aug 2019 22:25:37 +0200 Subject: [PATCH] enable system libyaml with patch --- ghc-yaml.spec | 10 +++++++--- system-libyaml.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 system-libyaml.patch diff --git a/ghc-yaml.spec b/ghc-yaml.spec index 132c295..829bc85 100644 --- a/ghc-yaml.spec +++ b/ghc-yaml.spec @@ -12,7 +12,7 @@ Name: ghc-%{pkg_name} Version: 0.11.1.0 # can only be reset when all subpkgs bumped -Release: 1%{?dist} +Release: 2%{?dist} Summary: Support for parsing and rendering YAML documents License: BSD @@ -21,6 +21,7 @@ Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz Source1: https://hackage.haskell.org/package/%{libyaml}/%{libyaml}.tar.gz # End cabal-rpm sources +Patch1: system-libyaml.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel @@ -98,7 +99,7 @@ This package provides the Haskell %{pkg_name} profiling library. %global main_version %{version} %if %{defined ghclibdir} -%ghc_lib_subpackage %{libyaml} +%ghc_lib_subpackage -c libyaml-devel%{?_isa} %{libyaml} %endif %global version %{main_version} @@ -108,9 +109,9 @@ This package provides the Haskell %{pkg_name} profiling library. # Begin cabal-rpm setup: %setup -q -n %{pkgver} -a1 # End cabal-rpm setup +%patch1 -p1 -b .orig ( cd %{libyaml} -cabal-tweak-flag system-libyaml True # remove the bundled lib rm -r libyaml_src ) @@ -156,6 +157,9 @@ rm -r libyaml_src %changelog +* Thu Aug 8 2019 Jens Petersen - 0.11.1.0-2 +- patch .cabal for system libyaml + * Thu Jul 25 2019 Jens Petersen - 0.11.1.0-1 - update to 0.11.1.0 - subpackage libyaml diff --git a/system-libyaml.patch b/system-libyaml.patch new file mode 100644 index 0000000..55ecb3c --- /dev/null +++ b/system-libyaml.patch @@ -0,0 +1,13 @@ +--- yaml-0.11.1.0/libyaml-0.1.1.0/libyaml.cabal~ 2019-02-12 09:55:57.000000000 +0100 ++++ yaml-0.11.1.0/libyaml-0.1.1.0/libyaml.cabal 2019-08-08 22:15:56.350202056 +0200 +@@ -38,8 +38,8 @@ + + flag system-libyaml + description: Use the system-wide libyaml instead of the bundled copy +- manual: False +- default: False ++ manual: True ++ default: True + + library + exposed-modules: