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 62BAA13835A for ; Fri, 18 Jun 2021 21:07:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2C7CE0877; Fri, 18 Jun 2021 21:07:42 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 806EFE086E for ; Fri, 18 Jun 2021 21:07:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 99001335D9E for ; Fri, 18 Jun 2021 21:07:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 432677C2 for ; Fri, 18 Jun 2021 21:07:38 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1624050425.e0cf7e09ea6ae0b0ce6e4bf9429e80f1fbbf90e6.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/pmars-sdl/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild X-VCS-Directories: games-simulation/pmars-sdl/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: e0cf7e09ea6ae0b0ce6e4bf9429e80f1fbbf90e6 X-VCS-Branch: master Date: Fri, 18 Jun 2021 21:07:38 +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: 60e23963-9026-4d71-8201-b5d096e11701 X-Archives-Hash: 6c2fc7769b25d26c0972e999c3de48b7 commit: e0cf7e09ea6ae0b0ce6e4bf9429e80f1fbbf90e6 Author: Sam James gentoo org> AuthorDate: Fri Jun 18 21:07:05 2021 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Jun 18 21:07:05 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0cf7e09 games-simulation/pmars-sdl: modernise ebuild * EAPI 7 * Use ${ESYSROOT} * Use append-flags, append-cppflags * General bash tidying * Add missing die * Remove overquoting * Use subshells, not backticks * Respect CPPFLAGS Signed-off-by: Sam James gentoo.org> Signed-off-by: David Seifert gentoo.org> .../pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild | 77 ++++++++++++---------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild index 6e25ce586a2..ae564aa94c0 100644 --- a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild +++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 -inherit readme.gentoo-r1 toolchain-funcs +EAPI=7 + +inherit flag-o-matic toolchain-funcs readme.gentoo-r1 MY_PN="${PN/-sdl/}" MY_PV="${PV/e/-5}" @@ -11,6 +12,7 @@ MY_P="${MY_PN}-${MY_PV}" DESCRIPTION="Portable redcode simulator's sdl port for core war" HOMEPAGE="https://corewar.co.uk/pihlaja/pmars-sdl/" SRC_URI="https://corewar.co.uk/pihlaja/pmars-sdl/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" LICENSE="BSD GPL-2" SLOT="0" @@ -24,9 +26,9 @@ RDEPEND=" " DEPEND="${RDEPEND}" -S="${WORKDIR}/${MY_P}" - -PATCHES=( "${FILESDIR}"/${P}-format.patch ) +PATCHES=( + "${FILESDIR}"/${P}-format.patch +) DOC_CONTENTS=" There are some macros in /usr/share/pmars/macros @@ -35,41 +37,48 @@ DOC_CONTENTS=" " src_compile() { - CFLAGS="${CFLAGS} -DEXT94 -DPERMUTATE" - LFLAGS="-x" + local LIB="" + export LFLAGS="-x" + + append-cppflags -DEXT94 -DPERMUTATE if use sdl ; then - CFLAGS="${CFLAGS} -DSDLGRAPHX `sdl-config --cflags`" - LIB=`sdl-config --libs` + append-cflags $(sdl-config --cflags) + append-cppflags -DSDLGRAPHX + + LIB=$(sdl-config --libs) elif use X ; then - CFLAGS="${CFLAGS} -DXWINGRAPHX" - LIB="-L/usr/X11R6/lib -lX11" + append-cppflags -DXWINGRAPHX + + LIB="-L${ESYSROOT}/usr/X11R6/lib -lX11" else - CFLAGS="${CFLAGS} -DCURSESGRAPHX" + append-cppflags -DCURSESGRAPHX + LIB="-lcurses -ltinfo" fi - cd src - - SRC="asm.c - cdb.c - clparse.c - disasm.c - eval.c - global.c - pmars.c - sim.c - pos.c - str_eng.c - token.c" - - for x in ${SRC}; do - einfo "compiling ${x}" - $(tc-getCC) ${CFLAGS} ${x} -c || die + cd src || die + + local programs=( + asm.c + cdb.c + clparse.c + disasm.c + eval.c + global.c + pmars.c + sim.c + pos.c + str_eng.c + token.c + ) + + for program in "${programs[@]}" ; do + einfo "Compiling ${program}" + $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${program} -c || die done - echo - einfo "linking with LIB: ${LIB}" + einfo "Linking with LIB: ${LIB}" $(tc-getCC) ${LDFLAGS} *.o ${LIB} -o ${MY_PN} || die } @@ -80,10 +89,10 @@ src_install() { dodoc AUTHORS CONTRIB ChangeLog README doc/redcode.ref readme.gentoo_create_doc - insinto "/usr/share/${MY_PN}/warriors" + insinto /usr/share/${MY_PN}/warriors doins warriors/* - insinto "/usr/share/${MY_PN}/macros" + insinto /usr/share/${MY_PN}/macros doins config/*.mac }