# Copyright 2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 DESCRIPTION="Thomson TO8D microcomputer emulator" HOMEPAGE="https://github.com/sam-itt/teo-ng" SRC_URI="https://github.com/sam-itt/teo-ng/releases/download/v1.9.0/${P}.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~x86" IUSE="gtk allegro" DEPEND="media-libs/alsa-lib media-libs/libpng:0 gtk? ( x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext ) allegro? ( media-libs/allegro:0 )" RDEPEND="${DEPEND}" BDEPEND="" pkg_setup() { if use gtk && use allegro; then einfo ewarn "You have enabled both the \"allegro\" and the \"gtk\" USE flags. It" ewarn "is not possible to build teo with support for both." ewarn "Gtk will be used in this case. If you want allegro support, unset the" ewarn "\"gtk\" USE flag and leave only \"allegro\" set." ewarn "" fi } src_configure() { local myconf if use allegro && ! use gtk; then myconf="${myconf} --with-gfx-backend=allegro" else myconf="${myconf} --with-gfx-backend=gtk-x11" fi econf \ ${myconf} }