diff options
author | João Miguel | 2016-08-20 21:02:26 +0100 |
---|---|---|
committer | João Miguel | 2016-08-20 21:02:26 +0100 |
commit | f13450e03efd6eff02207a656fcde68928815bdf (patch) | |
tree | 32aa3de72d28a0764259bf4c6e76c4157e158d0a | |
download | aur-f13450e03efd6eff02207a656fcde68928815bdf.tar.gz |
Initial commit, patched as the package upstream is old
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | directory.patch | 14 | ||||
-rw-r--r-- | haskell-hsh.install | 18 | ||||
-rw-r--r-- | orphans.patch | 11 | ||||
-rw-r--r-- | process.patch | 34 |
7 files changed, 158 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b6049c284ec9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +# Generated by mksrcinfo v8 +# Sat Aug 20 19:57:48 UTC 2016 +pkgbase = haskell-hsh + pkgdesc = Library to mix shell scripting with Haskell programs + pkgver = 2.1.2 + pkgrel = 1 + url = http://hackage.haskell.org/package/HSH + install = haskell-hsh.install + arch = i686 + arch = x86_64 + license = LGPL + depends = ghc + depends = haskell-missingh>=1.0.0 + depends = haskell-bytestring>=0.9.1.10 + depends = haskell-directory>=1.1.0.0 + depends = haskell-filepath>=1.2.0.0 + depends = haskell-hslogger + depends = haskell-mtl>=2.0.1.0 + depends = haskell-process>=1.0.1.5 + depends = haskell-regex-base>=0.93.2 + depends = haskell-regex-compat>=0.93.1 + depends = haskell-regex-posix>=0.94.4 + depends = haskell-unix>=2.4.2.0 + depends = haskell-base<5 + options = strip + source = http://hackage.haskell.org/packages/archive/HSH/2.1.2/HSH-2.1.2.tar.gz + source = directory.patch + source = orphans.patch + source = process.patch + sha256sums = 788a7f25336e7fe9c7d38b68bb4cc0030712fc47e0cdf282267dea1e46b0da9f + sha256sums = 78f32f4e3109ef478d33135624940484eaa3c269f80e3ec602ba0c2864ff0354 + sha256sums = 819c1dae6ebcc5ff89115c87c48bb4ba6cb3f4b4f91ca5a08455487007ea6dee + sha256sums = 325b18dd5c81da298f3afa976e8488e4edab14a1c9e5e23f577a4412f6693e34 + +pkgname = haskell-hsh + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..022d0fa0f79a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO +!*.patch +!*.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..deede3ed0864 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: João Miguel <jmcf125 at openmailbox dot org> +# (with the help of cabal2arch ;-) +_hkgname=HSH +pkgname=haskell-hsh +pkgver=2.1.2 +pkgrel=1 +pkgdesc="Library to mix shell scripting with Haskell programs" +url="http://hackage.haskell.org/package/${_hkgname}" +license=('LGPL') +arch=('i686' 'x86_64') +makedepends=() +depends=('ghc' 'haskell-missingh>=1.0.0' 'haskell-bytestring>=0.9.1.10' 'haskell-directory>=1.1.0.0' 'haskell-filepath>=1.2.0.0' 'haskell-hslogger' 'haskell-mtl>=2.0.1.0' 'haskell-process>=1.0.1.5' 'haskell-regex-base>=0.93.2' 'haskell-regex-compat>=0.93.1' 'haskell-regex-posix>=0.94.4' 'haskell-unix>=2.4.2.0' 'haskell-base<5') +options=('strip') +source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz directory.patch orphans.patch process.patch) +install=${pkgname}.install +sha256sums=(788a7f25336e7fe9c7d38b68bb4cc0030712fc47e0cdf282267dea1e46b0da9f 78f32f4e3109ef478d33135624940484eaa3c269f80e3ec602ba0c2864ff0354 819c1dae6ebcc5ff89115c87c48bb4ba6cb3f4b4f91ca5a08455487007ea6dee 325b18dd5c81da298f3afa976e8488e4edab14a1c9e5e23f577a4412f6693e34) +build() { + cd ${srcdir}/${_hkgname}-${pkgver} + # Yes, 3 patches, 3 different problems, 3 files + patch -p2 -i "$srcdir/directory.patch" # needed since System.Directory 1.2.6 + patch -p2 -i "$srcdir/process.patch" # needed since System.Process 1.3.0 + patch -p2 -i "$srcdir/orphans.patch" + # \---> part of the point of HSH is having all those orphan instances (also, an open world assumption is implied), those specific warnings are just noise + runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \ + --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build + runhaskell Setup haddock + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} +package() { + cd ${srcdir}/${_hkgname}-${pkgver} + install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh + install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh + install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries + ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname} + runhaskell Setup copy --destdir=${pkgdir} +} diff --git a/directory.patch b/directory.patch new file mode 100644 index 000000000000..52cab104ebf4 --- /dev/null +++ b/directory.patch @@ -0,0 +1,14 @@ +--- src/HSH-2.1.2/HSH/ShellEquivs.hs 2014-10-28 13:00:59.000000000 +0000 ++++ ShellEquivs.hs 2016-08-20 14:12:53.229915254 +0100 +@@ -86,7 +86,11 @@ + import Text.Regex (matchRegex, mkRegex) + import Text.Printf (printf) + import Control.Monad (foldM) ++#if __GLASGOW_HASKELL__>=800 || MIN_VERSION_directory(1,2,6) ++import System.Directory hiding (createDirectory,isSymbolicLink) -- SD.isSymbolicLink é novo ++#else + import System.Directory hiding (createDirectory) ++#endif + import qualified Control.Exception as E + -- import System.FilePath (splitPath) + diff --git a/haskell-hsh.install b/haskell-hsh.install new file mode 100644 index 000000000000..73a1dcaf42a1 --- /dev/null +++ b/haskell-hsh.install @@ -0,0 +1,18 @@ +HS_DIR=usr/share/haskell/haskell-hsh +post_install() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_upgrade() { + ${HS_DIR}/unregister.sh +} +post_upgrade() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_remove() { + ${HS_DIR}/unregister.sh +} +post_remove() { + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} diff --git a/orphans.patch b/orphans.patch new file mode 100644 index 000000000000..e9319e5e2f01 --- /dev/null +++ b/orphans.patch @@ -0,0 +1,11 @@ +--- src/HSH-2.1.2/HSH.cabal 2014-10-28 13:00:59.000000000 +0000 ++++ HSH.cabal 2016-08-20 20:40:16.529988440 +0100 +@@ -32,7 +32,7 @@ + bytestring + if !os(windows) + Build-Depends: unix +- GHC-Options: -O2 -threaded -Wall ++ GHC-Options: -O2 -threaded -Wall -Wno-orphans + + Executable runtests + if flag(buildtests) diff --git a/process.patch b/process.patch new file mode 100644 index 000000000000..c590c3e9901a --- /dev/null +++ b/process.patch @@ -0,0 +1,34 @@ +--- src/HSH-2.1.2/HSH/Command.hs 2014-10-28 13:00:59.000000000 +0000 ++++ Command.hs 2016-08-20 14:48:31.149988715 +0100 +@@ -301,6 +301,15 @@ + #if MIN_VERSION_process(1,2,0) + , delegate_ctlc = False + #endif ++#if MIN_VERSION_process(1,3,0) ++ , detach_console = False ++ , create_new_console = False ++ , new_session = False ++#endif ++#if MIN_VERSION_process(1,4,0) ++ , child_group = Nothing ++ , child_user = Nothing ++#endif + } + in do (_, oh', _, ph) <- createProcess cp + let oh = fromJust oh' +@@ -320,6 +329,15 @@ + #if MIN_VERSION_process(1,2,0) + , delegate_ctlc = False + #endif ++#if MIN_VERSION_process(1,3,0) ++ , detach_console = False ++ , create_new_console = False ++ , new_session = False ++#endif ++#if MIN_VERSION_process(1,4,0) ++ , child_group = Nothing ++ , child_user = Nothing ++#endif + } + in do (ih', oh', _, ph) <- createProcess cp + let ih = fromJust ih' |