Skip to content

Commit

Permalink
app-emulation/faudio: Switch to cmake.eclass
Browse files Browse the repository at this point in the history
Drop superfluous COMMON_DEPEND
Drop superfluous CMAKE_INSTALL_PREFIX, set by cmake.eclass

Use of CMAKE_INSTALL_<dir> variables looks like a workaround of wrong upstream
usage of GNUInstallDirs but should be fixed upstream.

Closes: https://bugs.gentoo.org/770532
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed Mar 6, 2021
1 parent 10aa215 commit c9a875a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
15 changes: 6 additions & 9 deletions app-emulation/faudio/faudio-21.01.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# shellcheck disable=SC2034
EAPI=7

CMAKE_ECLASS=cmake
CMAKE_MAKEFILE_GENERATOR="emake"
MULTILIB_COMPAT=( abi_x86_{32,64} )

Expand Down Expand Up @@ -31,24 +32,20 @@ IUSE="+abi_x86_32 +abi_x86_64 debug dumpvoices gstreamer xnasong test utils"
RESTRICT="!test? ( test )"
REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )"

COMMON_DEPEND="
DEPEND="
>=media-libs/libsdl2-2.0.9[sound,${MULTILIB_USEDEP}]
gstreamer? (
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
)
"
RDEPEND="${COMMON_DEPEND}
"
DEPEND="${COMMON_DEPEND}
"
RDEPEND="${DEPEND}"

multilib_src_configure() {
local mycmakeargs=(
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_INCLUDEDIR=include/${FAUDIO_PN}"
"-DCMAKE_INSTALL_LIBDIR=$(get_libdir)"
"-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
"-DCMAKE_BUILD_TYPE=$(usex debug Debug Release)"
"-DFORCE_ENABLE_DEBUGCONFIGURATION=$(usex debug ON OFF)"
"-DBUILD_TESTS=$(usex test ON OFF)"
Expand All @@ -57,21 +54,21 @@ multilib_src_configure() {
"-DGSTREAMER=$(usex gstreamer ON OFF)"
"-DXNASONG=$(usex xnasong ON OFF)"
)
cmake-utils_src_configure
cmake_src_configure
}

src_configure() {
cmake-multilib_src_configure
}

multilib_src_compile() {
cmake-utils_src_make
cmake_build
emake -C "${BUILD_DIR}" all
}

multilib_src_install() {
# FIXME: do we want to install the FAudio tools?
cmake-utils_src_install
cmake_src_install

sed -e "s@%LIB%@$(get_libdir)@g" -e "s@%PREFIX%@${EPREFIX}/usr@g" \
"${FILESDIR}/faudio.pc" > "${T}/faudio.pc" \
Expand Down
15 changes: 6 additions & 9 deletions app-emulation/faudio/faudio-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# shellcheck disable=SC2034
EAPI=7

CMAKE_ECLASS=cmake
CMAKE_MAKEFILE_GENERATOR="emake"
MULTILIB_COMPAT=( abi_x86_{32,64} )

Expand Down Expand Up @@ -31,24 +32,20 @@ IUSE="+abi_x86_32 +abi_x86_64 debug dumpvoices gstreamer xnasong test utils"
RESTRICT="!test? ( test )"
REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )"

COMMON_DEPEND="
DEPEND="
>=media-libs/libsdl2-2.0.9[sound,${MULTILIB_USEDEP}]
gstreamer? (
media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
)
"
RDEPEND="${COMMON_DEPEND}
"
DEPEND="${COMMON_DEPEND}
"
RDEPEND="${DEPEND}"

multilib_src_configure() {
local mycmakeargs=(
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_INCLUDEDIR=include/${FAUDIO_PN}"
"-DCMAKE_INSTALL_LIBDIR=$(get_libdir)"
"-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
"-DCMAKE_BUILD_TYPE=$(usex debug Debug Release)"
"-DFORCE_ENABLE_DEBUGCONFIGURATION=$(usex debug ON OFF)"
"-DBUILD_TESTS=$(usex test ON OFF)"
Expand All @@ -57,21 +54,21 @@ multilib_src_configure() {
"-DGSTREAMER=$(usex gstreamer ON OFF)"
"-DXNASONG=$(usex xnasong ON OFF)"
)
cmake-utils_src_configure
cmake_src_configure
}

src_configure() {
cmake-multilib_src_configure
}

multilib_src_compile() {
cmake-utils_src_make
cmake_build
emake -C "${BUILD_DIR}" all
}

multilib_src_install() {
# FIXME: do we want to install the FAudio tools?
cmake-utils_src_install
cmake_src_install

sed -e "s@%LIB%@$(get_libdir)@g" -e "s@%PREFIX%@${EPREFIX}/usr@g" \
"${FILESDIR}/faudio.pc" > "${T}/faudio.pc" \
Expand Down

0 comments on commit c9a875a

Please sign in to comment.