guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 7263223c59e9ef6ed81d9c411cf87c1643989298
Author: Olivier Farges <[email protected]>
AuthorDate: Tue Jun 16 08:24:23 2026 +0200

    gnu: embree: Generate a pkg-config file.
    
    * gnu/packages/graphics.scm (embree)[#:phases]: Add `install-pkg-config`.
    (embree-3)[#:phases]: Delete `install-pkg-config`.
    
    Merges: guix/guix!9216
    Reviewed-by: bdunahu <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/graphics.scm | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 1a447ed042..e22de793f0 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -637,7 +637,28 @@ with the @command{autotrace} utility or as a C library, 
@code{libautotrace}.")
                      "-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF"
                      "-DCMAKE_CXX_FLAGS=-flax-vector-conversions"))
                   (else
-                   '())))))
+                   '())))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-pkg-config
+            (lambda _
+              (let* ((pkgconfig-dir (string-append #$output "/lib/pkgconfig"))
+                     (pc-file (string-append pkgconfig-dir "/embree4.pc")))
+                (mkdir-p pkgconfig-dir)
+                (call-with-output-file pc-file
+                  (lambda (port)
+                    (format port "\
+prefix=~a
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Embree
+Description: High-performance ray tracing library
+Version: ~a
+Cflags: -I${includedir}
+Libs: -L${libdir} -lembree4
+" #$output #$version)))))))))
     (inputs
      (list glfw onetbb))
     (home-page "https://www.embree.org/";)
@@ -664,7 +685,12 @@ applications.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1kcvz7g6j56anv9zjyd3gidxl46vipw0gg82lns12m45cd43iwxm"))))))
+                "1kcvz7g6j56anv9zjyd3gidxl46vipw0gg82lns12m45cd43iwxm"))))
+    (arguments
+     (substitute-keyword-arguments arguments
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (delete 'install-pkg-config)))))))
 
 (define-public openvdb
   (package

Reply via email to