1 |
commit: 9cdaeebfbb00619040601debdf5b4e84283d8280 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 20 21:23:19 2018 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 20 21:24:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cdaeebf |
7 |
|
8 |
sys-apps/baselayout: add back the build use flag |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
sys-apps/baselayout/baselayout-9999.ebuild | 48 ++++++++++++++++-------------- |
13 |
1 file changed, 26 insertions(+), 22 deletions(-) |
14 |
|
15 |
diff --git a/sys-apps/baselayout/baselayout-9999.ebuild b/sys-apps/baselayout/baselayout-9999.ebuild |
16 |
index 6bd0c0d4f70..cef8791471a 100644 |
17 |
--- a/sys-apps/baselayout/baselayout-9999.ebuild |
18 |
+++ b/sys-apps/baselayout/baselayout-9999.ebuild |
19 |
@@ -7,7 +7,6 @@ inherit multilib versionator prefix |
20 |
|
21 |
DESCRIPTION="Filesystem baselayout and init scripts" |
22 |
HOMEPAGE="https://www.gentoo.org/" |
23 |
- |
24 |
if [[ ${PV} = 9999 ]]; then |
25 |
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" |
26 |
inherit git-r3 |
27 |
@@ -18,7 +17,11 @@ fi |
28 |
|
29 |
LICENSE="GPL-2" |
30 |
SLOT="0" |
31 |
-IUSE="usrmerge kernel_linux" |
32 |
+IUSE="build kernel_FreeBSD kernel_linux usrmerge" |
33 |
+ |
34 |
+pkg_setup() { |
35 |
+ multilib_layout |
36 |
+} |
37 |
|
38 |
# Create our multilib dirs - the Makefile has no knowledge of this |
39 |
multilib_layout() { |
40 |
@@ -27,13 +30,12 @@ multilib_layout() { |
41 |
libdirs=$(get_all_libdirs) |
42 |
: ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... |
43 |
|
44 |
- [ -z "${def_libdir}" ] && |
45 |
- die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
46 |
+ [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
47 |
|
48 |
# figure out which paths should be symlinks and which should be directories |
49 |
local dirs syms exp d |
50 |
for libdir in ${libdirs} ; do |
51 |
- if ! use usrmerge; then |
52 |
+ if ! use usrmerge ; then |
53 |
exp=( {,usr/,usr/local/}${libdir} ) |
54 |
else |
55 |
exp=( {usr/,usr/local/}${libdir} ) |
56 |
@@ -60,7 +62,7 @@ multilib_layout() { |
57 |
# setup symlinks and dirs where we expect them to be; do not migrate |
58 |
# data ... just fall over in that case. |
59 |
local prefix prefix_lst |
60 |
- if ! use usrmerge; then |
61 |
+ if ! use usrmerge ; then |
62 |
prefix_lst="${EROOT}"{,usr/,usr/local/} |
63 |
else |
64 |
prefix_lst="${EROOT}"{usr/,usr/local/} |
65 |
@@ -123,7 +125,7 @@ multilib_layout() { |
66 |
fi |
67 |
fi |
68 |
done |
69 |
- if use usrmerge; then |
70 |
+ if use usrmerge ; then |
71 |
for libdir in ${libdirs}; do |
72 |
if [[ ! -e "${EROOT}${libdir}" ]]; then |
73 |
ln -s usr/"${libdir}" "${EROOT}${libdir}" |
74 |
@@ -132,15 +134,24 @@ multilib_layout() { |
75 |
fi |
76 |
} |
77 |
|
78 |
-pkg_setup() { |
79 |
- multilib_layout |
80 |
-} |
81 |
- |
82 |
pkg_preinst() { |
83 |
# This is written in src_install (so it's in CONTENTS), but punt all |
84 |
# pending updates to avoid user having to do etc-update (and make the |
85 |
# pkg_postinst logic simpler). |
86 |
rm -f "${EROOT}"/etc/._cfg????_gentoo-release |
87 |
+ |
88 |
+ # We need to install directories and maybe some dev nodes when building |
89 |
+ # stages, but they cannot be in CONTENTS. |
90 |
+ # Also, we cannot reference $S as binpkg will break so we do this. |
91 |
+ multilib_layout |
92 |
+ if use build ; then |
93 |
+ if ! use usrmerge ; then |
94 |
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout |
95 |
+ else |
96 |
+ emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge |
97 |
+ fi |
98 |
+ fi |
99 |
+ rm -f "${ED}"/usr/share/${PN}/Makefile |
100 |
} |
101 |
|
102 |
src_prepare() { |
103 |
@@ -170,22 +181,15 @@ src_prepare() { |
104 |
} |
105 |
|
106 |
src_install() { |
107 |
- if ! use usrmerge; then |
108 |
- emake \ |
109 |
- OS=$(usex kernel_FreeBSD BSD Linux) \ |
110 |
- DESTDIR="${ED}" \ |
111 |
- layout |
112 |
- else |
113 |
- emake \ |
114 |
- OS=$(usex kernel_FreeBSD BSD Linux) \ |
115 |
- DESTDIR="${ED}" \ |
116 |
- layout-usrmerge |
117 |
- fi |
118 |
emake \ |
119 |
OS=$(usex kernel_FreeBSD BSD Linux) \ |
120 |
DESTDIR="${ED}" \ |
121 |
install |
122 |
dodoc ChangeLog |
123 |
+ |
124 |
+ # need the makefile in pkg_preinst |
125 |
+ insinto /usr/share/${PN} |
126 |
+ doins Makefile |
127 |
} |
128 |
|
129 |
pkg_postinst() { |