Merge pull request #8406 from lazka/inkscape-glib-backport
inkscape: backport fix for building with newer glib
This commit is contained in:
65
mingw-w64-inkscape/001-fix-build-with-new-glib.patch
Normal file
65
mingw-w64-inkscape/001-fix-build-with-new-glib.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
From eb24388f1730918edd9565d9e5d09340ec0b3b08 Mon Sep 17 00:00:00 2001
|
||||
From: Harald van Dijk <harald@gigawatt.nl>
|
||||
Date: Wed, 17 Feb 2021 09:13:49 +0000
|
||||
Subject: [PATCH] Fix build with glib 2.67.3.
|
||||
|
||||
As of glib 2.67.3, <glib.h> can no longer be included in extern "C"
|
||||
blocks. It was indirectly included by both "types.h" and "color.h".
|
||||
"types.h" already does not need to be wrapped in an extern "C" block,
|
||||
"color.h" does but can be modified not to, so with that changed they can
|
||||
be moved out.
|
||||
---
|
||||
src/3rdparty/autotrace/autotrace.h | 6 +++---
|
||||
src/3rdparty/autotrace/color.h | 7 +++++++
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/3rdparty/autotrace/autotrace.h b/src/3rdparty/autotrace/autotrace.h
|
||||
index 2ce6f272a9..e56be9a74c 100644
|
||||
--- a/src/3rdparty/autotrace/autotrace.h
|
||||
+++ b/src/3rdparty/autotrace/autotrace.h
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
+#include "types.h"
|
||||
+#include "color.h"
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -35,9 +38,6 @@ extern "C" {
|
||||
* Typedefs
|
||||
* ===================================================================== */
|
||||
|
||||
-#include "types.h"
|
||||
-#include "color.h"
|
||||
-
|
||||
/* Third degree is the highest we deal with. */
|
||||
enum _at_polynomial_degree {
|
||||
AT_LINEARTYPE = 1,
|
||||
diff --git a/src/3rdparty/autotrace/color.h b/src/3rdparty/autotrace/color.h
|
||||
index e50ab30ae0..88651db9f7 100644
|
||||
--- a/src/3rdparty/autotrace/color.h
|
||||
+++ b/src/3rdparty/autotrace/color.h
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
typedef struct _at_color at_color;
|
||||
struct _at_color {
|
||||
guint8 r;
|
||||
@@ -43,4 +47,7 @@ void at_color_free(at_color * color);
|
||||
GType at_color_get_type(void);
|
||||
#define AT_TYPE_COLOR (at_color_get_type ())
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif /* __cplusplus */
|
||||
#endif /* not AT_COLOR_H */
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -5,7 +5,7 @@ _realname=inkscape
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.0.2
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Vector graphics editor using the SVG file format (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
@@ -53,10 +53,12 @@ optdepends=(#"${MINGW_PACKAGE_PREFIX}-pstoedit: latex formulas"
|
||||
options=('staticlibs' 'strip')
|
||||
source=("${_realname}-${pkgver}.tar.xz::https://inkscape.org/gallery/item/23820/inkscape-${pkgver}.tar.xz"
|
||||
inkscape-1.0.1-unbundle.patch
|
||||
inkscape-1.0.1-install-layout.patch)
|
||||
inkscape-1.0.1-install-layout.patch
|
||||
001-fix-build-with-new-glib.patch)
|
||||
sha256sums=('da3e230511a08cbf21e86710d161458594fea87867e9157b67ed01a04ea2798a'
|
||||
'92387251c1740f1a57cde9e587cc673ef1600813617bd2c9db65598c324a24d4'
|
||||
'131b2e1190637df0554ef1ee8cf46440689584375c117d057ab47d5871c58128')
|
||||
'131b2e1190637df0554ef1ee8cf46440689584375c117d057ab47d5871c58128'
|
||||
'6a4dbadc77fee357ed770cbd4cc59012246a08b1fb7766b52b2de84a3f221c80')
|
||||
|
||||
prepare() {
|
||||
mv "${srcdir}/inkscape-1.0.2_2021-01-15_e86c870879" "${srcdir}/${_realname}-${pkgver}"
|
||||
@@ -64,6 +66,8 @@ prepare() {
|
||||
|
||||
patch -p1 -i ${srcdir}/inkscape-1.0.1-unbundle.patch
|
||||
patch -p1 -i ${srcdir}/inkscape-1.0.1-install-layout.patch
|
||||
# https://gitlab.com/inkscape/inkscape/-/merge_requests/2790
|
||||
patch -p1 -i ${srcdir}/001-fix-build-with-new-glib.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user