gnu: Add alure.

* gnu/packages/audio.scm (alure): New variable.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Hendursaga 2023-09-08 12:29:08 -04:00 committed by Ludovic Courtès
parent 429a543d22
commit 1fa438fd1c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 63 additions and 0 deletions

View file

@ -902,6 +902,7 @@ dist_patch_DATA = \
%D%/packages/patches/akonadi-not-relocatable.patch \
%D%/packages/patches/akonadi-timestamps.patch \
%D%/packages/patches/allegro-mesa-18.2.5-and-later.patch \
%D%/packages/patches/alure-dumb-2.patch \
%D%/packages/patches/ibus-anthy-fix-tests.patch \
%D%/packages/patches/ibus-table-paths.patch \
%D%/packages/patches/anki-mpv-args.patch \

View file

@ -3330,6 +3330,38 @@ (define-public freealut
(home-page "https://kcat.strangesoft.net/openal.html")
(license license:lgpl2.0)))
(define-public alure
(package
(name "alure")
(version "1.2")
(source (origin
(method url-fetch)
(uri (string-append "https://kcat.tomasu.net/alure-releases/"
"alure-" version ".tar.bz2"))
(sha256
(base32
"0w8gsyqki21s1qb2s5ac1kj08i6nc937c0rr08xbw9w9wvd6lpj6"))
(patches (search-patches "alure-dumb-2.patch"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no tests
#:configure-flags '("-DMODPLUG=ON")))
(native-inputs (list pkg-config))
(inputs (list dumb
flac
mpg123
libmodplug
libsndfile
libvorbis
openal))
(home-page "https://kcat.tomasu.net/alure.html")
(synopsis "OpenAL utility library")
(description
"ALURE is a utility library to help manage common tasks with OpenAL applications.
This includes device enumeration and initialization, file loading, and
streaming.")
(license license:expat)))
(define-public patchage
(package
(name "patchage")

View file

@ -0,0 +1,30 @@
Source: https://gitlab.archlinux.org/archlinux/packaging/packages/alure/-/blob/main/dumb-2.patch
diff -Naur a/src/codec_dumb.cpp b/src/codec_dumb.cpp
--- a/src/codec_dumb.cpp 2011-07-29 09:37:48.000000000 +0100
+++ b/src/codec_dumb.cpp 2020-05-10 15:59:48.502632496 +0100
@@ -272,7 +272,11 @@
private:
// DUMBFILE iostream callbacks
+#if DUMB_VERSION >= 2*10000
+ static int skip(void *user_data, dumb_off_t offset)
+#else
static int skip(void *user_data, long offset)
+#endif
{
std::istream *stream = static_cast<dumbStream*>(user_data)->fstream;
stream->clear();
@@ -282,7 +286,11 @@
return -1;
}
+#if DUMB_VERSION >= 2*10000
+ static dumb_ssize_t read(char *ptr, size_t size, void *user_data)
+#else
static long read(char *ptr, long size, void *user_data)
+#endif
{
std::istream *stream = static_cast<dumbStream*>(user_data)->fstream;
stream->clear();