mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
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 <chewi@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@@ -16,7 +16,7 @@ IUSE="dumb examples flac fluidsynth mp3 sndfile static-libs vorbis"
|
||||
|
||||
RDEPEND="
|
||||
>=media-libs/openal-1.1
|
||||
dumb? ( media-libs/dumb )
|
||||
dumb? ( =media-libs/dumb-0.9*:= )
|
||||
flac? ( media-libs/flac )
|
||||
fluidsynth? ( >=media-sound/fluidsynth-1.1.1:= )
|
||||
mp3? ( media-sound/mpg123 )
|
||||
|
||||
53
media-libs/alure/alure-1.2-r2.ebuild
Normal file
53
media-libs/alure/alure-1.2-r2.ebuild
Normal file
@@ -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
|
||||
}
|
||||
30
media-libs/alure/files/alure-1.2-new-dumb.patch
Normal file
30
media-libs/alure/files/alure-1.2-new-dumb.patch
Normal file
@@ -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();
|
||||
Reference in New Issue
Block a user