Gentoo Archives: gentoo-devhelp

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-devhelp@l.g.o
Subject: [gentoo-devhelp] Re: Trouble with package.env files
Date: Sun, 27 May 2012 20:34:16
Message-Id: jpu33b$v9$1@dough.gmane.org
In Reply to: [gentoo-devhelp] Trouble with package.env files by Nikos Chantziaras
1 As always, I found the answer 5 minutes after hitting the "send" button :-P
2
3 It turns out the Gentoo docs are wrong. You can't do this with
4 package.env. The solution is something not mentioned in the docs.
5 Putting this:
6
7 post_src_prepare()
8 {
9 rm -rf "${S}"/usr/lib32/jack || die
10 rm -f $(find "${S}" -name 'libjack*') || die
11 }
12
13 in "/etc/portage/env/app-emulation/emul-linux-x86-soundlibs" works.
14
15
16 On 27/05/12 23:21, Nikos Chantziaras wrote:
17 > I have this in /etc/portage/package.env:
18 >
19 > app-emulation/emul-linux-x86-soundlibs soundlibs-delete-jack.conf
20 >
21 > and this in /etc/portage/env/soundlibs-delete-jack.conf:
22 >
23 > if [ "${EBUILD_PHASE}" == "src_prepare"] ;
24 > then
25 > rm -rf "${S}"/usr/lib32/jack
26 > rm -f $(find "${S}" -name 'libjack*')
27 > fi
28 >
29 > As per documentation:
30 >
31 > http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6#doc_chap3
32 >
33 >
34 > However, it doesn't work. What do I do?
35 >
36 > !!! Problem in 'app-emulation/emul-linux-x86-soundlibs' dependencies.
37 > !!! "/etc/portage/env/soundlibs-delete-jack.conf", line 1: Invalid token
38 > '[' (not '=') portage.exception
39 > ... done!
40 > "/etc/portage/env/soundlibs-delete-jack.conf", line 1: Invalid token '['
41 > (not '=')
42 >
43 >
44 > PS:
45 > What I'd really want is to define my own custom post_src_prepare()
46 > function. Possible?