diff --git a/dev-libs/sdl-kitchensink/Manifest b/dev-libs/sdl-kitchensink/Manifest new file mode 100644 index 0000000..ea8699e --- /dev/null +++ b/dev-libs/sdl-kitchensink/Manifest @@ -0,0 +1 @@ +DIST sdl-kitchensink-1.0.7.tar.gz 69854 BLAKE2B 33cd38bf9e5dbb3eaf3750af1680dd6d5daf4f8b951cfdfaf3ca2719651cc3498db08ee729a80cf8562b1062923f005979ab1970c11534174b468a453e93d552 SHA512 0f8970ff88ed78bcaf0bdc08ce7f7871d538d7d442e3047cf834866c7deb77c3fadbb97c9e67d3b032d8314f62676f4ad913fb4cee45901381914f50a11d6b51 diff --git a/dev-libs/sdl-kitchensink/metadata.xml b/dev-libs/sdl-kitchensink/metadata.xml new file mode 100644 index 0000000..c7112d2 --- /dev/null +++ b/dev-libs/sdl-kitchensink/metadata.xml @@ -0,0 +1,15 @@ + + + + + + Use sanitizer functions (ASAN/TSAN/etc...) + + + Build static libraries + + + Build examples. If static is also set, examples will be linked against static library + + + diff --git a/dev-libs/sdl-kitchensink/sdl-kitchensink-1.0.7.ebuild b/dev-libs/sdl-kitchensink/sdl-kitchensink-1.0.7.ebuild new file mode 100644 index 0000000..44ff136 --- /dev/null +++ b/dev-libs/sdl-kitchensink/sdl-kitchensink-1.0.7.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +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" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc64 ~x86" + +IUSE="static sanitize examples" + +BDEPEND+=" + !static? ( sys-apps/findutils ) + examples? ( sys-apps/coreutils ) +" + +RDEPEND+=" + sanitize? ( sys-devel/gcc[sanitize] ) + media-libs/libsdl2 + media-video/ffmpeg[libass] +" + +#S="${S}/${PN}" +S="${WORKDIR}/SDL_kitchensink-${PV}" + +src_prepare() { + cmake-utils_src_prepare +} + +src_configure() { + SANITIZE="OFF" + EXAMPLES="OFF" + if use sanitize; then SANITIZE="ON"; fi + if use examples; then EXAMPLES="ON"; fi + local mycmakeargs=( + -DUSE_ASAN="${SANITIZE}" + -DBUILD_EXAMPLES="${EXAMPLES}" + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + if ! use static; then + elog "Removing static library libSDL_kitchensink_static.a" + find "${D}" -name libSDL_kitchensink_static.a -delete + fi + if use examples; then + for i in audio complex custom rwops simple; do + elog "Installing example: ${i}" + mv "${BUILD_DIR}"/${i} "${BUILD_DIR}"/SDL_kitchensink-${i} + dobin "${BUILD_DIR}"/SDL_kitchensink-${i} + done + if use static; then + elog "Examples are linked against static SDL_kitchensink library." + fi + fi +}