# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit eutils MY_PN="${PN%-bin}" MY_P="${MY_PN}-${PV}" S="${WORKDIR}/${MY_PN}" DESCRIPTION="A small, fast and powerful modular synthesizer/tracker." HOMEPAGE="http://www.warmplace.ru/soft/sunvox/" SRC_URI="http://www.warmplace.ru/soft/sunvox/${MY_P}.zip" LICENSE="SunVox" SLOT="0" KEYWORDS="-* ~amd64 ~x86" # there are arm and arm64 builds too, but I can't test those IUSE="examples abi_x86_32 abi_x86_64 cpu_flags_x86_ssse3" archesdepend="abi_x86_32(-)?,abi_x86_64(-)?" DEPEND="" RDEPEND="dev-libs/libbsd[${archesdepend}] media-libs/alsa-lib[${archesdepend}] =media-libs/libsdl2-2.0*[X,video,${archesdepend}] sys-devel/gcc sys-libs/glibc x11-libs/libX11[${archesdepend}] x11-libs/libXau[${archesdepend}] x11-libs/libxcb[${archesdepend}] x11-libs/libXcursor[${archesdepend}] x11-libs/libXdmcp[${archesdepend}] x11-libs/libXext[${archesdepend}] x11-libs/libXfixes[${archesdepend}] x11-libs/libXi[${archesdepend}] x11-libs/libXrandr[${archesdepend}] x11-libs/libXrender[${archesdepend}] x11-libs/libXxf86vm[${archesdepend}]" BDEPEND="" src_install() { local dir="/opt/sunvox" local arches=( ) exeinto "${dir}/bin" insinto "${dir}" if use abi_x86_32; then newexe sunvox/linux_x86/sunvox sunvox32 arches+=('32') fi if use abi_x86_64; then if use cpu_flags_x86_ssse3; then newexe sunvox/linux_x86_64/sunvox sunvox64 arches+=('64') else newexe sunvox/linux_x86_64/sunvox_for_old_cpu sunvox64-no-ssse3 arches+=('64-no-ssse3') fi fi if [[ "${#arches[@]}" == "1" ]]; then make_wrapper "${MY_PN}" "${dir}/bin/sunvox${arches[0]}" else local arch for arch in "${arches[@]}"; do make_wrapper "${MY_PN}${arch}" "${dir}/bin/sunvox${arch}" done fi if use examples; then doins -r effects doins -r examples doins -r instruments fi dodoc -r docs/. }