2024-02-12 16:30:40 +01:00
|
|
|
# Copyright 1999-2024 Gentoo Authors
|
2023-11-23 19:11:23 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit cmake
|
|
|
|
|
|
|
|
DESCRIPTION="A Simple SDL2 / FFmpeg library for audio/video playback written in C99"
|
|
|
|
HOMEPAGE="https://github.com/katajakasa/SDL_kitchensink"
|
|
|
|
SRC_URI="https://github.com/katajakasa/SDL_kitchensink/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
S="${WORKDIR}/SDL_kitchensink-${PV}"
|
|
|
|
|
|
|
|
LICENSE="MIT"
|
|
|
|
SLOT="0"
|
2024-02-12 16:30:40 +01:00
|
|
|
KEYWORDS="~amd64"
|
|
|
|
|
2023-11-23 19:11:23 +01:00
|
|
|
IUSE="doc examples"
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
RESTRICT="test"
|
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
>=media-libs/libsdl2-2.0.5
|
|
|
|
>=media-video/ffmpeg-3.2:=
|
|
|
|
media-libs/libass:=
|
|
|
|
"
|
|
|
|
BDEPEND="
|
2024-01-18 13:33:19 +01:00
|
|
|
doc? ( app-text/doxygen )
|
2023-11-23 19:11:23 +01:00
|
|
|
"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
cmake_src_prepare
|
|
|
|
|
|
|
|
# Install examples
|
|
|
|
sed -i \
|
|
|
|
-e 's/set_property(TARGET ${TARGET} PROPERTY \(.*\))/\
|
|
|
|
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME "SDL_kitchensink-${TARGET}" \1)/' \
|
|
|
|
-e '/add_executable(${TARGET}/ a\\tinstall(TARGETS ${TARGET})' \
|
|
|
|
CMakeLists.txt || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local mycmakeargs=(
|
|
|
|
-DBUILD_EXAMPLES="$(usex examples)"
|
|
|
|
-DBUILD_SHARED=ON
|
|
|
|
-DBUILD_STATIC=OFF
|
|
|
|
-DUSE_ASAN=OFF
|
|
|
|
-DUSE_DYNAMIC_LIBASS=OFF
|
|
|
|
-DUSE_TIDY=OFF
|
|
|
|
)
|
|
|
|
cmake_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile () {
|
|
|
|
cmake_src_compile
|
|
|
|
|
|
|
|
use doc && cmake_build docs
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
cmake_src_install
|
|
|
|
|
|
|
|
if use doc; then
|
|
|
|
dodoc -r "${S}"/docs/html
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
if use examples; then
|
|
|
|
for i in audio complex custom rwops simple; do
|
|
|
|
einfo "Installed ${i} example as SDL_kitchensink-${i}"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|