unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#46673] [PATCH] gnu: Add cli11.
@ 2021-02-21  1:17 Milkey Mouse
  2021-02-21  9:20 ` bug#46673: " Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Milkey Mouse @ 2021-02-21  1:17 UTC (permalink / raw)
  To: 46673

* gnu/packages/cpp.scm (cli11): New variable.
---
 gnu/packages/cpp.scm | 49 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 331afc2e3e..1eb0f1a73a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -40,6 +40,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
+  #:use-module (guix modules)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
@@ -903,3 +904,51 @@ provides a number of utilities to make coding with expected cleaner.")
     (description "Magic Enum offers static reflection of enums, with
 conversions to and from strings, iteration and related functionality.")
     (license license:expat)))
+
+(define-public cli11
+  (package
+    (name "cli11")
+    (version "1.9.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/CLIUtils/CLI11")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin (delete-file-recursively "extern")
+                 #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       '("-DCLI11_SINGLE_FILE=OFF"
+         "-DCLI11_BUILD_EXAMPLES=OFF")
+       #:imported-modules ,(append %cmake-build-system-modules
+                                   (source-module-closure '((guix utils))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'no-vendor-gtest
+           (lambda _
+             (use-modules (guix utils))
+             (substitute* "tests/CMakeLists.txt"
+               ;; We provide our own googletest, so this is not really a problem.
+               (("message\\(FATAL_ERROR \"You have requested tests be built, but googletest is not downloaded." msg)
+                 (string-replace-substring msg "FATAL_ERROR" "TRACE")))
+             (substitute* "cmake/AddGoogletest.cmake"
+               (("^add_subdirectory\\(.*googletest.*$") "find_package(GTest REQUIRED)")
+               (("^set_target_properties\\(gtest gtest_main gmock gmock_main") "")
+               (("^    PROPERTIES FOLDER \"Extern\"\\)") ""))
+             #t)))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("googletest" ,googletest)))
+    (synopsis "Command line parser for C++11")
+    (description
+     "CLI11 is a command line parser for C++11 and beyond that provides a rich
+feature set with a simple and intuitive interface.")
+    (home-page "https://cliutils.github.io/CLI11/book/")
+    (license license:bsd-3)))
-- 
2.30.1






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#46673: [PATCH] gnu: Add cli11.
  2021-02-21  1:17 [bug#46673] [PATCH] gnu: Add cli11 Milkey Mouse
@ 2021-02-21  9:20 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2021-02-21  9:20 UTC (permalink / raw)
  To: Milkey Mouse; +Cc: 46673-done

Hello,

Milkey Mouse <milkeymouse@meme.institute> writes:

> * gnu/packages/cpp.scm (cli11): New variable.

I added a copyright line for you (let me know if you want to change the
attribution), and pushed.

Thank you!

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-21  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21  1:17 [bug#46673] [PATCH] gnu: Add cli11 Milkey Mouse
2021-02-21  9:20 ` bug#46673: " Nicolas Goaziou

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git