summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Valdes2020-02-15 20:18:12 -0500
committerAlejandro Valdes2020-02-15 20:18:12 -0500
commit3fb79291be1a1c6e8249e4aa06d0d45fb9672c39 (patch)
treec43b7361cd34ded31b74d687ec6cdea7074bc660
parentb58985809343096956d2d6772cb66828d74dc368 (diff)
downloadaur-3fb79291be1a1c6e8249e4aa06d0d45fb9672c39.tar.gz
Fixed compilation with plasma 5.18
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--f411876086099638677d35c4cc023e5d046eff6a.patch60
3 files changed, 71 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 219336108e4a..43f8c6d50dc6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
pkgbase = kwin-effects-yet-another-magic-lamp
pkgdesc = Just Yet Another Magic Lamp effect
pkgver = 4.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/zzag/kwin-effects-yet-another-magic-lamp
arch = x86_64
license = GPL3
makedepends = extra-cmake-modules
depends = kwin
source = kwin-effects-yet-another-magic-lamp-4.1.tar.gz::https://github.com/zzag/kwin-effects-yet-another-magic-lamp/archive/4.1.tar.gz
+ source = f411876086099638677d35c4cc023e5d046eff6a.patch
sha256sums = 12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99
+ sha256sums = 74c7ba20069bb61f0291dd9f40535a943eefc1a69f5e350001bc36951ddb980c
pkgname = kwin-effects-yet-another-magic-lamp
diff --git a/PKGBUILD b/PKGBUILD
index 56c676a5419b..4a69958535e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,18 +2,22 @@
pkgname=kwin-effects-yet-another-magic-lamp
pkgver=4.1
-pkgrel=1
+pkgrel=2
pkgdesc="Just Yet Another Magic Lamp effect"
arch=('x86_64')
url="https://github.com/zzag/$pkgname"
license=('GPL3')
-depends=(kwin)
+depends=('kwin>=5.18.0')
makedepends=(extra-cmake-modules)
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zzag/${pkgname}/archive/${pkgver}.tar.gz)
-sha256sums=('12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zzag/${pkgname}/archive/${pkgver}.tar.gz
+ f411876086099638677d35c4cc023e5d046eff6a.patch)
+sha256sums=('12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99'
+ '74c7ba20069bb61f0291dd9f40535a943eefc1a69f5e350001bc36951ddb980c')
prepare() {
mkdir -p build
+ cd $srcdir/$pkgname-$pkgver
+ patch --forward --strip=1 --input="${srcdir}/f411876086099638677d35c4cc023e5d046eff6a.patch"
}
build() {
diff --git a/f411876086099638677d35c4cc023e5d046eff6a.patch b/f411876086099638677d35c4cc023e5d046eff6a.patch
new file mode 100644
index 000000000000..96aea46f4bfd
--- /dev/null
+++ b/f411876086099638677d35c4cc023e5d046eff6a.patch
@@ -0,0 +1,60 @@
+From f411876086099638677d35c4cc023e5d046eff6a Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vladzzag@gmail.com>
+Date: Fri, 17 Jan 2020 21:16:41 +0200
+Subject: [PATCH] Fix build with KDE Plasma 5.18 LTS
+
+Fixes #21
+---
+ src/YetAnotherMagicLampEffect.cc | 10 ++++++++--
+ src/YetAnotherMagicLampEffect.h | 5 +++++
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/YetAnotherMagicLampEffect.cc b/src/YetAnotherMagicLampEffect.cc
+index 98dbe59..77e35c1 100644
+--- a/src/YetAnotherMagicLampEffect.cc
++++ b/src/YetAnotherMagicLampEffect.cc
+@@ -168,7 +168,11 @@ void YetAnotherMagicLampEffect::prePaintWindow(KWin::EffectWindow* w, KWin::Wind
+ KWin::effects->prePaintWindow(w, data, time);
+ }
+
++#if KWIN_EFFECT_API_VERSION <= KWIN_EFFECT_API_MAKE_VERSION(0, 228)
+ void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data)
++#else
++void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, const QRegion& region, KWin::WindowPaintData& data)
++#endif
+ {
+ auto modelIt = m_models.constFind(w);
+ if (modelIt == m_models.constEnd()) {
+@@ -180,11 +184,13 @@ void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, QReg
+ QVector<WindowQuad> quads = m_meshRenderer->makeGrid(w, m_gridResolution);
+ (*modelIt).apply(quads);
+
++ QRegion clipRegion = region;
++
+ if ((*modelIt).needsClip()) {
+- region = (*modelIt).clipRegion();
++ clipRegion = (*modelIt).clipRegion();
+ }
+
+- m_meshRenderer->render(w, quads, texture, region);
++ m_meshRenderer->render(w, quads, texture, clipRegion);
+ }
+
+ bool YetAnotherMagicLampEffect::isActive() const
+diff --git a/src/YetAnotherMagicLampEffect.h b/src/YetAnotherMagicLampEffect.h
+index 8d4325a..0455278 100644
+--- a/src/YetAnotherMagicLampEffect.h
++++ b/src/YetAnotherMagicLampEffect.h
+@@ -40,7 +40,12 @@ class YetAnotherMagicLampEffect : public KWin::Effect {
+ void postPaintScreen() override;
+
+ void prePaintWindow(KWin::EffectWindow* w, KWin::WindowPrePaintData& data, int time) override;
++
++#if KWIN_EFFECT_API_VERSION <= KWIN_EFFECT_API_MAKE_VERSION(0, 228)
+ void drawWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data) override;
++#else
++ void drawWindow(KWin::EffectWindow* w, int mask, const QRegion& region, KWin::WindowPaintData& data) override;
++#endif
+
+ bool isActive() const override;
+ int requestedEffectChainPosition() const override;