1 |
commit: 20f8576c593f9dc674012fcad444f61952c39498 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 3 18:29:52 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 3 18:53:45 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20f8576c |
7 |
|
8 |
sys-apps/baselayout: sync live |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
12 |
|
13 |
sys-apps/baselayout/baselayout-9999.ebuild | 30 +++++++++++++++++++++++++++--- |
14 |
1 file changed, 27 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild |
17 |
index 0428b0afbb9..74c90b6df27 100644 |
18 |
--- a/sys-apps/baselayout/baselayout-9999.ebuild |
19 |
+++ b/sys-apps/baselayout/baselayout-9999.ebuild |
20 |
@@ -1,4 +1,4 @@ |
21 |
-# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
EAPI=6 |
26 |
@@ -25,11 +25,36 @@ pkg_setup() { |
27 |
|
28 |
# Create our multilib dirs - the Makefile has no knowledge of this |
29 |
multilib_layout() { |
30 |
- local def_libdir libdir libdirs |
31 |
+ local dir def_libdir libdir libdirs |
32 |
+ local prefix prefix_lst |
33 |
def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) |
34 |
libdirs=$(get_all_libdirs) |
35 |
: ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... |
36 |
|
37 |
+ if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then |
38 |
+ prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
39 |
+ for prefix in ${prefix_lst[@]}; do |
40 |
+ for libdir in ${libdirs}; do |
41 |
+ dir="${prefix}${libdir}" |
42 |
+ if [[ -e "${dir}" ]]; then |
43 |
+ [[ ! -d "${dir}" ]] && |
44 |
+ die "${dir} exists but is not a directory" |
45 |
+ continue |
46 |
+ fi |
47 |
+ if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then |
48 |
+ einfo "symlinking ${dir} to usr/${libdir}" |
49 |
+ ln -s usr/${libdir} ${dir} || |
50 |
+ die " Unable to make ${dir} symlink" |
51 |
+ else |
52 |
+ einfo "creating directory ${dir}" |
53 |
+ mkdir -p "${dir}" || |
54 |
+ die "Unable to create ${dir} directory" |
55 |
+ fi |
56 |
+ done |
57 |
+ done |
58 |
+ return 0 |
59 |
+ fi |
60 |
+ |
61 |
[ -z "${def_libdir}" ] && |
62 |
die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
63 |
|
64 |
@@ -62,7 +87,6 @@ multilib_layout() { |
65 |
|
66 |
# setup symlinks and dirs where we expect them to be; do not migrate |
67 |
# data ... just fall over in that case. |
68 |
- local prefix prefix_lst |
69 |
if use split-usr ; then |
70 |
prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
71 |
else |