[gimp/wip/Jehan/gtk-mr-1563-windows-ink] gitlab-ci: testing gtk!1563 for Windows Ink support.




commit 1a77efcee34945fb076721538fa5c45f77697b1e
Author: Jehan <jehan girinstud io>
Date:   Wed Mar 3 13:23:28 2021 +0100

    gitlab-ci: testing gtk!1563 for Windows Ink support.
    
    Properly this time (hopefully).

 .gitlab-ci.yml                                     |  5 ++-
 .../0001-gtk-meson-link-with-ssp-on-Windows.patch  | 43 ++++++++++++++++++++++
 build/windows/crossbuild-gitlab-ci/build-deps.sh   | 14 ++++++-
 3 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 061aa25e1f..30908f499c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -190,7 +190,7 @@ deps-win64:
     - apt-cache
   before_script:
     - apt-get update
-    - apt-get install -y --no-install-recommends wine wine64
+    - apt-get install -y --no-install-recommends wine wine64 wget
 
     - git clone --depth=${GIT_DEPTH} git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
     - cd crossroad
@@ -257,6 +257,9 @@ deps-win32:
     - cd ..
     - pip3 install zstandard
   script:
+    - apt-get update
+    - apt-get install -y --no-install-recommends wget
+
     - export PATH="`pwd`/.local/bin:$PATH"
     - crossroad w32 gimp --run="build/windows/crossbuild-gitlab-ci/build-deps.sh"
   artifacts:
diff --git a/build/windows/crossbuild-gitlab-ci/0001-gtk-meson-link-with-ssp-on-Windows.patch 
b/build/windows/crossbuild-gitlab-ci/0001-gtk-meson-link-with-ssp-on-Windows.patch
new file mode 100644
index 0000000000..150581e3fc
--- /dev/null
+++ b/build/windows/crossbuild-gitlab-ci/0001-gtk-meson-link-with-ssp-on-Windows.patch
@@ -0,0 +1,43 @@
+From b6b16c011def5c9e59ee8317715b4be05e088b9f Mon Sep 17 00:00:00 2001
+From: Jehan <jehan girinstud io>
+Date: Wed, 3 Mar 2021 17:04:16 +0100
+Subject: [PATCH] meson: link with ssp on Windows.
+
+Maybe not necessary for all Windows builds, but for the ones with
+mingw-w64 at least, since recent versions, -lssp is necessary for
+fortified functions access.
+---
+ gtk/meson.build | 2 +-
+ meson.build     | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/meson.build b/gtk/meson.build
+index 43a6e2bfef..41c7e2ee3b 100644
+--- a/gtk/meson.build
++++ b/gtk/meson.build
+@@ -1092,7 +1092,7 @@ gtk_update_icon_cache = executable(
+   'updateiconcache.c',
+   extra_update_icon_cache_objs,
+   c_args: gtk_cargs,
+-  dependencies: libgtk_dep,
++  dependencies: [ libgtk_dep, ssp ],
+   install: true
+ )
+ 
+diff --git a/meson.build b/meson.build
+index 7ea2f4c7dd..c8638a331b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -801,6 +801,9 @@ if os_win32
+   '''
+   result = cc.links(getdevprop_code, args: ['-lsetupapi'], name: 'has SetupDiGetDevicePropertyW')
+   cdata.set('HAVE_SETUP_DI_GET_DEVICE_PROPERTY_W', result ? 1 : false)
++
++  # Necessary with _FORTIFY_SOURCE on mingw-w64.
++  ssp = cc.find_library('ssp')
+ endif
+ 
+ have_gio_unix = false
+-- 
+2.29.2
+
diff --git a/build/windows/crossbuild-gitlab-ci/build-deps.sh 
b/build/windows/crossbuild-gitlab-ci/build-deps.sh
index 35fef20485..6690eb0f9b 100644
--- a/build/windows/crossbuild-gitlab-ci/build-deps.sh
+++ b/build/windows/crossbuild-gitlab-ci/build-deps.sh
@@ -17,6 +17,18 @@ crossroad meson _build/ -Dintrospection=false -Dsdl2=disabled -Dlibdir=lib && \
 ninja -C _build install || exit 1
 cd ..
 
+#GTK
+
+crossroad install atk glib2 && \
+git clone --depth 1 -b gtk-3-24 https://gitlab.gnome.org/GNOME/gtk.git && cd gtk && \
+git apply build/windows/crossbuild-gitlab-ci/0001-gtk-meson-link-with-ssp-on-Windows.patch && \
+wget https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1563.patch && \
+git apply 1563.patch && \
+crossroad meson _build/ -Dtests=false -Ddemos=false -Dexamples=false \
+                        -Dbuiltin_immodules=yes -Dintrospection=false -Dlibdir=lib && \
+ninja -C _build install || exit 1
+cd ..
+
 # preparing GIMP
 
 LIBMNG=
@@ -27,10 +39,8 @@ if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then
 fi
 
 crossroad install appstream-glib              \
-                  atk                         \
                   drmingw                     \
                   gexiv2                      \
-                  glib2                       \
                   json-c                      \
                   ghostscript                 \
                   iso-codes                   \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]