Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/faudio/
Date: Tue, 01 Oct 2019 01:17:30
Message-Id: 1569892627.4463b7911974031618fab4157504436a2b64cc15.sarnex@gentoo
1 commit: 4463b7911974031618fab4157504436a2b64cc15
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 1 01:17:07 2019 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 1 01:17:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4463b791
7
8 app-emulation/faudio: Sync with ::wine
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.17
11 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
12
13 app-emulation/faudio/Manifest | 1 +
14 app-emulation/faudio/faudio-19.09.ebuild | 95 ++++++++++++++++++++++++++++++++
15 2 files changed, 96 insertions(+)
16
17 diff --git a/app-emulation/faudio/Manifest b/app-emulation/faudio/Manifest
18 index 7fc3823eb2b..443bc87e55e 100644
19 --- a/app-emulation/faudio/Manifest
20 +++ b/app-emulation/faudio/Manifest
21 @@ -1 +1,2 @@
22 DIST FAudio-19.06.tar.gz 899089 BLAKE2B a59ad9613bcfa71e1fc8be1f2d389f56b8f96430c354b7c7148d1e1e084102b6d8559cd258f3ab6969a4ac93e55ea2397b18dc417857e9ee0f022ea0dae65c0e SHA512 ba3ee18b47d8d85dc39e777c420522349f9873cf1528dd6c266f7254fe27cdb5bb6ab5bcbeab870938b509bfd006590d2380908b7d1e3fd679d2a434ce82eca6
23 +DIST FAudio-19.09.tar.gz 901659 BLAKE2B 8bb99c67b6da2660e71c7a8a70f83130738a07e7f4ddd2001fb857c81a593935506a8c1fe6d24bfd064537ea4a5a603973c32d839228d7b3f45c9c300ba15147 SHA512 127f975c68e2b449fa7cadae0723925f35ca7a2841ea3fd85037febe964331de4b2e3031ab09c292ee5f40d90902dcf78c75cc3fe7fbe4d6f37a822b4d9eb966
24
25 diff --git a/app-emulation/faudio/faudio-19.09.ebuild b/app-emulation/faudio/faudio-19.09.ebuild
26 new file mode 100644
27 index 00000000000..a8490f1cf23
28 --- /dev/null
29 +++ b/app-emulation/faudio/faudio-19.09.ebuild
30 @@ -0,0 +1,95 @@
31 +# Copyright 1999-2019 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +# shellcheck disable=SC2034
35 +EAPI=7
36 +
37 +CMAKE_MAKEFILE_GENERATOR="emake"
38 +
39 +inherit cmake-multilib virtualx
40 +
41 +FAUDIO_PN="FAudio"
42 +FAUDIO_PV="${PV}"
43 +FAUDIO_P="${FAUDIO_PN}-${FAUDIO_PV}"
44 +
45 +if [[ "${PV}" == "9999" ]]; then
46 + inherit git-r3
47 + EGIT_REPO_URI="https://github.com/FNA-XNA/${FAUDIO_PN}.git"
48 +else
49 + SRC_URI="https://github.com/FNA-XNA/${FAUDIO_PN}/archive/${FAUDIO_PV}.tar.gz -> ${FAUDIO_P}.tar.gz"
50 + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
51 + S="${WORKDIR}/${FAUDIO_P}"
52 +fi
53 +
54 +DESCRIPTION="FAudio - Accuracy-focused XAudio reimplementation for open platforms"
55 +HOMEPAGE="https://fna-xna.github.io/"
56 +LICENSE="ZLIB"
57 +SLOT="0"
58 +
59 +IUSE="+abi_x86_32 +abi_x86_64 debug ffmpeg xnasong test utils"
60 +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )"
61 +
62 +COMMON_DEPEND="
63 + >=media-libs/libsdl2-2.0.9[sound,${MULTILIB_USEDEP}]
64 + ffmpeg? ( media-video/ffmpeg:=[${MULTILIB_USEDEP}] )
65 +"
66 +RDEPEND="${COMMON_DEPEND}
67 +"
68 +DEPEND="${COMMON_DEPEND}
69 +"
70 +
71 +multilib_src_configure() {
72 + local mycmakeargs=(
73 + "-DCMAKE_INSTALL_BINDIR=bin"
74 + "-DCMAKE_INSTALL_INCLUDEDIR=include/${FAUDIO_PN}"
75 + "-DCMAKE_INSTALL_LIBDIR=$(get_libdir)"
76 + "-DCMAKE_INSTALL_PREFIX=${EPREFIX%/}/usr"
77 + "-DCMAKE_BUILD_TYPE=$(usex debug Debug Release)"
78 + "-DFORCE_ENABLE_DEBUGCONFIGURATION=$(usex debug ON OFF)"
79 + "-DBUILD_TESTS=$(usex test ON OFF)"
80 + "-DBUILD_UTILS=$(usex utils ON OFF)"
81 + "-DFFMPEG=$(usex ffmpeg ON OFF)"
82 + "-DXNASONG=$(usex xnasong ON OFF)"
83 + )
84 + if use ffmpeg; then
85 + mycmakeargs+=( "-DFFmpeg_LIBRARY_DIRS=${EPREFIX%/}/usr/$(get_libdir)" )
86 + fi
87 + cmake-utils_src_configure
88 +}
89 +
90 +src_configure() {
91 + cmake-multilib_src_configure
92 +}
93 +
94 +multilib_src_compile() {
95 + cmake-utils_src_make
96 + emake -C "${BUILD_DIR}" all
97 +}
98 +
99 +multilib_src_install() {
100 + # FIXME: do we want to install the FAudio tools?
101 + cmake-utils_src_install
102 +
103 + sed -e "s@%LIB%@$(get_libdir)@g" -e "s@%PREFIX%@${EPREFIX}/usr@g" \
104 + "${FILESDIR}/faudio.pc" > "${T}/faudio.pc" \
105 + || die "sed failed"
106 + insinto "/usr/$(get_libdir)/pkgconfig"
107 + doins "${T}/faudio.pc"
108 +
109 + if use test; then
110 + mkdir -p "${T}/$(get_libdir)"
111 + cp "${BUILD_DIR}/faudio_tests" "${T}/$(get_libdir)/" || die "cp failed"
112 + fi
113 +}
114 +
115 +faudio_test() {
116 + XDG_RUNTIME_DIR="/run/user/0" virtx "${T}/$(get_libdir)/faudio_tests"
117 +}
118 +
119 +pkg_postinst() {
120 + use test || return
121 +
122 + # FIXME: FAudio tests are broken and also don't appear to work
123 + # in the Portage sandbox.
124 + multilib_foreach_abi faudio_test
125 +}