Date: Sunday, September 25, 2022 @ 21:45:49
Author: felixonmars
Revision: 1310920
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-xcffib/repos/community-staging-x86_64/
haskell-xcffib/repos/community-staging-x86_64/PKGBUILD
(from rev 1310919, haskell-xcffib/trunk/PKGBUILD)
haskell-xcffib/repos/community-staging-x86_64/xcffib-xcb-proto-1.15.patch
(from rev 1310919, haskell-xcffib/trunk/xcffib-xcb-proto-1.15.patch)
-----------------------------+
PKGBUILD | 46 ++++++++++++++++++++++++
xcffib-xcb-proto-1.15.patch | 79 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+)
Copied: haskell-xcffib/repos/community-staging-x86_64/PKGBUILD (from rev
1310919, haskell-xcffib/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-09-25 21:45:49 UTC (rev 1310920)
@@ -0,0 +1,46 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=xcffib
+pkgname=haskell-xcffib
+pkgver=0.11.1
+pkgrel=179
+pkgdesc="A cffi-based python binding for X"
+url="https://github.com/tych0/xcffib"
+license=('Apache')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-attoparsec' 'haskell-either' 'haskell-filemanip'
'haskell-language-python'
+ 'haskell-optparse-applicative' 'haskell-split' 'haskell-xcb-types')
+makedepends=('ghc' 'uusi')
+source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ $_hkgname-xcb-proto-1.15.patch)
+sha512sums=('dd70a762184b714fa53fd906ac192edcf990d8ff7674be1369eace38ee750da5eb6f4c5c2b7c6e5fab980f4bee96a7de4e2e38a27702cef28875a09bde8e5dd2'
+
'edc61ae0eddfda36122e9752ecae061b0caf59f2a448b1a0ccac1c5f03a2b281e6d8a3c5e777653782f454a1da7ef5080154492f1d1c17c667b5ac06a5052be0')
+
+prepare() {
+ cd $_hkgname-$pkgver
+ patch -p1 -i ../$_hkgname-xcb-proto-1.15.patch
+ gen-setup
+}
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic
--disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
--ghc-option=-fllvm
+ runhaskell Setup build $MAKEFLAGS
+ 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 -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
+}
Copied:
haskell-xcffib/repos/community-staging-x86_64/xcffib-xcb-proto-1.15.patch (from
rev 1310919, haskell-xcffib/trunk/xcffib-xcb-proto-1.15.patch)
===================================================================
--- community-staging-x86_64/xcffib-xcb-proto-1.15.patch
(rev 0)
+++ community-staging-x86_64/xcffib-xcb-proto-1.15.patch 2022-09-25
21:45:49 UTC (rev 1310920)
@@ -0,0 +1,79 @@
+From 4138f6c8ca32d92fc1e163fccd71ecc3529e9715 Mon Sep 17 00:00:00 2001
+From: Tycho Andersen <[email protected]>
+Date: Sat, 2 Oct 2021 08:03:10 -0600
+Subject: [PATCH 2/4] don't die on xcb's new "length" element
+
+As with other new elements in the last 5 years, we don't actually *do*
+anything with this besides ignore it, but we do need to explicitly ignore
+it to avoid failures.
+
+Signed-off-by: Tycho Andersen <[email protected]>
+---
+ generator/Data/XCB/Python/Parse.hs | 5 ++++-
+ xcffib.cabal | 6 +++---
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/generator/Data/XCB/Python/Parse.hs
b/generator/Data/XCB/Python/Parse.hs
+index dbae9ef..5c8926a 100644
+--- a/generator/Data/XCB/Python/Parse.hs
++++ b/generator/Data/XCB/Python/Parse.hs
+@@ -294,6 +294,7 @@ structElemToPyUnpack _ _ _ (Pad i) = Left (Nothing, mkPad
i)
+ structElemToPyUnpack _ _ _ (Doc _ _ _) = Left (Nothing, "")
+ -- XXX: What does fd mean? we should implement it correctly
+ structElemToPyUnpack _ _ _ (Fd _) = Left (Nothing, "")
++structElemToPyUnpack _ _ _ (Length _ _) = Left (Nothing, "")
+
+ -- The switch fields pick the way to expression to pack based on the
expression
+ structElemToPyUnpack _ _ _ (Switch name expr _ bitcases) =
+@@ -352,9 +353,10 @@ structElemToPyPack :: String
+ [(Expr
(), [GenStructElem Type])]
+ )]
+ structElemToPyPack _ _ _ (Pad i) = Left (Nothing, mkPad i)
+--- TODO: implement doc and fd?
++-- TODO: implement these?
+ structElemToPyPack _ _ _ (Doc _ _ _) = Left (Nothing, "")
+ structElemToPyPack _ _ _ (Fd _) = Left (Nothing, "")
++structElemToPyPack _ _ _ (Length _ _) = Left (Nothing, "")
+ structElemToPyPack _ _ accessor (Switch n expr _ bitcases) =
+ let name = accessor n
+ cmp = xExpressionToPyExpr id expr
+@@ -646,6 +648,7 @@ mkSyntheticMethod membs = do
+ getName (Switch n _ _ _) = Just n
+ getName (Doc _ _ _) = Nothing
+ getName (Fd n) = Just n
++ getName (Length _ _) = Nothing
+
+ assign :: String -> Statement ()
+ assign n = mkAssign (mkDot "self" n) $ mkName n
+diff --git a/xcffib.cabal b/xcffib.cabal
+index ba1f4b1..8d5bdd6 100644
+--- a/xcffib.cabal
++++ b/xcffib.cabal
+@@ -25,7 +25,7 @@ source-repository head
+
+ library
+ build-depends: base ==4.*,
+- xcb-types >= 0.10.0,
++ xcb-types >= 0.11.0,
+ language-python >= 0.5.6,
+ filepath,
+ filemanip,
+@@ -48,7 +48,7 @@ executable xcffibgen
+ xcffib,
+ language-python >= 0.5.6,
+ split,
+- xcb-types >= 0.10.0,
++ xcb-types >= 0.11.0,
+ optparse-applicative >= 0.13,
+ filepath,
+ filemanip,
+@@ -83,7 +83,7 @@ test-suite GeneratorTests.hs
+ type: exitcode-stdio-1.0
+ build-depends: base ==4.*,
+ xcffib,
+- xcb-types >= 0.10.0,
++ xcb-types >= 0.11.0,
+ language-python >= 0.5.6,
+ HUnit,
+ test-framework,
+