summaryrefslogtreecommitdiff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-04-04 21:16:33 +0200
committerAndreas Enge <andreas@enge.fr>2025-04-16 11:46:26 +0200
commit8cd6103d8d44fe1901f014b3023187d90d593b86 (patch)
tree08a7ee591e81a379d53875d3a11fdf196c1834b1 /gnu/packages/cpp.scm
parentbc4c4b0a88384a7ac959fdaca09a665762e3d19b (diff)
gnu: Add clipper2.
* gnu/packages/cpp.scm (clipper2): New variable. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index ccfa5b684d..4ead74ab42 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2025 Sergio Pastor Pérez <sergio.pastorperez@gmail.com>
;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se>
+;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2621,6 +2622,40 @@ union, difference & exclusive-or, and line & polygon offsetting.
The library is based on Vatti's clipping algorithm.")
(license license:boost1.0)))
+(define-public clipper2
+ (package
+ (inherit clipper)
+ (name "clipper2")
+ (version "1.5.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AngusJohnson/Clipper2")
+ (commit (string-append "Clipper2_" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1w8cmx712k45cb8gh9dakmbmybiwdx8c0b45mwpcldywx2lwxi2j"))
+ (modules '((guix build utils)))
+ (snippet #~(for-each
+ delete-file-recursively
+ '("CSharp" "DLL" "Delphi")))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DUSE_EXTERNAL_GTEST=ON"
+ "-DCLIPPER2_EXAMPLES=OFF")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "CPP"))))))
+ (native-inputs (list googletest))
+ (home-page "https://github.com/AngusJohnson/Clipper2")
+ (description
+ (string-append (package-description clipper) "\
+Note: This package is a major update of the original clipper library."))))
+
(define-public pcg-cpp
(let ((commit "ffd522e7188bef30a00c74dc7eb9de5faff90092")
(revision "2"))