Subject: [bug#70035] [PATCH v3 3/9] gnu: Add partio.

From: Vinicius Monego <[email-masked]>
Date: Wed, 3 Apr 2024 01:30:23 +0000

* gnu/packages/graphics.scm (partio): New variable.

Change-Id: I680eebd45a3d38853a5907ee444f1ca4d54f2a44
---
 gnu/packages/graphics.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b593f03690..360a1c89f1 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1518,6 +1518,38 @@ (define-public openmw-openscenegraph
            #~(modify-phases #$phases
                (delete 'copy-plugins)))))))))
 
+(define-public partio
+  (package
+    (name "partio")
+    (version "1.17.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/wdas/partio")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1m0hrhzy3wlh5qi4rjkxrlcvgc1q41nqr2rwl6j07arr3z4mnpy1"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'set-LDFLAGS
+                 (lambda _
+                  (setenv "LDFLAGS"
+                          (string-append
+                           "-Wl,-rpath=" #$output "/lib")))))))
+    (native-inputs (list python-wrapper swig))
+    (inputs (list freeglut libglvnd zlib))
+    (home-page "https://partio.us/")
+    (synopsis "Library for particle IO and manipulation")
+    (description
+     "Partio is a C++ library for reading, writing and manipulating a variety
+of standard particle formats (GEO, BGEO, PTC, PDB, PDA).  It has a Python API
+and a collection of simple command-line tools.")
+    (license license:bsd-3)))
+
 (define-public povray
   (package
     (name "povray")
-- 
2.39.2