[Pkg-ganeti-devel] [ganeti] 05/06: Revert "Add patches for lens 4.4+ compatibility"
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Thu Feb 11 11:34:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch gdn/wheezy
in repository ganeti.
commit ea168b7e789948116e8c07a80aa8837c0a8cbc01
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Fri Jun 12 11:19:51 2015 +0300
Revert "Add patches for lens 4.4+ compatibility"
Lens 4.4 support is now part of 2.12.4.
This reverts commit 74ae9f06563302ae49e3408abe89788e8dfda7ed.
---
...mple-CPP-macro-for-detecting-lens-version.patch | 150 ---------------------
...enses-correctly-for-different-lens-versio.patch | 42 ------
2 files changed, 192 deletions(-)
diff --git a/debian/patches/0001-Create-a-simple-CPP-macro-for-detecting-lens-version.patch b/debian/patches/0001-Create-a-simple-CPP-macro-for-detecting-lens-version.patch
deleted file mode 100644
index ab05b5c..0000000
--- a/debian/patches/0001-Create-a-simple-CPP-macro-for-detecting-lens-version.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 9dfe2cf411500478b5954e93f99c4fb27a1637d1 Mon Sep 17 00:00:00 2001
-From: Petr Pudlak <pudlak at google.com>
-Date: Tue, 10 Feb 2015 13:11:44 +0100
-Subject: [PATCH 1/2] Create a simple CPP macro for detecting lens versions
-
-.. in Haskell code.
-
-This patch should be removed starting from 2.14, as there cabal provides
-proper macros for all packages.
-
-The macro in this patch is intentionally kept compatible with the cabal
-macros.
-
-Signed-off-by: Petr Pudlak <pudlak at google.com>
----
- Makefile.am | 20 +++++++++++++-------
- configure.ac | 16 ++++++++++++++++
- src/Ganeti/Lens.hs | 7 ++++++-
- 3 files changed, 35 insertions(+), 8 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2bd16e6..67368f3 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1171,14 +1171,14 @@ Makefile.ghc: $(HS_MAKEFILE_GHC_SRCS) Makefile \
- | $(built_base_sources) $(HS_BUILT_SRCS)
- $(GHC) -M -dep-makefile $@ -dep-suffix $(HPROF_SUFFIX) \
- -dep-suffix $(HTEST_SUFFIX) $(HFLAGS) -itest/hs \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) $(HS_MAKEFILE_GHC_SRCS)
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) $(HS_MAKEFILE_GHC_SRCS)
-
- @include_makefile_ghc@
-
- %.o:
- @echo '[GHC]: $@ <- $^'
- @$(GHC) -c $(HFLAGS) \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) $(@:%.o=%.hs)
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) $(@:%.o=%.hs)
-
- # For TH+profiling we need to compile twice: Once without profiling,
- # and then once with profiling. See
-@@ -1188,14 +1188,15 @@ if HPROFILE
- @echo '[GHC|prof]: $@ <- $^'
- @$(GHC) -c $(HFLAGS) \
- $(HPROFFLAGS) \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) \
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) \
- $(@:%.$(HPROF_SUFFIX)_o=%.hs)
- endif
-
- %.$(HTEST_SUFFIX)_o:
- @echo '[GHC|test]: $@ <- $^'
- @$(GHC) -c $(HTEST_FLAGS) \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) $(@:%.$(HTEST_SUFFIX)_o=%.hs)
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) \
-+ $(HEXTRA_COMBINED) $(@:%.$(HTEST_SUFFIX)_o=%.hs)
-
- %.hi: %.o ;
- %.$(HTEST_SUFFIX)_hi: %.$(HTEST_SUFFIX)_o ;
-@@ -1209,7 +1210,8 @@ endif
- @echo '[GHC-link]: $@'
- $(GHC) $(HFLAGS) \
- $(HPROFFLAGS) \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) --make $(@:%=%.hs)
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) \
-+ $(HEXTRA_COMBINED) --make $(@:%=%.hs)
- @rm -f $(notdir $@).tix
- @touch "$@"
-
-@@ -1222,7 +1224,8 @@ $(HS_TEST_PROGS): %: %.$(HTEST_SUFFIX)_o \
- fi
- @echo '[GHC-link|test]: $@'
- $(GHC) $(HTEST_FLAGS) \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) --make $(@:%=%.hs)
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) \
-+ $(HEXTRA_COMBINED) --make $(@:%=%.hs)
- @rm -f $(notdir $@).tix
- @touch "$@"
-
-@@ -2556,6 +2559,9 @@ $(APIDOC_HS_DIR)/index.html: $(HS_LIBTESTBUILT_SRCS) Makefile
- if [ "$(HS_PARALLEL3)" ]; \
- then OPTGHC="$$OPTGHC --optghc=$(HS_PARALLEL3)"; \
- fi; \
-+ if [ "$(HS_LENS)" ]; \
-+ then OPTGHC="$$OPTGHC $(addprefix --optghc=,$(HS_LENS))"; \
-+ fi; \
- if [ "$(HS_REGEX_PCRE)" ]; \
- then OPTGHC="$$OPTGHC --optghc=$(HS_REGEX_PCRE)"; \
- fi; \
-@@ -2580,7 +2586,7 @@ TAGS: $(GENERATED_FILES)
- -osuf tags.o \
- -hisuf tags.hi \
- -lcurl \
-- $(HS_PARALLEL3) $(HS_REGEX_PCRE) \
-+ $(HS_PARALLEL3) $(HS_LENS) $(HS_REGEX_PCRE) \
- $(HS_LIBTEST_SRCS)
- find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
- -path './daemons/ganeti-*' -o -path './tools/*' -o \
-diff --git a/configure.ac b/configure.ac
-index 0cf7019..114ba59 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -626,6 +626,22 @@ AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
- [AC_GHC_PKG_REQUIRE(parallel)], t)
- AC_SUBST(HS_PARALLEL3)
-
-+# check for lens versions; 0 means an unknown version;
-+# this (and the corresponding code in Makefile.am) should be removed starting
-+# from 2.14, as there cabal creates proper CPP macros to distinguish package
-+# versions
-+HS_LENS="-DLENS_MAJOR=0 -DLENS_MINOR=0"
-+AC_GHC_PKG_CHECK([lens-3.*], [HS_LENS="-DLENS_MAJOR=3 -DLENS_MINOR=0"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=7"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.0.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=0"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.1.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=1"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.2.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=2"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.3.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=3"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.4.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=4"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.5.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=5"], [], t)
-+AC_GHC_PKG_CHECK([lens-4.6.*], [HS_LENS="-DLENS_MAJOR=4 -DLENS_MINOR=6"], [], t)
-+AC_SUBST(HS_LENS)
-+
- # and now standard modules
- AC_GHC_PKG_REQUIRE(curl)
- AC_GHC_PKG_REQUIRE(json)
-diff --git a/src/Ganeti/Lens.hs b/src/Ganeti/Lens.hs
-index b3bd69f..8f9b976 100644
---- a/src/Ganeti/Lens.hs
-+++ b/src/Ganeti/Lens.hs
-@@ -1,4 +1,4 @@
--{-# LANGUAGE RankNTypes #-}
-+{-# LANGUAGE RankNTypes, CPP #-}
-
- {-| Provides all lens-related functions.
-
-@@ -44,6 +44,11 @@ module Ganeti.Lens
- , atSet
- ) where
-
-+-- The following macro is just a temporary solution for 2.12 and 2.13.
-+-- Since 2.14 cabal creates proper macros for all dependencies.
-+#define MIN_VERSION_lens(maj,min,rev) \
-+ (((maj)<LENS_MAJOR)||(((maj)==LENS_MAJOR)&&((min)<=LENS_MINOR)))
-+
- import Control.Applicative ((<$>), WrappedMonad(..))
- import Control.Lens
- import Control.Monad
---
-2.1.4
-
diff --git a/debian/patches/0002-Construct-lenses-correctly-for-different-lens-versio.patch b/debian/patches/0002-Construct-lenses-correctly-for-different-lens-versio.patch
deleted file mode 100644
index 9d89a34..0000000
--- a/debian/patches/0002-Construct-lenses-correctly-for-different-lens-versio.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1136f1cbf85444dcd0b942545e7f4000b81befbc Mon Sep 17 00:00:00 2001
-From: Petr Pudlak <pudlak at google.com>
-Date: Tue, 10 Feb 2015 13:18:00 +0100
-Subject: [PATCH 2/2] Construct lenses correctly for different 'lens' versions
-
-As the interface of the TH code for generating lenses changed twice in
-4.*, we need to differentiate between versions accordingly.
-
-Signed-off-by: Petr Pudlak <pudlak at google.com>
----
- src/Ganeti/Lens.hs | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/Ganeti/Lens.hs b/src/Ganeti/Lens.hs
-index 8f9b976..0299e1a 100644
---- a/src/Ganeti/Lens.hs
-+++ b/src/Ganeti/Lens.hs
-@@ -69,8 +69,19 @@ makeCustomLensesFiltered :: (String -> Bool) -> Name -> Q [Dec]
- makeCustomLensesFiltered f = makeLensesWith customRules
- where
- customRules :: LensRules
-- customRules = set lensField (fmap lensFieldName . mfilter f . Just)
-- defaultRules
-+ customRules = set lensField nameFun lensRules
-+#if MIN_VERSION_lens(4,5,0)
-+ nameFun :: Name -> [Name] -> Name -> [DefName]
-+ nameFun _ _ = liftM (TopName . mkName) . nameFilter . nameBase
-+#elif MIN_VERSION_lens(4,4,0)
-+ nameFun :: [Name] -> Name -> [DefName]
-+ nameFun _ = liftM (TopName . mkName) . nameFilter . nameBase
-+#else
-+ nameFun :: String -> Maybe String
-+ nameFun = nameFilter
-+#endif
-+ nameFilter :: (MonadPlus m) => String -> m String
-+ nameFilter = liftM lensFieldName . mfilter f . return
-
- -- | Create lenses for all fields of a given data type.
- makeCustomLenses :: Name -> Q [Dec]
---
-2.1.4
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list