Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/baselayout-prefix: ChangeLog baselayout-prefix-1.12.5-r11.ebuild
Date: Thu, 31 Mar 2011 18:50:06
Message-Id: 20110331184956.1F9F520054@flycatcher.gentoo.org
1 grobian 11/03/31 18:49:56
2
3 Modified: ChangeLog
4 Added: baselayout-prefix-1.12.5-r11.ebuild
5 Log:
6 Revbump, switch to using forked repository with our patches applied
7
8 (Portage version: 2.2.01.18213-prefix/cvs/Darwin powerpc)
9
10 Revision Changes Path
11 1.9 sys-apps/baselayout-prefix/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog?rev=1.9&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog?rev=1.9&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog?r1=1.8&r2=1.9
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v
20 retrieving revision 1.8
21 retrieving revision 1.9
22 diff -u -r1.8 -r1.9
23 --- ChangeLog 31 Mar 2011 16:21:27 -0000 1.8
24 +++ ChangeLog 31 Mar 2011 18:49:56 -0000 1.9
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-apps/baselayout-prefix
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.8 2011/03/31 16:21:27 haubi Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/ChangeLog,v 1.9 2011/03/31 18:49:56 grobian Exp $
30 +
31 +*baselayout-prefix-1.12.5-r11 (31 Mar 2011)
32 +
33 + 31 Mar 2011; Fabian Groffen <grobian@g.o>
34 + +baselayout-prefix-1.12.5-r11.ebuild:
35 + Revbump, switch to using forked repository with our patches applied
36
37 31 Mar 2011; Michael Haubenwallner <haubi@g.o>
38 baselayout-prefix-1.12.5-r10.ebuild, +files/baselayout-1.12.5-gnulib.patch,
39
40
41
42 1.1 sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r11.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r11.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r11.ebuild?rev=1.1&content-type=text/plain
46
47 Index: baselayout-prefix-1.12.5-r11.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-prefix/baselayout-prefix-1.12.5-r11.ebuild,v 1.1 2011/03/31 18:49:56 grobian Exp $
52
53 EAPI=3
54
55 inherit eutils toolchain-funcs multilib prefix flag-o-matic autotools
56
57 # baselayout-prefix-1.12.5.1694.tar.bz2
58 PVER=1701
59
60 DESCRIPTION="Baselayout for Gentoo Prefix installs"
61 HOMEPAGE="http://prefix.gentoo.org/"
62 SRC_URI="http://dev.gentoo.org/~grobian/distfiles/${P}.${PVER}.tar.bz2"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
67 IUSE="prefix-chaining"
68 DEPEND=">=sys-apps/portage-2.2.01"
69 RDEPEND=">=sys-libs/readline-5.0-r1
70 >=app-shells/bash-3.1_p7
71 >=sys-apps/coreutils-5.2.1
72 kernel_Darwin? ( sys-process/pidof-bsd )
73 kernel_FreeBSD? ( sys-process/pidof-bsd )"
74
75 S=${WORKDIR}/${P}.${PVER}
76
77 src_prepare() {
78 if use prefix-chaining; then
79 epatch "${S}"/baselayout-1.12.5-prefix-chaining.patch
80
81 # need to set the PKG_CONFIG_PATH globally for this prefix, when
82 # chaining is enabled, since pkg-config may not be installed locally,
83 # but still .pc files should be found for all RDEPENDable prefixes in
84 # the chain.
85 echo "PKG_CONFIG_PATH=\"${EPREFIX}/usr/lib/pkgconfig:${EPREFIX}/usr/share/pkgconfig\"" >> "${S}"/etc/env.d/00basic
86 fi
87
88 # The consoletype application in this form will only work on Linux
89 [[ ${CHOST} == *-linux-* ]] || epatch "${FILESDIR}"/${P/-prefix/}-prefix-no-consoletype.patch
90
91 cd "${S}"
92 eprefixify \
93 etc/env.d/00basic \
94 etc/profile \
95 sbin/env-update.sh \
96 sbin/functions.sh \
97 sbin/runscript.sh \
98 src/runscript.c \
99 sbin/depscan.sh \
100 sbin/rc-daemon.sh \
101 sbin/rc-services.sh
102 # add the host OS MANPATH
103 echo 'MANPATH="/usr/share/man"' > etc/env.d/99basic || die "can't make file"
104 }
105
106 src_configure() {
107 cd gnulib || die
108 default
109 }
110
111 src_compile() {
112 # build gnulib first
113 pushd gnulib > /dev/null || die
114 emake || die "Cannot build gnulib"
115 popd > /dev/null
116
117 # use gnulib
118 append-flags -I../gnulib -I../gnulib/gllib
119 append-ldflags -L../gnulib/gllib
120 append-libs gnu
121
122 local libdir="lib"
123
124 [[ ${SYMLINK_LIB} == "yes" ]] && libdir=$(get_abi_LIBDIR "${DEFAULT_ABI}")
125
126 make -C "${S}"/src \
127 CC="$(tc-getCC)" \
128 LD="$(tc-getCC) ${LDFLAGS}" \
129 CFLAGS="${CFLAGS}" \
130 LIBDIR="${libdir}" || die
131 }
132
133 src_install() {
134 local dir libdirs libdirs_env rcscripts_dir
135
136 dodir /etc
137 dodir /etc/env.d
138 dodir /etc/init.d # .keep file might mess up init.d stuff
139
140 libdirs=$(get_all_libdirs)
141 : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
142
143 rcscripts_dir="/lib/rcscripts"
144
145 for dir in ${libdirs}; do
146 libdirs_env=${libdirs_env:+$libdirs_env:}/${dir}:/usr/${dir}:/usr/local/${dir}
147 [[ ${dir} == "lib" && ${SYMLINK_LIB} == "yes" ]] && continue
148 dodir /"${dir}"
149 dodir /usr/"${dir}"
150 dodir /usr/local/"${dir}"
151 done
152
153 # Ugly compatibility with stupid ebuilds and old profiles symlinks
154 if [[ ${SYMLINK_LIB} == "yes" ]] ; then
155 rm -r "${ED}"/{lib,usr/lib,usr/local/lib} &> /dev/null
156 dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib
157 dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/lib
158 dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/local/lib
159 fi
160
161 # FHS compatibility symlinks stuff
162 dosym /var/tmp /usr/tmp
163
164 # rc-scripts version for testing of features that *should* be present
165 echo "Gentoo Prefix Base System version ${PV}" > ${ED}/etc/gentoo-release
166
167 # get the basic stuff in there
168 doenvd "${S}"/etc/env.d/* || die "doenvd"
169
170 # copy the profile
171 cp "${S}"/etc/profile "${ED}"/etc/profile
172
173 # Setup files in /sbin
174 #
175 cd "${S}"/sbin
176 into /
177 # These moved from /etc/init.d/ to /sbin to help newb systems
178 # from breaking
179 dosbin runscript.sh functions.sh
180
181 # Compat symlinks between /etc/init.d and /sbin
182 # (some stuff have hardcoded paths)
183 dosym ../../sbin/depscan.sh /etc/init.d/depscan.sh
184 dosym ../../sbin/runscript.sh /etc/init.d/runscript.sh
185 dosym ../../sbin/functions.sh /etc/init.d/functions.sh
186
187 cd "${S}"/sbin
188 into /
189 dosbin depscan.sh
190 dosbin env-update.sh
191 insinto ${rcscripts_dir}/awk
192 doins "${S}"/src/awk/functions.awk
193
194 #
195 # Install baselayout utilities
196 #
197 local libdir="lib"
198 [[ ${SYMLINK_LIB} == "yes" ]] && libdir=$(get_abi_LIBDIR "${DEFAULT_ABI}")
199
200 cd "${S}"/src
201 make DESTDIR="${ED}" LIBDIR="${libdir}" install || die
202
203 insinto ${rcscripts_dir}/sh
204 doins "${S}"/sbin/rc-*
205 }
206
207 pkg_postinst() {
208 if [[ ${EUID} == 0 ]] ; then
209 # setup portage user, such that things that require root privs
210 # don't fail, bug #321623
211 enewgroup portage 250
212 enewuser portage 250 -1 "${EPREFIX}"/var/tmp/portage portage
213 fi
214
215 # This is also written in src_install (so it's in CONTENTS), but
216 # write it here so that the new version is immediately in the file
217 # (without waiting for the user to do etc-update)
218 rm -f "${EROOT}"/etc/._cfg????_gentoo-release
219 echo "Gentoo Prefix Base System version ${PV}" > "${EROOT}"/etc/gentoo-release
220
221 echo
222 einfo "Please be sure to update all pending '._cfg*' files in /etc,"
223 einfo "else things might break! You can use 'etc-update'"
224 einfo "to accomplish this:"
225 einfo
226 einfo " # etc-update"
227 echo
228 }