all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 68813@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#68813] [core-updates PATCH 09/20] gnu: pstoedit: Update to 4.00.
Date: Thu, 22 Feb 2024 11:10:08 -0500	[thread overview]
Message-ID: <0bd56daf4bc6f8dfb9616dad8b18f5e3a9f4f689.1708618218.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <cover.1708618218.git.maxim.cournoyer@gmail.com>

* gnu/packages/graphics.scm (pstoedit): Update to 4.00.
[source]: Apply patches.
[arguments]: New field.
[inputs]: Remove labels.  Add glib and pango.
* gnu/packages/patches/pstoedit-fix-gcc12.patch: New file.
* gnu/packages/patches/pstoedit-fix-plainC.patch: Likewise.
* gnu/packages/patches/pstoedit-pkglibdir.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Register them.

Change-Id: Ia17dae0ebc3e08b573b02431b10cc689a72a07dd
---

 gnu/local.mk                                  |  3 ++
 gnu/packages/graphics.scm                     | 31 ++++++++----
 gnu/packages/patches/pstoedit-fix-gcc12.patch | 12 +++++
 .../patches/pstoedit-fix-plainC.patch         | 47 +++++++++++++++++++
 gnu/packages/patches/pstoedit-pkglibdir.patch | 19 ++++++++
 5 files changed, 104 insertions(+), 8 deletions(-)
 create mode 100644 gnu/packages/patches/pstoedit-fix-gcc12.patch
 create mode 100644 gnu/packages/patches/pstoedit-fix-plainC.patch
 create mode 100644 gnu/packages/patches/pstoedit-pkglibdir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 34cdf6564d..9db2e39c45 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1908,6 +1908,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/psm-disable-memory-stats.patch		\
   %D%/packages/patches/psm-ldflags.patch			\
   %D%/packages/patches/psm-repro.patch				\
+  %D%/packages/patches/pstoedit-fix-gcc12.patch			\
+  %D%/packages/patches/pstoedit-fix-plainC.patch		\
+  %D%/packages/patches/pstoedit-pkglibdir.patch			\
   %D%/packages/patches/pulseaudio-fix-mult-test.patch		\
   %D%/packages/patches/pulseaudio-longer-test-timeout.patch	\
   %D%/packages/patches/pulseview-qt515-compat.patch		\
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index e04834670d..17a388beea 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -21,7 +21,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
-;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
 ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
 ;;; Copyright © 2021 Andy Tai <atai@atai.org>
@@ -976,23 +976,38 @@ (define-public python-booleanoperations
 (define-public pstoedit
   (package
     (name "pstoedit")
-    (version "3.77")
+    ;; Do not yet upgrade to 4.0.0, as its include file fails to compile for C
+    ;; project (see: https://github.com/reviczky/pstoedit/issues/2).
+    (version "4.00")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/"
                                   version "/pstoedit-" version ".tar.gz"))
               (sha256
                (base32
-                "02av76j75g5sq3bg353yl6dlllda9ihmmk4c8hvgiscix816nv4s"))))
+                "1sk2mhrjgnlz4a1650p3qxrv6av6qc66ibmy48ckspx7mfp7snh7"))
+              (patches
+               (search-patches "pstoedit-fix-gcc12.patch"
+                               "pstoedit-fix-plainC.patch"
+                               "pstoedit-pkglibdir.patch"))))
     (build-system gnu-build-system)
+    (arguments
+     ;; Avoid keeping extraneous references to libtool exhaustively listed
+     ;; dependencies.
+     (list #:configure-flags #~(list "LDFLAGS=-Wl,--as-needed")))
     (native-inputs
      (list pkg-config))
     (inputs
-     `(("ghostscript" ,ghostscript)
-       ("imagemagick" ,imagemagick)
-       ("libplot" ,plotutils)
-       ("libjpeg" ,libjpeg-turbo)
-       ("zlib" ,zlib)))               ;else libp2edrvmagick++.so fails to link
+     (list ghostscript
+           imagemagick
+           plotutils
+           libjpeg-turbo
+           libzip
+           ;; The following inputs are pulled in by libtool, from the
+           ;; imagemagick library files (.la), which records all its
+           ;; transitive dependencies.
+           glib
+           pango))
     (home-page "http://www.pstoedit.net/")
     (synopsis "Converter for PostScript and PDF graphics")
     (description "The @code{pstoedit} utility allows translating graphics
diff --git a/gnu/packages/patches/pstoedit-fix-gcc12.patch b/gnu/packages/patches/pstoedit-fix-gcc12.patch
new file mode 100644
index 0000000000..4aeeaff818
--- /dev/null
+++ b/gnu/packages/patches/pstoedit-fix-gcc12.patch
@@ -0,0 +1,12 @@
+Retrieved from Fedora: https://src.fedoraproject.org/rpms/pstoedit/tree
+
+--- a/src/drvpptx.orig.cpp	2021-08-29 16:25:45.000000000 +0200
++++ b/src/drvpptx.cpp	2022-01-28 11:57:44.765756339 +0100
+@@ -65,6 +65,7 @@
+ #define ZIP_EXTERN extern
+ 
+ #include <zip.h>
++#include <memory>
+ 
+ #ifdef _MSC_VER
+ // MS VC++ Windows
diff --git a/gnu/packages/patches/pstoedit-fix-plainC.patch b/gnu/packages/patches/pstoedit-fix-plainC.patch
new file mode 100644
index 0000000000..684c5043be
--- /dev/null
+++ b/gnu/packages/patches/pstoedit-fix-plainC.patch
@@ -0,0 +1,47 @@
+Retrieved from Fedora: https://src.fedoraproject.org/rpms/pstoedit/tree
+
+diff --git a/src/pstoedit.cpp b/src/pstoedit.cpp
+index a718f37..ac0df37 100755
+--- a/src/pstoedit.cpp
++++ b/src/pstoedit.cpp
+@@ -327,6 +327,11 @@ extern FILE *yyin;				// used by lexer
+ 						// otherwise we could declare it locally where it is used
+ 
+ 
++extern "C" DLLEXPORT void loadpstoeditplugins_plainC(const char *progname, int verbose)
++{
++  return loadpstoeditplugins(progname, cerr, (bool) verbose);
++}
++
+ static void usage(ostream & outstream, bool forTeX, bool withdetails, bool withcategories )
+ {
+ 	if (withcategories) {
+diff --git a/src/pstoedit.h b/src/pstoedit.h
+index 294b3c2..74ebf2a 100755
+--- a/src/pstoedit.h
++++ b/src/pstoedit.h
+@@ -100,8 +100,13 @@ void clearPstoeditDriverInfo_plainC(struct DriverDescription_S * ptr);
+ 
+ #ifdef __cplusplus
+ extern "C" DLLEXPORT
+-#endif
+ void loadpstoeditplugins(const char* progname, std::ostream & errstream, bool verbose);
++#endif
++
++#ifdef __cplusplus
++extern "C" DLLEXPORT
++#endif
++void loadpstoeditplugins_plainC(const char* progname, int verbose);
+ 
+ #ifdef __cplusplus
+ extern "C" DLLEXPORT
+--- a/src/pstoedit.orig.h	2023-07-22 19:27:43.691166652 +0200
++++ b/src/pstoedit.h	2023-07-22 19:31:18.897952130 +0200
+@@ -37,6 +37,7 @@
+ #endif
+ 
+ #include "pstoedll.h"
++#include <stdbool.h>
+ 
+ typedef int (*execute_interpreter_function)(int argc, const char * const argv[]);
+ 
diff --git a/gnu/packages/patches/pstoedit-pkglibdir.patch b/gnu/packages/patches/pstoedit-pkglibdir.patch
new file mode 100644
index 0000000000..0734913593
--- /dev/null
+++ b/gnu/packages/patches/pstoedit-pkglibdir.patch
@@ -0,0 +1,19 @@
+Retrieved from Fedora: https://src.fedoraproject.org/rpms/pstoedit/tree
+
+--- a/config/pstoedit.pc.orig.in	2018-04-16 14:26:28.000000000 +0200
++++ b/config/pstoedit.pc.in	2020-10-05 14:37:16.750980762 +0200
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@includedir@/pstoedit
+ 
+ Name: pstoedit
+ Description: converts PostScript(TM) and PDF files to other vector graphic formats
+@@ -8,4 +8,4 @@
+ Version: @VERSION@.0
+ Requires: 
+ Libs: -L@libdir@ -lpstoedit @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@
+-Cflags: -I@includedir@
++Cflags: -I@includedir@/pstoedit
-- 
2.41.0





  parent reply	other threads:[~2024-02-22 16:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  4:26 [bug#68813] [PATCH 1/5] gnu: Add atf Maxim Cournoyer
2024-02-22 16:09 ` [bug#68813] [core-updates PATCH 00/20] Replace pkg-config with pkgconf to reduce propagation / Inkscape updates Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 02/20] gnu: Add lutok Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 03/20] gnu: Add kyua Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 04/20] gnu: pkgconf: Enable test suite Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 05/20] gnu: Add pkgconf-as-pkg-config Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 06/20] gnu: pkgconf: Add $PKG_CONFIG_PATH search path Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 07/20] gnu: pkgconf: Add support for cross-compilation Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 08/20] gnu: pkg-config: Alias to pkgconf-as-pkg-config Maxim Cournoyer
2024-02-24 11:41     ` Ludovic Courtès
2024-02-24 20:34       ` Maxim Cournoyer
2024-02-24 22:33         ` Ludovic Courtès
2024-03-09 18:32           ` bug#68813: [PATCH core-updates] Replace pkg-config with pkgconf to reduce propagation / Inkscape updates Maxim Cournoyer
2024-02-22 16:10   ` Maxim Cournoyer [this message]
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 10/20] gnu: autotrace: Update to 0.31.10 Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 11/20] gnu: autotrace: Remove libtool archives Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 12/20] gnu: autotrace: Fix pkg-config file Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 13/20] gnu: gd: Update to 2.3.3 Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 14/20] gnu: lib2geom: Update to 1.3 Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 15/20] gnu: inkscape: Truly enable ImageMagic support Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 16/20] gnu: lib2geom: Use gexps and remove input labels Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 17/20] gnu: inkscape: Update to 1.3.2 Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 18/20] gnu: inkscape: Sort inputs Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 19/20] gnu: inkscape: Fix Python support Maxim Cournoyer
2024-02-22 16:10   ` [bug#68813] [core-updates PATCH 20/20] Revert "gnu: mpv: Propagate most libraries." Maxim Cournoyer
2024-02-22 16:29   ` [bug#68813] [core-updates PATCH 01/20] gnu: Add atf Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0bd56daf4bc6f8dfb9616dad8b18f5e3a9f4f689.1708618218.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=68813@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.