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 14B8D1382C5 for ; Sun, 4 Apr 2021 06:33:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9D430E0866; Sun, 4 Apr 2021 06:33:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 7897EE0866 for ; Sun, 4 Apr 2021 06:33:07 +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 9BBD6340BBD for ; Sun, 4 Apr 2021 06:33:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 09CE564A for ; Sun, 4 Apr 2021 06:33:03 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1617517958.63606a58b1912ffca8da7815212aaffd0685a575.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-board/xscrabble/, games-board/xscrabble/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-board/xscrabble/files/xscrabble-2.10-build.patch games-board/xscrabble/files/xscrabble-2.10-implicit-declaration.patch games-board/xscrabble/files/xscrabble-2.10-path-fixes.patch games-board/xscrabble/xscrabble-2.10-r2.ebuild games-board/xscrabble/xscrabble-2.10-r3.ebuild X-VCS-Directories: games-board/xscrabble/ games-board/xscrabble/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 63606a58b1912ffca8da7815212aaffd0685a575 X-VCS-Branch: master Date: Sun, 4 Apr 2021 06:33:03 +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: 9915eff4-3818-48ee-baf2-4644673ec02e X-Archives-Hash: b11cd27b717f26e9da48493f637aac60 commit: 63606a58b1912ffca8da7815212aaffd0685a575 Author: Sam James gentoo org> AuthorDate: Sun Apr 4 02:12:36 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sun Apr 4 06:32:38 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63606a58 games-board/xscrabble: port to EAPI 7, games.eclass-- Signed-off-by: Sam James gentoo.org> .../xscrabble/files/xscrabble-2.10-build.patch | 4 +- .../xscrabble-2.10-implicit-declaration.patch | 12 +++++ .../files/xscrabble-2.10-path-fixes.patch | 8 +-- ...ble-2.10-r2.ebuild => xscrabble-2.10-r3.ebuild} | 63 +++++++++++++++++----- 4 files changed, 67 insertions(+), 20 deletions(-) diff --git a/games-board/xscrabble/files/xscrabble-2.10-build.patch b/games-board/xscrabble/files/xscrabble-2.10-build.patch index 7d5214c7db3..c290475e482 100644 --- a/games-board/xscrabble/files/xscrabble-2.10-build.patch +++ b/games-board/xscrabble/files/xscrabble-2.10-build.patch @@ -1,7 +1,7 @@ respect compiler, ldflags and cflags ---- build -+++ build +--- a/build ++++ b/build @@ -36,7 +36,7 @@ #define RULES_FILE \"$LIBDIR/en/scrabble_rules\" " > src/config.h diff --git a/games-board/xscrabble/files/xscrabble-2.10-implicit-declaration.patch b/games-board/xscrabble/files/xscrabble-2.10-implicit-declaration.patch new file mode 100644 index 00000000000..88c9cd680e9 --- /dev/null +++ b/games-board/xscrabble/files/xscrabble-2.10-implicit-declaration.patch @@ -0,0 +1,12 @@ +diff --git a/src/xutils.c b/src/xutils.c +index 25478df..26e3277 100644 +--- a/src/xutils.c ++++ b/src/xutils.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include "xutils.h" + diff --git a/games-board/xscrabble/files/xscrabble-2.10-path-fixes.patch b/games-board/xscrabble/files/xscrabble-2.10-path-fixes.patch index 27a18689b1e..5a0fe1a7e7d 100644 --- a/games-board/xscrabble/files/xscrabble-2.10-path-fixes.patch +++ b/games-board/xscrabble/files/xscrabble-2.10-path-fixes.patch @@ -1,5 +1,5 @@ ---- build -+++ build +--- a/build ++++ b/build @@ -1,9 +1,10 @@ #!/bin/sh @@ -9,8 +9,8 @@ -LIBDIR=/usr/games/lib/scrabble +APPDEFAULTS=$DESTDIR/usr/$LIBDIR/X11/app-defaults +REAL_APPDEFAULTS=/usr/$LIBDIR/X11/app-defaults -+BINDIR=$DESTDIR/usr/games/bin -+LIBDIR=$DESTDIR/usr/share/games/xscrabble ++BINDIR=$DESTDIR/usr/bin ++LIBDIR=$DESTDIR/usr/share/xscrabble # Version (don't modify without knowing!!) MAJOR=2 diff --git a/games-board/xscrabble/xscrabble-2.10-r2.ebuild b/games-board/xscrabble/xscrabble-2.10-r3.ebuild similarity index 54% rename from games-board/xscrabble/xscrabble-2.10-r2.ebuild rename to games-board/xscrabble/xscrabble-2.10-r3.ebuild index 2ea0730cfc7..26dd3487df3 100644 --- a/games-board/xscrabble/xscrabble-2.10-r2.ebuild +++ b/games-board/xscrabble/xscrabble-2.10-r3.ebuild @@ -1,8 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils multilib games +EAPI=7 + +inherit toolchain-funcs DESCRIPTION="An X11 clone of the well-known Scrabble" HOMEPAGE="http://freshmeat.net/projects/xscrabble/?topic_id=80" @@ -15,42 +16,76 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="l10n_fr" -RDEPEND="x11-libs/libXaw" -DEPEND="${RDEPEND} +DEPEND="x11-libs/libXaw" +RDEPEND=" + ${DEPEND} + acct-group/gamestat +" +BDEPEND=" x11-misc/gccmakedep - x11-misc/imake" + x11-misc/imake +" + +PATCHES=( + "${FILESDIR}"/${P}-path-fixes.patch + "${FILESDIR}"/${P}-build.patch + "${FILESDIR}"/${P}-implicit-declaration.patch +) src_unpack() { unpack ${P}.tgz - cp "${DISTDIR}"/xscrabble_en.tgz . - use l10n_fr && cp "${DISTDIR}"/xscrabble_fr.tgz . + cp "${DISTDIR}"/xscrabble_en.tgz . || die + + if use l10n_fr ; then + cp "${DISTDIR}"/xscrabble_fr.tgz . || die + fi } src_prepare() { - epatch "${FILESDIR}"/${P}-path-fixes.patch \ - "${FILESDIR}"/${P}-build.patch + default sed -i '/install/s/-s //' build || die "sed failed" } +src_configure() { + tc-export CC +} + src_compile() { ./build bin || die "build failed" } src_install() { - local f export DESTDIR="${D}" LIBDIR="$(get_libdir)" + ./build install || die "install failed" + if use l10n_fr ; then ./build lang fr || die "fr failed" fi + ./build lang en || die "en failed" - for f in "${D}"/usr/"${LIBDIR}"/X11/app-defaults/* ; do + + local f + for f in "${ED}/usr/${LIBDIR}"/X11/app-defaults/* ; do [[ -L ${f} ]] && continue sed -i \ - -e "s:/usr/games/lib/scrabble/:${GAMES_DATADIR}/${PN}/:" \ + -e "s:/usr/games/lib/scrabble/:/usr/share/${PN}/:" \ -e "s:fr/eng:fr/en:" \ ${f} || die "sed ${f} failed" done + dodoc CHANGES README - prepgamesdirs + + local paths=( /usr/share/${PN}/en/scrabble_scores ) + if use l10n_fr ; then + paths+=( /usr/share/${PN}/fr/scrabble_scores ) + fi + + local path + for path in ${paths[@]} ; do + fowners root:gamestat ${path} + fperms 660 ${path} + done + + fperms g+s /usr/bin/${PN} }