[neon/kde/ksudoku/Neon/release] /: patch it to build

Jonathan Riddell null at kde.org
Fri Mar 5 17:52:41 GMT 2021


Git commit 719b4bc1d6cb6b81801c55faf1f513d79f6a4c90 by Jonathan Riddell.
Committed on 05/03/2021 at 17:52.
Pushed by jriddell into branch 'Neon/release'.

patch it to build

A  +24   -0    patches/qtglobal.diff
M  +11   -0    snapcraft.yaml

https://invent.kde.org/neon/kde/ksudoku/commit/719b4bc1d6cb6b81801c55faf1f513d79f6a4c90

diff --git a/patches/qtglobal.diff b/patches/qtglobal.diff
new file mode 100644
index 0000000..29b2228
--- /dev/null
+++ b/patches/qtglobal.diff
@@ -0,0 +1,24 @@
+commit 24852f2cfc8606046f38d94c5fcba9fa90ddef33
+Author: Johnny Jazeix <jazeix at gmail.com>
+Date:   Sun Nov 29 21:32:50 2020 +0100
+
+    fix Windows nightly. Q_WS_WIN does not exist anymore and we need to include QtGlobal first to know about the macros
+
+diff --git a/src/gui/views/ArcBall.h b/src/gui/views/ArcBall.h
+index 58c1593..d1112b2 100644
+--- a/src/gui/views/ArcBall.h
++++ b/src/gui/views/ArcBall.h
+@@ -20,10 +20,12 @@
+ #ifndef _ArcBall_h
+ #define _ArcBall_h
+ 
++#include <QtGlobal>
++
+ #ifdef Q_OS_MAC
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+-#elif defined(Q_WS_WIN)
++#elif defined(Q_OS_WIN)
+ #include <windows.h>
+ #include <GL/gl.h>                                                                                             // Header File For The OpenGL32 Library
+ #include <GL/glu.h>                                                                                            // Header File For The GLu32 Library
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 9bc997a..da4aa5b 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -40,6 +40,11 @@ package-repositories:
     url: http://origin.archive.neon.kde.org/user
     key-server: keyserver.ubuntu.com
 parts:
+    patches:
+        source: debian/patches/
+        plugin: dump
+        prime: [-*]
+        stage: [qtglobal.diff]
     ksudoku:
         parse-info:
         - usr/share/metainfo/org.kde.ksudoku.appdata.xml
@@ -48,6 +53,10 @@ parts:
         after:
         - kde-frameworks-5-env
         plugin: cmake
+        override-build: |-
+            cd $SNAPCRAFT_PART_SRC
+            patch -p1 < $SNAPCRAFT_STAGE/qtglobal.diff
+            snapcraftctl build
         build-packages:
         - libkf5kdegames-dev
         - kdoctools5
@@ -55,6 +64,8 @@ parts:
         - libkf5kdegames7
         - libkf5kdegamesprivate1
         source: http://download.kde.org/stable/release-service/20.12.3/src/ksudoku-20.12.3.tar.xz
+        build-environment:
+        - VERBOSE: "1"
         cmake-parameters:
         - "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON"
         - "-DCMAKE_INSTALL_PREFIX=/usr"


More information about the Neon-commits mailing list