summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--add-scoped-typed-variables.patch10
-rw-r--r--update-vector-sized.patch12
4 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..efc25e0195ca
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = haskell-vulkan
+ pkgdesc = Haskell bindings to the Vulkan graphics API
+ pkgver = 1.7.0.0
+ pkgrel = 1
+ url = http://github.com/expipiplus1/vulkan#readme
+ arch = x86_64
+ license = custom:BSD3
+ makedepends = ghc
+ depends = ghc-libs
+ depends = haskell-vector-sized
+ source = https://hackage.haskell.org/packages/archive/vulkan/1.7.0.0/vulkan-1.7.0.0.tar.gz
+ source = update-vector-sized.patch
+ source = add-scoped-typed-variables.patch
+ sha256sums = 17c8437061adee81f6c4b34a1ead85a44f98c0c443bc2696025f1849c086e965
+ sha256sums = 09f891c690508b0f74973ee9eec471ac397665f07d74fd87c94dd68e72b8d6e9
+ sha256sums = df9e615b9827a5762ea299a5618fc2c2b4787ea468b32039b076f41e7eea4e2d
+
+pkgname = haskell-vulkan
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e83aaeb53c0c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Emanuel Couto <unit73e at gmail dot com>
+
+_hkgname=vulkan
+pkgname=haskell-vulkan
+pkgver=1.7.0.0
+pkgrel=1
+pkgdesc="Haskell bindings to the Vulkan graphics API"
+url="http://github.com/expipiplus1/vulkan#readme"
+license=('custom:BSD3')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-vector-sized')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ "update-vector-sized.patch" "add-scoped-typed-variables.patch")
+sha256sums=('17c8437061adee81f6c4b34a1ead85a44f98c0c443bc2696025f1849c086e965'
+ '09f891c690508b0f74973ee9eec471ac397665f07d74fd87c94dd68e72b8d6e9'
+ 'df9e615b9827a5762ea299a5618fc2c2b4787ea468b32039b076f41e7eea4e2d')
+
+prepare() {
+ cd "${srcdir}/${_hkgname}-${pkgver}"
+ patch -Np2 -i "${srcdir}/update-vector-sized.patch"
+ patch -Np2 -i "${srcdir}/add-scoped-typed-variables.patch"
+}
+
+build() {
+ cd "${srcdir}/${_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 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 "${srcdir}/${_hkgname}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}
diff --git a/add-scoped-typed-variables.patch b/add-scoped-typed-variables.patch
new file mode 100644
index 000000000000..cb2d07f6fea8
--- /dev/null
+++ b/add-scoped-typed-variables.patch
@@ -0,0 +1,10 @@
+diff -ura package.orig/vulkan-1.7.0.0/src/Graphics/Vulkan/Constants.hs package.new/vulkan-1.7.0.0/src/Graphics/Vulkan/Constants.hs
+--- package.orig/vulkan-1.7.0.0/src/Graphics/Vulkan/Constants.hs 2017-12-17 17:21:11.767442978 +0000
++++ package.new/vulkan-1.7.0.0/src/Graphics/Vulkan/Constants.hs 2017-12-17 17:21:44.487317898 +0000
+@@ -1,5 +1,6 @@
+ {-# LANGUAGE DataKinds #-}
+ {-# LANGUAGE PatternSynonyms #-}
++{-# LANGUAGE ScopedTypeVariables #-}
+ {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+ module Graphics.Vulkan.Constants where
+
diff --git a/update-vector-sized.patch b/update-vector-sized.patch
new file mode 100644
index 000000000000..603b23eb7d58
--- /dev/null
+++ b/update-vector-sized.patch
@@ -0,0 +1,12 @@
+diff -ura package.orig/vulkan-1.7.0.0/vulkan.cabal package.new/vulkan-1.7.0.0/vulkan.cabal
+--- package.orig/vulkan-1.7.0.0/vulkan.cabal 2017-12-17 14:31:25.024480088 +0000
++++ package.new/vulkan-1.7.0.0/vulkan.cabal 2017-12-17 14:31:41.464418071 +0000
+@@ -53,7 +53,7 @@
+ , Graphics.Vulkan.SparseResourceMemoryManagement
+ , Graphics.Vulkan.Version
+ build-depends: base >= 4.9 && < 5
+- , vector-sized >= 0.1 && < 0.4
++ , vector-sized >= 0.1 && < 0.7
+ extra-libraries: vulkan
+ default-language: Haskell2010
+