guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/06: gnu: Add withershins.


From: Ricardo Wurmus
Subject: 01/06: gnu: Add withershins.
Date: Fri, 12 Jun 2015 21:02:00 +0000

rekado pushed a commit to branch master
in repository guix.

commit 76e146384c3465beb5cdbfad05c31bd79808a668
Author: Ricardo Wurmus <address@hidden>
Date:   Mon May 25 22:13:27 2015 +0200

    gnu: Add withershins.
    
    * gnu/packages/code.scm (withershins): New variable.
---
 gnu/packages/code.scm |   64 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 9d2bde8..97261d6 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2015 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2015 Andreas Enge <address@hidden>
+;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,9 +23,12 @@
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
@@ -225,3 +229,63 @@ COCOMO model or user-provided parameters.")
 files, but compared to grep is much faster and respects files like .gitignore,
 .hgignore, etc.")
     (license license:asl2.0)))
+
+(define-public withershins
+  (package
+    (name "withershins")
+    (version "0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/cameronwhite/withershins/archive/v";
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "08z3lyvswx7sad10637vfpwglbcbgzzcpfihw0x8lzr74f3b70bh"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:out-of-source? #f
+       #:modules ((guix build utils)
+                  (guix build cmake-build-system)
+                  (ice-9 popen)
+                  (ice-9 rdelim))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'find-libiberty
+          (lambda _
+            (let ((plugin (let* ((port (open-input-pipe
+                                        "gcc -print-file-name=plugin"))
+                                 (str  (read-line port)))
+                            (close-pipe port)
+                            str)))
+              (substitute* "cmake/FindIberty.cmake"
+                (("/usr/include") (string-append plugin "/include"))
+                (("libiberty.a iberty") (string-append "NAMES libiberty.a 
iberty\nPATHS \""
+                                                       (assoc-ref 
%build-inputs "gcc")
+                                                       "/lib" "\"")))
+              #t)))
+         (replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (mkdir-p (string-append out "/lib"))
+              (mkdir (string-append out "/include"))
+              (copy-file "src/withershins.hpp"
+                         (string-append out "/include/withershins.hpp"))
+              (copy-file "src/libwithershins.a"
+                         (string-append out "/lib/libwithershins.a")))
+            #t)))))
+    (home-page "https://github.com/cameronwhite/withershins";)
+    (inputs
+     `(("gcc" ,gcc-4.8 "lib") ;for libiberty.a
+       ("binutils" ,binutils) ;for libbfd
+       ("zlib" ,zlib)))
+    (synopsis "C++11 library for generating stack traces")
+    (description
+     "Withershins is a simple cross-platform C++11 library for generating
+stack traces.")
+    ;; Sources are released under Expat license, but since BFD is licensed
+    ;; under the GPLv3+ the combined work is GPLv3+ as well.
+    (license license:gpl3+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]