summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhololeap <hololeap@protonmail.com>2023-10-02 23:09:38 -0600
committerSam James <sam@gentoo.org>2023-10-23 04:10:06 +0100
commit2efaa4129fd1910971a843ff19c05411ddd6d202 (patch)
tree1977509778776ffb4a959c14ae755769a779dcb0
parentdev-haskell/shelly: add 1.12.1 (diff)
downloadgentoo-2efaa4129fd1910971a843ff19c05411ddd6d202.tar.gz
gentoo-2efaa4129fd1910971a843ff19c05411ddd6d202.tar.bz2
gentoo-2efaa4129fd1910971a843ff19c05411ddd6d202.zip
dev-haskell/simple-sendfile: add 0.2.30-r1
Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-haskell/simple-sendfile/Manifest1
-rw-r--r--dev-haskell/simple-sendfile/files/simple-sendfile-0.2.30-musl-1.2.4.patch56
-rw-r--r--dev-haskell/simple-sendfile/metadata.xml5
-rw-r--r--dev-haskell/simple-sendfile/simple-sendfile-0.2.30-r1.ebuild39
4 files changed, 96 insertions, 5 deletions
diff --git a/dev-haskell/simple-sendfile/Manifest b/dev-haskell/simple-sendfile/Manifest
index 66dada28c6ec..51b46f059757 100644
--- a/dev-haskell/simple-sendfile/Manifest
+++ b/dev-haskell/simple-sendfile/Manifest
@@ -1 +1,2 @@
DIST simple-sendfile-0.2.28.tar.gz 343120 BLAKE2B fd6a5e083707e113fe4637ee8242b6036f813deec2ad2adf7d9e91338b4d15ef950d35e6cfc69be569601272f8beb12b823e4528d6a9933f3bc04533835f9240 SHA512 9a08d4ba26cd05b1fff3e72bd0846260d4c04921a5ca1f86258c61e51ee5ccf8e14dd2aea0bee44590572feba1832b2562b75b5f71f004c705f02cd0a0f000d1
+DIST simple-sendfile-0.2.30.tar.gz 343470 BLAKE2B ed9ef76782ed310207aa3a04c78b92c11eb3d25e2df934216feeedde29a5963d04b38832b5604e987dc4ca8b83ec653000cb7298761e13e96f477e7fb5767e7d SHA512 ae624939d54bf5ed8aa2c0727a29696730ba6b1d520f28bdc5b42a8e4c4bc03980821639fb8e16702a360dbd0396aea8a997055d22812bef3d22ffaaac53f759
diff --git a/dev-haskell/simple-sendfile/files/simple-sendfile-0.2.30-musl-1.2.4.patch b/dev-haskell/simple-sendfile/files/simple-sendfile-0.2.30-musl-1.2.4.patch
new file mode 100644
index 000000000000..0dc669f7e697
--- /dev/null
+++ b/dev-haskell/simple-sendfile/files/simple-sendfile-0.2.30-musl-1.2.4.patch
@@ -0,0 +1,56 @@
+From c16550e29f6c6cbe35e133c347a82821fa67f284 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Sun, 18 Jun 2023 21:52:42 +0000
+Subject: [PATCH] Fix build on musl 1.2.4
+
+Remove references to the deprecated LFS64 compatibility symbols, and
+replace them with the normal interfaces. All calls are automatically 64
+bit on musl, and define _FILE_OFFSET_BITS=64 to make sure calls on glibc
+are 64 bits.
+---
+ Network/Sendfile/Linux.hsc | 15 +++------------
+ 1 file changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/Network/Sendfile/Linux.hsc b/Network/Sendfile/Linux.hsc
+index 4f7adab..96bfb04 100644
+--- a/Network/Sendfile/Linux.hsc
++++ b/Network/Sendfile/Linux.hsc
+@@ -1,6 +1,8 @@
+ {-# LANGUAGE ForeignFunctionInterface #-}
+ {-# LANGUAGE CPP #-}
+
++#define _FILE_OFFSET_BITS 64
++
+ module Network.Sendfile.Linux (
+ sendfile
+ , sendfile'
+@@ -34,9 +36,6 @@ import System.Posix.Types
+ #include <sys/sendfile.h>
+ #include <sys/socket.h>
+
+-isLargeOffset :: Bool
+-isLargeOffset = sizeOf (0 :: COff) == 8
+-
+ isLargeSize :: Bool
+ isLargeSize = sizeOf (0 :: CSize) == 8
+
+@@ -142,15 +141,7 @@ sendfileloop dst src offp len hook = do
+
+ -- Dst Src in order. take care
+ foreign import ccall unsafe "sendfile"
+- c_sendfile32 :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
+-
+-foreign import ccall unsafe "sendfile64"
+- c_sendfile64 :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
+-
+-c_sendfile :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
+-c_sendfile
+- | isLargeOffset = c_sendfile64
+- | otherwise = c_sendfile32
++ c_sendfile :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
+
+ ----------------------------------------------------------------
+
+--
+2.41.0
+
diff --git a/dev-haskell/simple-sendfile/metadata.xml b/dev-haskell/simple-sendfile/metadata.xml
index 615151a0ab7e..382a399478bc 100644
--- a/dev-haskell/simple-sendfile/metadata.xml
+++ b/dev-haskell/simple-sendfile/metadata.xml
@@ -5,11 +5,6 @@
<email>haskell@gentoo.org</email>
<name>Gentoo Haskell</name>
</maintainer>
- <longdescription>
- Cross platform library for the sendfile system call.
- This library tries to call minimum system calls which
- are the bottleneck of web servers.
- </longdescription>
<use>
<flag name="allow-bsd">Allow use of BSD sendfile (disable on
GNU/kFreeBSD)</flag>
diff --git a/dev-haskell/simple-sendfile/simple-sendfile-0.2.30-r1.ebuild b/dev-haskell/simple-sendfile/simple-sendfile-0.2.30-r1.ebuild
new file mode 100644
index 000000000000..dc5b25b845c9
--- /dev/null
+++ b/dev-haskell/simple-sendfile/simple-sendfile-0.2.30-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.6.3
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="Cross platform library for the sendfile system call"
+HOMEPAGE="https://hackage.haskell.org/package/simple-sendfile"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="+allow-bsd"
+
+RDEPEND="dev-haskell/network:=[profile?]
+ >=dev-lang/ghc-7.10.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.22.2.0
+ test? ( dev-haskell/conduit
+ dev-haskell/conduit-extra
+ >=dev-haskell/hspec-1.3
+ dev-haskell/hunit
+ dev-haskell/resourcet )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.2.30-musl-1.2.4.patch"
+)
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag allow-bsd allow-bsd)
+}