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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18E29158020 for ; Wed, 14 Dec 2022 17:23:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3337E07A5; Wed, 14 Dec 2022 17:23:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DC90DE07A5 for ; Wed, 14 Dec 2022 17:23:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A17E234101F for ; Wed, 14 Dec 2022 17:23:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C3429779 for ; Wed, 14 Dec 2022 17:23:14 +0000 (UTC) From: "Yuan Liao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yuan Liao" Message-ID: <1671038306.1d02a77abccac38ce8b77682cbf05b1aba843e5c.liaoyuan@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: games-emulation/dosbox-x/ X-VCS-Repository: repo/proj/guru X-VCS-Files: games-emulation/dosbox-x/Manifest games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210.ebuild X-VCS-Directories: games-emulation/dosbox-x/ X-VCS-Committer: liaoyuan X-VCS-Committer-Name: Yuan Liao X-VCS-Revision: 1d02a77abccac38ce8b77682cbf05b1aba843e5c X-VCS-Branch: dev Date: Wed, 14 Dec 2022 17:23:14 +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: f5caa170-a41f-47cd-9a44-07f121992962 X-Archives-Hash: 4216d85a2703071d03a996dc2c3dfd1a commit: 1d02a77abccac38ce8b77682cbf05b1aba843e5c Author: Yuan Liao gmail com> AuthorDate: Wed Dec 14 17:03:17 2022 +0000 Commit: Yuan Liao gmail com> CommitDate: Wed Dec 14 17:18:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1d02a77a games-emulation/dosbox-x: Add 2022.09.1_pre20221210 Signed-off-by: Yuan Liao gmail.com> games-emulation/dosbox-x/Manifest | 1 + .../dosbox-x/dosbox-x-2022.09.1_pre20221210.ebuild | 205 +++++++++++++++++++++ 2 files changed, 206 insertions(+) diff --git a/games-emulation/dosbox-x/Manifest b/games-emulation/dosbox-x/Manifest index 150dfe080..753e294ae 100644 --- a/games-emulation/dosbox-x/Manifest +++ b/games-emulation/dosbox-x/Manifest @@ -1 +1,2 @@ +DIST dosbox-x-2022.09.1_pre20221210.tar.gz 67879960 BLAKE2B f6a6dc0bea3a56577088ee632b17b74489ede8b9cbcd51328c709a6f9bf301a301dff853acab5cb3786aff4c94a2f180e98bfe828cc2d1255a7f7edad29b9f41 SHA512 b5d996611e28e86f7ad45d09bbdcbaf161faec572f3192f034e5acead8014ba2f7f3c3a12e6fc9a5e49742cc08b3f3c4272568491322e7d400a511ce65dbd042 DIST dosbox-x-windows-v2022.08.0.tar.gz 67809452 BLAKE2B d0d8c6b6b328b363ea939de93e920ce33b260f4f986be50028c4a2e188c292be38c256bed7b0d6e052bf2b74600ece662f05b16943e90fbd44e48e2c6b4bc3cc SHA512 d11b907ff99e8599b454dc5979055dd85a64215913cb905c66d534930ce31afaab14d04169450eef5cb286c65933159f44be6cecad6adf6c7adad1a249758d7b diff --git a/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210.ebuild b/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210.ebuild new file mode 100644 index 000000000..49f4ea171 --- /dev/null +++ b/games-emulation/dosbox-x/dosbox-x-2022.09.1_pre20221210.ebuild @@ -0,0 +1,205 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools readme.gentoo-r1 toolchain-funcs xdg + +if [[ "${PV}" == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/joncampbell123/dosbox-x.git" +else + # https://github.com/joncampbell123/dosbox-x/discussions/3862 + GIT_COMMIT="982c44176e7619ae2a40b5c5d8df31f2911384da" + DOC_CONTENTS=" + DOSBox-X upstream has stopped making releases. Therefore, this + package has installed a copy of DOSBox-X built from an upstream + repository snapshot at the following Git commit:\n + \n + ${GIT_COMMIT} + " + + SRC_URI="https://github.com/joncampbell123/dosbox-x/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${GIT_COMMIT}" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Complete, accurate DOS emulator forked from DOSBox" +HOMEPAGE="https://dosbox-x.com/" + +# Stay consistent with games-emulation/dosbox::gentoo even though source file +# headers specify the GPL version to be "either version 2 of the License, or +# (at your option) any later version." The same header is used in both the +# DOSBox source tree and the DOSBox-X source tree. +LICENSE="GPL-2" +SLOT="0" + +IUSE="X debug ffmpeg fluidsynth freetype opengl png slirp" +# Unit tests are only available in debug builds +RESTRICT="!debug? ( test )" + +BDEPEND=" + dev-lang/nasm + sys-libs/libcap +" + +# Unconditionally pulling in automagically-enabled optional dependencies: +# - media-libs/alsa-lib +# - media-libs/sdl2-net +# - net-libs/libpcap +# +# With media-libs/libsdl2[-X,wayland], this package does work on a Wayland +# desktop, but (at least on GNOME) the program does not launch in a movable +# and resizable window; whereas with media-libs/libsdl2[X], it does. Thus, +# unconditionally require media-libs/libsdl2[X] for better user experience. +RDEPEND=" + media-libs/alsa-lib + media-libs/libsdl2[X,opengl?,sound,threads,video] + media-libs/sdl2-net + net-libs/libpcap + sys-libs/zlib + X? ( + x11-libs/libX11 + x11-libs/libXrandr + x11-libs/libxkbfile + ) + debug? ( sys-libs/ncurses:= ) + ffmpeg? ( media-video/ffmpeg:= ) + fluidsynth? ( media-sound/fluidsynth:= ) + freetype? ( media-libs/freetype ) + opengl? ( media-libs/libglvnd[X] ) + png? ( media-libs/libpng:= ) + slirp? ( net-libs/libslirp ) +" + +DEPEND=" + ${RDEPEND} +" + +pkg_pretend() { + if use ffmpeg && use !png; then + ewarn "Setting the 'ffmpeg' USE flag when the 'png' USE flag is" + ewarn "unset does not have any effect. Unsetting the 'png' USE" + ewarn "flag disables the video capture feature, so additional" + ewarn "video capture formats enabled by the 'ffmpeg' USE flag" + ewarn "will end up being unused." + fi +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + local myconf=( + # Always use SDL 2, even though the package provides the option to + # build with SDL 1.x, because this package is expected to be built + # with the bundled, heavily-modified version of SDL 1.x if that + # branch is used. Compiler errors are likely to occur if the + # bundled version of SDL 1.x is not used. Bundled dependencies + # should be avoided on Gentoo, so SDL 2 is more preferable. + --enable-sdl2 + + # Explicitly enable ALSA MIDI support, same as default. As of + # v2022.08.0, even when it is disabled, media-libs/alsa-lib will + # still be automagically linked if it is present in the build + # environment (presumably for other components of this package), + # so the dependency cannot be made optional by disabling this + # option. Plus, disabling this option has no observable effect + # on build time, build size, or the program's functionality, as + # 'mididevice=alsa' still works with '--disable-alsa-midi'. + --enable-alsa-midi + + $(use_enable debug '' heavy) + + $(use_enable X x11) + $(use_enable ffmpeg avcodec) + $(use_enable fluidsynth libfluidsynth) + $(use_enable freetype) + $(use_enable opengl) + $(use_enable png screenshots) + $(use_enable slirp libslirp) + ) + + econf "${myconf[@]}" +} + +src_compile() { + # https://bugs.gentoo.org/856352 + emake AR="$(tc-getAR)" +} + +src_test() { + set -- src/dosbox-x -tests + echo "${@}" >&2 + "${@}" || die "Unit tests failed" +} + +src_install() { + default + [[ -n "${DOC_CONTENTS}" ]] && readme.gentoo_create_doc +} + +pkg_preinst() { + xdg_pkg_preinst + + # Returns whether or not the USE flag specified with the first positional + # argument is newly enabled for this installation of the package. + newuse() { + local flag="${1}" + + # The 'has_version' call tests if any USE flags are newly enabled. + # It is to extract information about any existing copy of this + # package installed on the system, which is why it should be made + # before the new copy of this package just built is merged. + use "${flag}" && ! has_version "${CATEGORY}/${PN}[${flag}]" + } + + newuse debug && PRINT_NOTES_FOR_DEBUGGER=1 + newuse fluidsynth && PRINT_NOTES_FOR_FLUIDSYNTH=1 +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! has "${PVR}" ${REPLACING_VERSIONS} && [[ -n "${DOC_CONTENTS}" ]]; then + FORCE_PRINT_ELOG=1 + readme.gentoo_print_elog + fi + + if [[ "${PRINT_NOTES_FOR_DEBUGGER}" ]]; then + elog + elog "Note on the Debugger" + elog + elog "The debugger can only be started when DOSBox-X is launched" + elog "from a terminal. Otherwise, the \"Start DOSBox-X Debugger\"" + elog "option in the \"Debug\" drop-down menu would be unavailable." + elog + elog "For more information about the debugger, please consult:" + elog " ${EPREFIX}/usr/share/doc/${PF}/README.debugger*" + fi + + if [[ "${PRINT_NOTES_FOR_FLUIDSYNTH}" ]]; then + elog + elog "Note on FluidSynth" + elog + elog "To use FluidSynth as the MIDI device for DOSBox-X, a soundfont" + elog "is required. If no existing soundfont is available, a new one" + elog "can be installed and configured for DOSBox-X very easily:" + elog + elog "1. Install the following package:" + elog " media-sound/fluid-soundfont" + elog "2. Add the following lines to DOSBox-X's configuration file:" + elog " [midi]" + elog " mididevice=fluidsynth" + elog + elog "Usually, there is no need to explicitly specify the soundfont" + elog "file's path because the package mentioned in step 1 installs" + elog "soundfont files to a standard location, allowing them to be" + elog "detected and selected automatically." + elog + elog "For advanced FluidSynth configuration, please consult:" + elog " https://dosbox-x.com/wiki/Guide%3ASetting-up-MIDI-in-DOSBox%E2%80%90X#_fluidsynth" + fi +}