forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/alure: Fix building with newer media-libs/dumb versions
Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: James Le Cuirot <[email protected]>
- Loading branch information
Showing
3 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit cmake | ||
|
||
DESCRIPTION="The OpenAL Utility Toolkit" | ||
HOMEPAGE="https://kcat.strangesoft.net/alure.html" | ||
SRC_URI="https://kcat.strangesoft.net/alure-releases/${P}.tar.bz2" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" | ||
IUSE="dumb examples flac fluidsynth mp3 sndfile static-libs vorbis" | ||
|
||
RDEPEND=" | ||
>=media-libs/openal-1.1 | ||
dumb? ( media-libs/dumb:= ) | ||
flac? ( media-libs/flac ) | ||
fluidsynth? ( >=media-sound/fluidsynth-1.1.1:= ) | ||
mp3? ( media-sound/mpg123 ) | ||
sndfile? ( media-libs/libsndfile ) | ||
vorbis? ( media-libs/libvorbis )" | ||
DEPEND="${RDEPEND}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-include-unistd.patch | ||
"${FILESDIR}"/${P}-new-dumb.patch | ||
) | ||
|
||
src_prepare() { | ||
cmake_src_prepare | ||
|
||
sed -i -e "/DESTINATION/s:doc/alure:doc/${PF}:" CMakeLists.txt || die | ||
} | ||
|
||
src_configure() { | ||
# FIXME: libmodplug/sndfile.h from libmodplug conflict with sndfile.h from libsndfile | ||
local mycmakeargs=( | ||
-DMODPLUG=OFF | ||
-DDUMB=$(usex dumb) | ||
-DBUILD_EXAMPLES=$(usex examples) | ||
-DFLAC=$(usex flac) | ||
-DFLUIDSYNTH=$(usex fluidsynth) | ||
-DMPG123=$(usex mp3) | ||
-DSNDFILE=$(usex sndfile) | ||
-DBUILD_STATIC=$(usex static-libs) | ||
-DVORBIS=$(usex vorbis) | ||
) | ||
|
||
cmake_src_configure | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Already fixed upstream: | ||
# https://repo.or.cz/alure.git/commitdiff/9939cdfbf9c6c7a2690db7fb8dd2892389adcd5f | ||
|
||
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(); |