1 |
commit: 086fdbcfb68b6cedc5dfc2c4fd35245b57c2df02 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 1 05:26:39 2012 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 1 05:27:53 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=086fdbcf |
7 |
|
8 |
crossdev: move custom env from bashrc to package.env |
9 |
|
10 |
Since we only want to tweak the variables in the env and not execute |
11 |
arbitrary scripts, use package.env rather than bashrc to override. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
--- |
16 |
crossdev | 9 ++++++--- |
17 |
1 files changed, 6 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/crossdev b/crossdev |
20 |
index f0306fc..8979ca3 100755 |
21 |
--- a/crossdev |
22 |
+++ b/crossdev |
23 |
@@ -311,7 +311,7 @@ uninstall() { |
24 |
[[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]] \ |
25 |
&& rm -r ${CROSSDEV_OVERLAY}/cross-${CTARGET} |
26 |
local f |
27 |
- for f in categories package.{mask,keywords,use} profile/package.use.{force,mask} ; do |
28 |
+ for f in categories package.{env,mask,keywords,use} profile/package.use.{force,mask} ; do |
29 |
rm -f "${f}"/cross-${CTARGET} |
30 |
rmdir "${f}" 2>/dev/null |
31 |
done |
32 |
@@ -794,7 +794,7 @@ set_env() { |
33 |
local pkg=$1 env=$2 output |
34 |
shift ; shift |
35 |
|
36 |
- output="env/cross-${CTARGET}/${pkg}" |
37 |
+ output="env/cross-${CTARGET}/${pkg}.conf" |
38 |
cat <<-EOF > "${output}" |
39 |
SYMLINK_LIB=no |
40 |
$(printf '%b' "${env}") |
41 |
@@ -805,6 +805,9 @@ set_env() { |
42 |
for v in ${!CFLAGS_*} ${!CHOST_*} ${!CTARGET_*} ${!LDFLAGS_*} ${!LIBDIR_*} ABI MULTILIB_ABIS DEFAULT_ABI ; do |
43 |
echo "${v}='${!v}'" >> "${output}" |
44 |
done |
45 |
+ |
46 |
+ output=$(_set_portage_file ${pkg} package.env) |
47 |
+ echo "cross-${CTARGET}/${pkg} cross-${CTARGET}/${pkg}.conf" >> ${output} |
48 |
} |
49 |
set_portage() { |
50 |
local cat=$1 pkg=$2 ver=$3 env=$4 ovl=$5 |
51 |
@@ -894,7 +897,7 @@ grep -qs "^cross-${CTARGET}$" "${CONFIGROOT}"/categories \ |
52 |
|| echo cross-${CTARGET} >> "${CONFIGROOT}"/categories |
53 |
mkdir -p "${CROSSDEV_OVERLAY}"/cross-${CTARGET} || exit 1 |
54 |
cd "${CONFIGROOT}" |
55 |
-for f in package.{keywords,mask,use} env/cross-${CTARGET} profile/package.use.{force,mask} ; do |
56 |
+for f in package.{env,keywords,mask,use} env/cross-${CTARGET} profile/package.use.{force,mask} ; do |
57 |
[[ -f ${f} ]] && die "please convert ${CONFIGROOT}/${f} to a directory" |
58 |
mkdir -p ${f} || die "wtf!?" |
59 |
rm -f ${f}/cross-${CTARGET} |