summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD47
-rw-r--r--haskell-dual-tree.patch13
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5777d61d19a9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = haskell-dual-tree
+ pkgdesc = Rose trees with cached and accumulating monoidal annotations.
+ pkgver = 0.2.2
+ pkgrel = 1
+ url = https://hackage.haskell.org/package/dual-tree
+ arch = x86_64
+ license = BSD-3
+ makedepends = ghc
+ depends = ghc-libs
+ depends = haskell-monoid-extras
+ depends = haskell-newtype-generics
+ source = https://hackage.haskell.org/package/dual-tree-0.2.2/dual-tree-0.2.2.tar.gz
+ source = haskell-dual-tree.patch
+ sha512sums = 4f2415763eaa879c80d7682e9a0fa1b237e6fc9eea6b6751c3d0e0aae0031d45fbea82c715adaeb257449d42d20fb8223a42c0861f513300ed118820b42f90ca
+ sha512sums = e62d0ad18b983d6359baca6a686e9fd002aa4b35e25de203bf5d7855b8c2dbc8d7fbcc4626a55d229754d7d40e00c075523edaf0485cd3bb8bd43abfa254c55d
+
+pkgname = haskell-dual-tree
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..07ac35943fa4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Jaron Kent-Dobias <jaron@kent-dobias.com>
+
+_hkgname=dual-tree
+pkgname=haskell-dual-tree
+pkgver=0.2.2
+pkgrel=1
+pkgdesc='Rose trees with cached and accumulating monoidal annotations.'
+url='https://hackage.haskell.org/package/dual-tree'
+license=('BSD-3')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-monoid-extras' 'haskell-newtype-generics')
+makedepends=('ghc')
+source=(https://hackage.haskell.org/package/${_hkgname}-${pkgver}/${_hkgname}-${pkgver}.tar.gz
+ haskell-dual-tree.patch)
+sha512sums=('4f2415763eaa879c80d7682e9a0fa1b237e6fc9eea6b6751c3d0e0aae0031d45fbea82c715adaeb257449d42d20fb8223a42c0861f513300ed118820b42f90ca'
+ 'e62d0ad18b983d6359baca6a686e9fd002aa4b35e25de203bf5d7855b8c2dbc8d7fbcc4626a55d229754d7d40e00c075523edaf0485cd3bb8bd43abfa254c55d')
+
+prepare() {
+ cd ${_hkgname}-${pkgver}
+ patch -Np1 -i "${srcdir}/haskell-dual-tree.patch"
+}
+
+build() {
+ cd ${_hkgname}-${pkgver}
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+ --dynlibdir=/usr/lib --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.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+package() {
+ cd ${_hkgname}-${pkgver}
+ install -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ install -dm 755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
+ runhaskell Setup copy --destdir="$pkgdir"
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 CHANGES -t "${pkgdir}/usr/share/doc/${pkgname}"
+ ln -s /usr/share/doc/${pkgname}/html "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/haskell-dual-tree.patch b/haskell-dual-tree.patch
new file mode 100644
index 000000000000..e52cc56a8c0b
--- /dev/null
+++ b/haskell-dual-tree.patch
@@ -0,0 +1,13 @@
+diff -ura dual-tree-0.2.2/dual-tree.cabal dual-tree-0.2.2.new/dual-tree.cabal
+--- dual-tree-0.2.2/dual-tree.cabal 2018-05-16 07:11:31.000000000 -0400
++++ dual-tree-0.2.2.new/dual-tree.cabal 2019-02-06 09:55:26.828425051 -0500
+@@ -40,8 +40,7 @@
+ default-language: Haskell2010
+ exposed-modules: Data.Tree.DUAL
+ Data.Tree.DUAL.Internal
+- build-depends: base >= 4.3 && < 4.12,
+- semigroups >= 0.8 && < 0.19,
++ build-depends: base >= 4.3,
+ newtype-generics >= 0.5 && < 0.6,
+ monoid-extras >= 0.2 && < 0.6
+ hs-source-dirs: src