Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640680 - games-arcade/apricots-0.2.6-r1: ebuild patches GAMES_PATH incorrectly
Summary: games-arcade/apricots-0.2.6-r1: ebuild patches GAMES_PATH incorrectly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Low normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-11 13:46 UTC by Johannes Geiss
Modified: 2018-04-15 08:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_640680.txt,7.18 KB, text/plain)
2017-12-11 13:46 UTC, Johannes Geiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Geiss 2017-12-11 13:46:07 UTC
Created attachment 509354 [details]
emerge --info

apricots-0.2.6-r1.ebuild

contains the line

sed -i -e 's:-DAP_PATH=\\\\\\"$prefix.*":-DAP_PATH=\\\\\\"${GAMES_DATADIR}/${PN}/\\\\\\"":' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in || die

which patches the CXXFLAGS in configure.in to

CXXFLAGS="$CXXFLAGS -DAP_PATH=\\\"${GAMES_DATADIR}/${PN}/\\\""

GAMES_DATADIR and PN are unset at compile time, so the game looks for its files at "/apricots" instead of "/usr/share/games/apricots".

But using the line

sed -i -e 's:-DAP_PATH=\\\\\\"$prefix.*":-DAP_PATH=\\\\\\"'${GAMES_DATADIR}/${PN}'/\\\\\\"":' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in || die

(note the ' enclosing ${GAMES_DATADIR}/${PN})

patches CXXFLAGS to

CXXFLAGS="$CXXFLAGS -DAP_PATH=\\\"/usr/share/games/apricots/\\\""

and the game find its files.
Comment 1 Pacho Ramos gentoo-dev 2018-04-15 08:59:59 UTC
[master 306b3ed8f51b] games-arcade/apricots: Stop using games.eclass
 3 files changed, 71 insertions(+), 8 deletions(-)
 create mode 100644 games-arcade/apricots/apricots-0.2.6-r2.ebuild