summaryrefslogtreecommitdiff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorSergio Pastor Pérez <sergio.pastorperez@outlook.es>2025-03-19 18:00:01 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2025-03-26 21:47:28 +0100
commit51f0c29f9e1783075c07ff1190e09c688c24da1d (patch)
tree3bded0d4eaaa7d4daa64eb8bb5333c235714362d /gnu/packages/cpp.scm
parentd1fc0b5840ddd987f8a0941d3888842051070a1c (diff)
gnu: Add miniaudio.
* gnu/packages/cpp.scm (miniaudio): New variable. Change-Id: I27b74793dd7b80af4437e0a1b997cc87fe8822e5 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 30de21a214d..a0f65e19a37 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1958,6 +1958,66 @@ Google's C++ code base.")
1958 #~(cons* "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" 1958 #~(cons* "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
1959 (delete "-DBUILD_SHARED_LIBS=ON" #$flags))))))))) 1959 (delete "-DBUILD_SHARED_LIBS=ON" #$flags)))))))))
1960 1960
1961(define-public miniaudio
1962 (package
1963 (name "miniaudio")
1964 (version "0.11.22")
1965 (source
1966 (origin
1967 (method git-fetch)
1968 (uri (git-reference
1969 (url "https://github.com/mackron/miniaudio")
1970 (commit version)))
1971 (file-name (git-file-name name version))
1972 (sha256
1973 (base32 "1pjaiq71x24n9983vkhjxrsbraa24053h727db22b1rb2xyfrzm3"))))
1974 (build-system gnu-build-system)
1975 (arguments
1976 (list
1977 #:phases
1978 #~(modify-phases %standard-phases
1979 (delete 'build)
1980 (delete 'configure)
1981 (replace 'check
1982 (lambda* (#:key tests? #:allow-other-keys)
1983 (when tests?
1984 (with-directory-excursion "tests/_build"
1985 (let ((tests '("conversion" "filtering" "generation")))
1986 (mkdir "bin")
1987 ;; Compile tests
1988 (for-each (lambda (test)
1989 (invoke "gcc"
1990 (string-append "../" test "/" test
1991 ".c")
1992 "-o"
1993 (string-append "bin/" test)
1994 "-ldl"
1995 "-lm"
1996 "-lpthread"
1997 "-Wall"
1998 "-Wextra"
1999 "-Wpedantic")
2000 (let ((bin (string-append "./bin/" test)))
2001 (if (string= test "filtering")
2002 ;; NOTE: the 'filtering' test
2003 ;; requires an input file.
2004 (invoke bin bin)
2005 (invoke bin))))
2006 tests))))))
2007 (replace 'install
2008 (lambda _
2009 (install-file "miniaudio.h"
2010 (string-append #$output "/include"))
2011 (copy-recursively "extras"
2012 (string-append #$output
2013 "/include/extras/")))))))
2014 (home-page "https://miniaud.io")
2015 (synopsis "Audio playback and capture library for C and C++")
2016 (description
2017 "Miniaudio is an audio playback and capture library for C and C++. It is
2018made up of a single source file and has no external dependencies.")
2019 (license license:expat)))
2020
1961(define-public abseil-cpp-cxxstd17 2021(define-public abseil-cpp-cxxstd17
1962 (abseil-cpp-for-c++-standard abseil-cpp 17)) ;XXX: the default with GCC 11? 2022 (abseil-cpp-for-c++-standard abseil-cpp 17)) ;XXX: the default with GCC 11?
1963 2023