From 337dbf6867597b6e3b72b0bdb2152a42a9f41dbc Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Sun, 24 Sep 2023 16:30:27 +0100 Subject: gnu: xfig: Update to 3.2.9. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/xfig-Enable-error-message-for-missing-libraries.patch: New file. * gnu/packages/patches/xfig-Fix-double-free-when-requesting-MediaBox.patch: Likewise. * gnu/packages/patches/xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-LIBS.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register new patches. * gnu/packages/xfig.scm (xfig): Update to 3.2.9. [source]: Use new patches. [arguments]<#:phases>: Add ‘wrap-program’. [native-inputs]: Add pkg-config, autoconf, automake and libtool. Move ghostscript to … [inputs]: … here. Add fig2dev, libxaw3d and libxft. [license]: Update URL. Signed-off-by: Liliana Marie Prikler --- gnu/packages/xfig.scm | 53 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) (limited to 'gnu/packages/xfig.scm') diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index a9a86fc2ed..9d07a5cd42 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -28,9 +28,11 @@ #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages freedesktop) #:use-module (gnu packages ghostscript) #:use-module (gnu packages xorg) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages image) #:use-module (gnu packages ghostscript) #:use-module (gnu packages imagemagick) @@ -98,7 +100,7 @@ variety of environments.") (define-public xfig (package (name "xfig") - (version "3.2.8b") + (version "3.2.9") (source (origin (method url-fetch) @@ -106,22 +108,55 @@ variety of environments.") name "-" version ".tar.xz")) (sha256 (base32 - "0fndgbm1mkqb1sn2v2kj3nx9mxj70jbp31y2bjvzcmmkry0q3k5j")) + "1xy2zqbd1wn2fij95kgnj39850r7xk74kvx7kp0dxhmvs429vv8k")) + ;; TODO: Remove these patches and snippet when updating, + ;; upstreamed since commit `84375ac05e923b46bbacc8b336b0dfbe29497b6b'. + (patches + (search-patches "xfig-Enable-error-message-for-missing-libraries.patch" + "xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-LIBS.patch" + "xfig-Fix-double-free-when-requesting-MediaBox.patch")) (modules '((guix build utils))) (snippet ;; The patch-dot-desktop-files phase requires a relative name. - #~(substitute* "xfig.desktop" - (("^(Exec=)/usr/bin/" _ key) key))))) + #~(begin + (substitute* "xfig.desktop" + (("^(Exec=)/usr/bin/" _ key) key)) + ;; This forces autoreconf to be invoked, needed for patches + ;; to be effective. + (delete-file "configure"))))) (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs #:allow-other-keys) + (let ((path + (search-path-as-list + '("bin") + (map (cut assoc-ref inputs <>) + (list "ghostscript" "fig2dev"))))) + (wrap-program (string-append #$output "/bin/xfig") + `("PATH" ":" prefix ,path)))))))) (native-inputs - ;; For tests. - (list desktop-file-utils ghostscript)) + (list pkg-config + ;; TODO: Remove the import on (gnu packages autotools) + ;; and related packages in the next update. + autoconf automake libtool + ;; For tests. + desktop-file-utils)) (inputs - (list libxaw3d + (list ghostscript + fig2dev + libxaw3d libjpeg-turbo libpng libxpm libx11 + libxft libxt)) (home-page "https://mcj.sourceforge.net/") (synopsis "Interactive drawing tool") @@ -132,4 +167,6 @@ spline curves, text, etc. It is also possible to import images in formats such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, deleted, moved or modified. Attributes such as colors or line styles can be selected in various ways. For text, 35 fonts are available.") - (license license:bsd-2))) + (license + (license:non-copyleft "file://Makefile.am" + "See .")))) -- cgit v1.2.3