diff options
author | Colin Watson <cjwatson@debian.org> | 2013-06-15 17:27:00 +0400 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-06-15 17:27:00 +0400 |
commit | c61360e4b3b366c9a44b0f71cc156e9618bcdd0b (patch) | |
tree | 31beea22f3f2286c75aebc48d3d0433734c6ad90 /p | |
parent | d38bd99192d820086aa37f3b4f925ee1ba363827 (diff) | |
download | DHG_packages-c61360e4b3b366c9a44b0f71cc156e9618bcdd0b.tar.gz |
haskell-warp: On kFreeBSD, -DSENDFILEFD doesn't work; 'struct sf_hdtr' has no definition and so simple-sendfile has to use its fallback emulation. Add a flag to disable this, and also disable the test suite on kFreeBSD as a consequence.
Diffstat (limited to 'p')
-rw-r--r-- | p/haskell-warp/debian/changelog | 9 | ||||
-rw-r--r-- | p/haskell-warp/debian/control | 6 | ||||
-rw-r--r-- | p/haskell-warp/debian/patches/kfreebsd.patch | 47 | ||||
-rw-r--r-- | p/haskell-warp/debian/patches/series | 1 | ||||
-rwxr-xr-x | p/haskell-warp/debian/rules | 9 |
5 files changed, 67 insertions, 5 deletions
diff --git a/p/haskell-warp/debian/changelog b/p/haskell-warp/debian/changelog index 118c10d81..3df4d13d5 100644 --- a/p/haskell-warp/debian/changelog +++ b/p/haskell-warp/debian/changelog @@ -1,3 +1,12 @@ +haskell-warp (1.3.7.4-4) UNRELEASED; urgency=low + + * On kFreeBSD, -DSENDFILEFD doesn't work; 'struct sf_hdtr' has no + definition and so simple-sendfile has to use its fallback emulation. + Add a flag to disable this, and also disable the test suite on kFreeBSD + as a consequence. + + -- Colin Watson <cjwatson@debian.org> Sat, 15 Jun 2013 14:24:59 +0100 + haskell-warp (1.3.7.4-3) unstable; urgency=low * Move Haskell blurb to the end of the description, reduces the impact diff --git a/p/haskell-warp/debian/control b/p/haskell-warp/debian/control index ccde436cb..c4fd05db0 100644 --- a/p/haskell-warp/debian/control +++ b/p/haskell-warp/debian/control @@ -39,9 +39,9 @@ Build-Depends: debhelper (>= 9) , libghc-wai-dev (>> 1.3) , libghc-wai-dev (<< 1.5) , libghc-wai-prof - , libghc-hunit-dev - , libghc-quickcheck2-dev - , libghc-hspec-dev (>> 1.3) + , libghc-hunit-dev [!kfreebsd-any] + , libghc-quickcheck2-dev [!kfreebsd-any] + , libghc-hspec-dev (>> 1.3) [!kfreebsd-any] , netbase Build-Depends-Indep: ghc-doc , libghc-blaze-builder-doc diff --git a/p/haskell-warp/debian/patches/kfreebsd.patch b/p/haskell-warp/debian/patches/kfreebsd.patch new file mode 100644 index 000000000..f14a243a9 --- /dev/null +++ b/p/haskell-warp/debian/patches/kfreebsd.patch @@ -0,0 +1,47 @@ +Description: Add allow-sendfilefd flag for Debian GNU/kFreeBSD + On Debian GNU/kFreeBSD (FreeBSD kernel plus glibc), the BSD flavour of + sendfile is not usable, but Cabal treats kfreebsdgnu as os(freebsd) so I + had to add a flag to simple-sendfile.cabal to make it possible to select + the fallback implementation. See + https://github.com/kazu-yamamoto/simple-sendfile/pull/13 for more details. + . + warp.cabal reflects the availability of interfaces from simple-sendfile, + and so I believe it needs a matching flag to make it possible to forcibly + disable the use of -DSENDFILEFD. +Author: Colin Watson <cjwatson@debian.org> +Forwarded: https://github.com/yesodweb/wai/pull/164 +Last-Update: 2013-06-15 + +Index: b/warp.cabal +=================================================================== +--- a/warp.cabal ++++ b/warp.cabal +@@ -20,6 +20,10 @@ + Flag network-bytestring + Default: False + ++Flag allow-sendfilefd ++ Description: Allow use of sendfileFd (not available on GNU/kFreeBSD) ++ Default: True ++ + Library + Build-Depends: base >= 3 && < 5 + , blaze-builder >= 0.2.1.4 && < 0.4 +@@ -53,7 +57,7 @@ + Network.Wai.Handler.Warp.Types + Paths_warp + Ghc-Options: -Wall +- if os(linux) || os(freebsd) || os(darwin) ++ if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd) + Cpp-Options: -DSENDFILEFD + Build-Depends: hashable + Other-modules: Network.Wai.Handler.Warp.FdCache +@@ -92,7 +96,7 @@ + -- Yes, this means that the test suite will no longer work on Windows. + -- Unfortunately there is a bug in older versions of cabal, and this conditional + -- will therefore break older systems. +- --if os(linux) || os(freebsd) || os(darwin) ++ --if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd) + Cpp-Options: -DSENDFILEFD + Build-Depends: unix + , hashable diff --git a/p/haskell-warp/debian/patches/series b/p/haskell-warp/debian/patches/series new file mode 100644 index 000000000..26238c9c3 --- /dev/null +++ b/p/haskell-warp/debian/patches/series @@ -0,0 +1 @@ +kfreebsd.patch diff --git a/p/haskell-warp/debian/rules b/p/haskell-warp/debian/rules index 01f1aaf04..190a7fcd5 100755 --- a/p/haskell-warp/debian/rules +++ b/p/haskell-warp/debian/rules @@ -1,6 +1,11 @@ #!/usr/bin/make -f -DEB_ENABLE_TESTS = yes - +include /usr/share/cdbs/1/rules/buildvars.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/hlibrary.mk + +ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) + DEB_SETUP_GHC_CONFIGURE_ARGS := -f-allow-sendfilefd +else + DEB_ENABLE_TESTS = yes +endif |