summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-07-17 11:44:27 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2020-07-17 15:35:57 +0200
commitdb0940180544c3ef5d83b216f1e0287f71189426 (patch)
treec3d72a7732e053e4bcdeff459888327d83cea31f /gnu/packages
parent46fa001dea6b39b705b31996485734fc193973e8 (diff)
downloadguix-db0940180544c3ef5d83b216f1e0287f71189426.tar.gz
gnu: Add sbcl-mcclim-fontconfig.
* gnu/packages/lisp-xyz.scm (sbcl-mcclim-fontconfig): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/lisp-xyz.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 7ba414f9a8..0adeff41c1 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -12922,3 +12922,34 @@ specification}, a toolkit for writing GUIs in Common Lisp.")
                (("mcclim-fonts/clx-truetype")
                 "mcclim-fonts-clx-truetype"))
              #t)))))))
+
+(define-public sbcl-mcclim-fontconfig
+  (package
+    (inherit sbcl-clim-lisp)
+    (name "sbcl-mcclim-fontconfig")
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alexandria" ,sbcl-alexandria)
+       ("cffi" ,sbcl-cffi)
+       ("cffi-grovel" ,sbcl-cffi-grovel)
+       ("fontconfig" ,fontconfig)))
+    (arguments
+     '(#:asd-file "Extensions/fontconfig/mcclim-fontconfig.asd"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "Extensions/fontconfig/src/functions.lisp"
+               (("libfontconfig\\.so")
+                (string-append (assoc-ref inputs "fontconfig")
+                               "/lib/libfontconfig.so")))
+             #t))
+         (add-after 'unpack 'fix-build
+           (lambda _
+             ;; The cffi-grovel system does not get loaded automatically,
+             ;; so we load it explicitly.
+             (substitute* "Extensions/fontconfig/mcclim-fontconfig.asd"
+               (("\\(asdf:defsystem #:mcclim-fontconfig" all)
+                (string-append "(asdf:load-system :cffi-grovel)\n" all)))
+             #t)))))))