summary refs log tree commit diff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorNikolay Korotkiy <sikmir@gmail.com>2021-12-15 14:19:01 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-12-15 16:10:15 +0100
commit94becb63591bd928d323067b1b81f2c1f293d77e (patch)
treef7f32cd556e15f08cc14b1002797ef64d42bc227 /gnu/packages/cpp.scm
parentddea65d8f540bf3cba660e75ed0ce4f98e6e13a2 (diff)
downloadguix-94becb63591bd928d323067b1b81f2c1f293d77e.tar.gz
gnu: Add clipper.
* gnu/packages/cpp.scm (clipper): New variable.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 1b6779a036..718fb20652 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Nikolay Korotkiy <sikmir@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1115,6 +1116,35 @@ computation.")
     (home-page "https://www.actor-framework.org/")
     (license license:bsd-3)))
 
+(define-public clipper
+  (package
+    (name "clipper")
+    (version "6.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/polyclipping"
+                           "/clipper_ver" version ".zip"))
+       (sha256
+        (base32 "09q6jc5k7p9y5d75qr2na5d1gm0wly5cjnffh127r04l47c20hx1"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no check target
+       #:phases (modify-phases %standard-phases
+                  (replace 'unpack
+                    (lambda* (#:key source #:allow-other-keys)
+                      (and (invoke "unzip" source)
+                           (chdir "cpp")))))))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "https://sourceforge.net/projects/polyclipping")
+    (synopsis "A polygon and line clipping and offsetting library")
+    (description
+     "The Clipper library performs line & polygon clipping - intersection,
+union, difference & exclusive-or, and line & polygon offsetting.
+The library is based on Vatti's clipping algorithm.")
+    (license license:boost1.0)))
+
 (define-public pcg-cpp
   (let ((commit "ffd522e7188bef30a00c74dc7eb9de5faff90092")
         (revision "2"))