gnu: autotrace: Prepare for GLib 2.68 and later.

* gnu/packages/patches/autotrace-glib-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/graphics.scm (autotrace)[source](patches): New field.
This commit is contained in:
Marius Bakke 2021-05-16 00:26:49 +02:00
parent d58e2f2723
commit d4ffa96302
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
3 changed files with 52 additions and 0 deletions

View file

@ -831,6 +831,7 @@ dist_patch_DATA = \
%D%/packages/patches/audiofile-hurd.patch \ %D%/packages/patches/audiofile-hurd.patch \
%D%/packages/patches/audiofile-function-signature.patch \ %D%/packages/patches/audiofile-function-signature.patch \
%D%/packages/patches/automake-skip-amhello-tests.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \
%D%/packages/patches/autotrace-glib-compat.patch \
%D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avahi-localstatedir.patch \
%D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \
%D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/awesome-reproducible-png.patch \

View file

@ -394,6 +394,7 @@ (define-public autotrace
(url "https://github.com/autotrace/autotrace") (url "https://github.com/autotrace/autotrace")
(commit commit))) (commit commit)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(patches (search-patches "autotrace-glib-compat.patch"))
(sha256 (sha256
(base32 (base32
"0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s")))) "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))))

View file

@ -0,0 +1,50 @@
Fix build with GLib 2.68 and later.
Taken from upstream pull request:
https://github.com/autotrace/autotrace/pull/41
diff --git a/src/autotrace.h b/src/autotrace.h
--- a/src/autotrace.h
+++ b/src/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/color.h b/src/color.h
--- a/src/color.h
+++ b/src/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 */