You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
2.0 KiB
98 lines
2.0 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=7
|
||
|
|
||
|
inherit toolchain-funcs
|
||
13 years ago
|
|
||
|
DESCRIPTION="An X11 clone of the well-known Scrabble"
|
||
|
HOMEPAGE="http://freshmeat.net/projects/xscrabble/?topic_id=80"
|
||
|
SRC_URI="ftp://ftp.ac-grenoble.fr/ge/educational_games/${P}.tgz
|
||
8 years ago
|
l10n_fr? ( ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_fr.tgz )
|
||
13 years ago
|
ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_en.tgz"
|
||
|
|
||
8 years ago
|
LICENSE="GPL-2+"
|
||
13 years ago
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
8 years ago
|
IUSE="l10n_fr"
|
||
13 years ago
|
|
||
3 years ago
|
DEPEND="x11-libs/libXaw"
|
||
|
RDEPEND="
|
||
|
${DEPEND}
|
||
|
acct-group/gamestat
|
||
3 years ago
|
!<x11-terms/kterm-6.2.0-r7
|
||
3 years ago
|
"
|
||
|
BDEPEND="
|
||
13 years ago
|
x11-misc/gccmakedep
|
||
3 years ago
|
>=x11-misc/imake-1.0.8-r1
|
||
3 years ago
|
"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-path-fixes.patch
|
||
|
"${FILESDIR}"/${P}-build.patch
|
||
|
"${FILESDIR}"/${P}-implicit-declaration.patch
|
||
|
)
|
||
13 years ago
|
|
||
|
src_unpack() {
|
||
|
unpack ${P}.tgz
|
||
3 years ago
|
cp "${DISTDIR}"/xscrabble_en.tgz . || die
|
||
|
|
||
|
if use l10n_fr ; then
|
||
|
cp "${DISTDIR}"/xscrabble_fr.tgz . || die
|
||
|
fi
|
||
13 years ago
|
}
|
||
|
|
||
|
src_prepare() {
|
||
3 years ago
|
default
|
||
3 years ago
|
|
||
|
# Don't strip binaries
|
||
|
sed -i '/install/s/-s //' build || die
|
||
|
# Respect AR, RANLIB
|
||
3 years ago
|
sed -i 's/CC="${CC}"/& AR="${AR} cq" RANLIB="${RANLIB}"/' build || die
|
||
13 years ago
|
}
|
||
|
|
||
3 years ago
|
src_configure() {
|
||
3 years ago
|
tc-export AR CC LD RANLIB
|
||
|
export IMAKECPP=${IMAKECPP:-$(tc-getCPP)}
|
||
3 years ago
|
}
|
||
|
|
||
13 years ago
|
src_compile() {
|
||
|
./build bin || die "build failed"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
3 years ago
|
export DESTDIR="${ED}" LIBDIR="$(get_libdir)"
|
||
3 years ago
|
|
||
13 years ago
|
./build install || die "install failed"
|
||
3 years ago
|
|
||
8 years ago
|
if use l10n_fr ; then
|
||
13 years ago
|
./build lang fr || die "fr failed"
|
||
|
fi
|
||
3 years ago
|
|
||
13 years ago
|
./build lang en || die "en failed"
|
||
3 years ago
|
|
||
|
local f
|
||
3 years ago
|
for f in "${ED}/usr/$(get_libdir)"/X11/app-defaults/* ; do
|
||
13 years ago
|
[[ -L ${f} ]] && continue
|
||
|
sed -i \
|
||
3 years ago
|
-e "s:/usr/games/lib/scrabble/:/usr/share/${PN}/:" \
|
||
13 years ago
|
-e "s:fr/eng:fr/en:" \
|
||
|
${f} || die "sed ${f} failed"
|
||
|
done
|
||
3 years ago
|
|
||
13 years ago
|
dodoc CHANGES README
|
||
3 years ago
|
|
||
|
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}
|
||
13 years ago
|
}
|