From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 78940138334 for ; Sun, 21 Apr 2019 00:49:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7778FE0CA7; Sun, 21 Apr 2019 00:49:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 46275E0CA7 for ; Sun, 21 Apr 2019 00:49:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 279F6341C76 for ; Sun, 21 Apr 2019 00:49:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 59965580 for ; Sun, 21 Apr 2019 00:49:12 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1555807737.5e075d04104eb7b69adbb2a8bff896c88959b4ee.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/mgba/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-emulation/mgba/mgba-9999.ebuild X-VCS-Directories: games-emulation/mgba/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 5e075d04104eb7b69adbb2a8bff896c88959b4ee X-VCS-Branch: master Date: Sun, 21 Apr 2019 00:49:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f952af09-fa26-4152-8ad1-766f4f6b8f85 X-Archives-Hash: 84066c5ac05f5d7ce1e63676534116dd commit: 5e075d04104eb7b69adbb2a8bff896c88959b4ee Author: Lars Wendler gentoo org> AuthorDate: Sun Apr 21 00:48:57 2019 +0000 Commit: Lars Wendler gentoo org> CommitDate: Sun Apr 21 00:48:57 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e075d04 games-emulation/mgba: Added a live ebuild Thanks-to: barul barul.info> Closes: https://bugs.gentoo.org/627876 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Lars Wendler gentoo.org> games-emulation/mgba/mgba-9999.ebuild | 122 ++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/games-emulation/mgba/mgba-9999.ebuild b/games-emulation/mgba/mgba-9999.ebuild new file mode 100644 index 00000000000..013c485228b --- /dev/null +++ b/games-emulation/mgba/mgba-9999.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils desktop xdg + +DESCRIPTION="Game Boy Advance emulator written in C" +HOMEPAGE="https://mgba.io" +if [[ "${PV}" == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mgba-emu/mgba.git" +else + SRC_URI="https://github.com/${PN}-emu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi +LICENSE="MPL-2.0" +SLOT="0" +IUSE="debug elf ffmpeg imagemagick libav opengl qt5 +sdl sqlite" +REQUIRED_USE="|| ( qt5 sdl ) + qt5? ( opengl )" + +RDEPEND=" + media-libs/libpng:0= + sys-libs/zlib[minizip] + elf? ( dev-libs/elfutils ) + ffmpeg? ( + libav? ( media-video/libav:= ) + !libav? ( media-video/ffmpeg:= ) + ) + imagemagick? ( media-gfx/imagemagick:= ) + opengl? ( virtual/opengl ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtwidgets:5 + opengl? ( dev-qt/qtopengl:5 ) + ) + sdl? ( media-libs/libsdl2[X,sound,joystick,video,opengl?] ) + sqlite? ( dev-db/sqlite:3 ) +" +DEPEND="${RDEPEND}" + +src_prepare() { + xdg_environment_reset + cmake-utils_src_prepare + + # Get rid of any bundled stuff we don't want + for pkg in libpng lzma sqlite3 zlib ; do + rm -r src/third-party/${pkg} || die + done +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DBUILD_GL="$(usex opengl)" + -DBUILD_PYTHON=OFF + -DBUILD_QT="$(usex qt5)" + -DBUILD_SDL="$(usex sdl)" + -DBUILD_SHARED=ON + # test suite fails to build (>=0.6.0) + -DBUILD_SUITE=OFF + -DBUILD_TEST=OFF + -DM_CORE_GB=ON + -DM_CORE_GBA=ON + -DUSE_DEBUGGERS="$(usex debug)" + -DUSE_EDITLINE="$(usex debug)" + -DUSE_ELF="$(usex elf)" + -DUSE_EPOXY=OFF + -DUSE_FFMPEG="$(usex ffmpeg)" + -DUSE_GDB_STUB="$(usex debug)" + -DUSE_LIBZIP=OFF + -DUSE_LZMA=OFF + -DUSE_MAGICK="$(usex imagemagick)" + -DUSE_MINIZIP=ON + -DUSE_PNG=ON + -DUSE_SQLITE3="$(usex sqlite)" + -DUSE_ZLIB=ON + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + if use qt5 ; then + dobin ../${P}_build/qt/${PN}-qt + doman doc/${PN}-qt.6 + domenu res/${PN}-qt.desktop + for size in 16 24 32 48 64 96 128 256 ; do + newicon -s ${size} res/${PN}-${size}.png ${PN}.png + done + fi + if use sdl ; then + doman doc/${PN}.6 + newbin ../${P}_build/sdl/${PN} ${PN}-sdl + fi + + dolib.so ../${P}_build/lib${PN}.so* +} + +pkg_preinst() { + if use qt5 ; then + xdg_pkg_preinst + fi +} + +pkg_postinst() { + if use qt5 ; then + xdg_pkg_postinst + fi +} + +pkg_postrm() { + if use qt5 ; then + xdg_pkg_postrm + fi +}