diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-02-27 18:41:09 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-03-07 20:19:55 +0100 |
commit | 284749530391de7e49945d61801ee0ab623d59e7 (patch) | |
tree | 40c1b351e4194357707e73576d1379f878e0b071 /games-action | |
parent | sci-biology/express: EAPI-7/cmake.eclass, new HOMEPAGE/SRC_URI (diff) | |
download | gentoo-284749530391de7e49945d61801ee0ab623d59e7.tar.gz gentoo-284749530391de7e49945d61801ee0ab623d59e7.tar.bz2 gentoo-284749530391de7e49945d61801ee0ab623d59e7.zip |
games-action/supermariowar: EAPI-7 bump, switch to cmake.eclass
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r-- | games-action/supermariowar/files/supermariowar-2.0_beta1-cmake-add_library-static.patch | 18 | ||||
-rw-r--r-- | games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild | 88 |
2 files changed, 60 insertions, 46 deletions
diff --git a/games-action/supermariowar/files/supermariowar-2.0_beta1-cmake-add_library-static.patch b/games-action/supermariowar/files/supermariowar-2.0_beta1-cmake-add_library-static.patch new file mode 100644 index 000000000000..2ecc26977598 --- /dev/null +++ b/games-action/supermariowar/files/supermariowar-2.0_beta1-cmake-add_library-static.patch @@ -0,0 +1,18 @@ +Fix linking with BUILD_SHARED_LIBS=ON default in EAPI-7 + +--- a/src/common_netplay/CMakeLists.txt ++++ b/src/common_netplay/CMakeLists.txt +@@ -1,4 +1,4 @@ + + if(NOT NO_NETWORK) +- add_library(NetplayFiles platform_enet/NetPeerENet.cpp) ++ add_library(NetplayFiles STATIC platform_enet/NetPeerENet.cpp) + endif() +--- a/src/common/CMakeLists.txt ++++ b/src/common/CMakeLists.txt +@@ -39,4 +39,4 @@ + list(APPEND COMMON_SRCS src/savepng.cpp) + endif() + +-add_library(CommonFiles ${COMMON_SRCS}) ++add_library(CommonFiles STATIC ${COMMON_SRCS}) diff --git a/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild index 3a70f45083a9..193bd23cf4a5 100644 --- a/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild +++ b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit eutils cmake-utils versionator +inherit cmake -MY_PV=$(replace_version_separator 2 '-') +MY_PV=$(ver_rs 2 '-') MY_PV="${MY_PV/beta1/beta.1}" MY_PN="smw" @@ -19,91 +19,87 @@ KEYWORDS="amd64 x86" IUSE="server" RDEPEND=" - sys-libs/zlib:= dev-cpp/yaml-cpp - net-libs/enet:1.3= media-libs/sdl-mixer[vorbis] - media-libs/sdl-image[png,jpeg]" - -DEPEND=" - ${RDEPEND} + media-libs/sdl-image[png,jpeg] + net-libs/enet:1.3= + sys-libs/zlib:= +" +DEPEND="${RDEPEND}" +BDEPEND=" app-arch/unzip - virtual/pkgconfig" + virtual/pkgconfig +" S="${WORKDIR}/${PN}-${MY_PV}" +PATCHES=( "${FILESDIR}"/${P}-cmake-add_library-static.patch ) + src_unpack() { - unpack ${A} - cd "${S}" || die + default + pushd "${S}" || die unpack ./data.zip -} - -src_prepare() { - cmake-utils_src_prepare - - einfo "Copying Findyaml-cpp.cmake" - cp "${FILESDIR}/${P}-yaml-cpp-config.cmake" cmake/Findyaml-cpp.cmake || die - eend $? + cp "${FILESDIR}"/${P}-yaml-cpp-config.cmake cmake/Findyaml-cpp.cmake || die + popd || die } src_configure() { local mycmakeargs=( -DBUILD_STATIC_LIBS=OFF - -DSMW_BINDIR="${EPREFIX}/usr/bin" - -DSMW_DATADIR="${EPREFIX}/usr/share/${PF}" + -DSMW_BINDIR="${EPREFIX}"/usr/bin + -DSMW_DATADIR="${EPREFIX}"/usr/share/${PF} ) - cmake-utils_src_configure + cmake_src_configure } src_install() { - cmake-utils_src_install + cmake_src_install local bin - for bin in "${ED}/usr/bin"/*; do - chmod 0755 "${bin}" || die + for bin in "${ED}"/usr/bin/*; do + chmod 0755 ${bin} || die done local smw_datadir="usr/share/${PF}" local smw_bindir="${smw_datadir}/bin" - mkdir -p "${ED}/${smw_bindir}" || die + mkdir -p "${ED}"/${smw_bindir} || die - einfo "Moving ${PN} binary files to /${smw_bindir}" - mv "${ED}/usr/bin"/* "${ED}/${smw_bindir}" || die + ebegin "Moving ${PN} binary files to /${smw_bindir}" + mv "${ED}"/usr/bin/* "${ED}"/${smw_bindir} || die eend $? local base_bin - for bin in "${ED}/${smw_bindir}"/*; do - base_bin=$(basename "${bin}") - einfo "Creating ${base_bin} launcher in /usr/bin" - cat << EOF > "${base_bin}" || die + for bin in "${ED}"/${smw_bindir}/*; do + base_bin=$(basename ${bin}) + ebegin "Creating ${base_bin} launcher in /usr/bin" + cat << EOF > ${base_bin} || die #!/usr/bin/env bash -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # ${PF} launcher: ${base_bin} exec /${smw_bindir}/${base_bin} /${smw_datadir} EOF - dobin "${base_bin}" + dobin ${base_bin} eend $? done if use server; then - local smw_server="${BUILD_DIR}/Binaries/Release/${MY_PN}-server" + local smw_server="${BUILD_DIR}"/Binaries/Release/${MY_PN}-server local smw_serverdir="/${smw_datadir}/server" - einfo "Installing ${MY_PN}-server files" + ebegin "Installing ${MY_PN}-server files" dosbin "${smw_server}" - dodir "${smw_serverdir}" - insinto "${smw_serverdir}" - doins "${S}/src/server/serverconfig" + dodir ${smw_serverdir} + insinto ${smw_serverdir} + doins "${S}"/src/server/serverconfig - dosym "${smw_serverdir}/serverconfig" "/etc/${MY_PN}d.conf" + dosym ${smw_serverdir}/serverconfig /etc/${MY_PN}d.conf - newinitd "${FILESDIR}/smwd.initd" "${MY_PN}d" - sed -i -e \ - "s#@SMW_SERVERDIR@#${smw_serverdir}#g;" \ - "${ED}/etc/init.d/${MY_PN}d" || die + newinitd "${FILESDIR}"/smwd.initd ${MY_PN}d + sed -e "s#@SMW_SERVERDIR@#${smw_serverdir}#g;" \ + -i "${ED}"/etc/init.d/${MY_PN}d || die eend $? fi } |