Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 426322
Collapse All | Expand All

(-)coreutils-8.17.ebuild (-13 / +24 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2012 Gentoo Foundation
1
# Copyright 1999-2012 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/coreutils-8.17.ebuild,v 1.3 2012/07/11 14:33:02 ryao Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/coreutils-8.17.ebuild,v 1.2 2012/05/24 02:33:02 vapier Exp $
4
4
5
EAPI="3"
5
EAPI="3"
6
6
Lines 17-24 Link Here
17
17
18
LICENSE="GPL-3"
18
LICENSE="GPL-3"
19
SLOT="0"
19
SLOT="0"
20
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
20
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21
IUSE="acl caps gmp nls selinux static unicode userland_BSD vanilla xattr"
21
IUSE="acl caps gmp nls selinux static unicode vanilla xattr"
22
22
23
RDEPEND="caps? ( sys-libs/libcap )
23
RDEPEND="caps? ( sys-libs/libcap )
24
	gmp? ( dev-libs/gmp )
24
	gmp? ( dev-libs/gmp )
Lines 46-51 Link Here
46
		epatch
46
		epatch
47
	fi
47
	fi
48
48
49
	epatch "${FILESDIR}"/${PN}-7.2-mint.patch
50
49
	# Since we've patched many .c files, the make process will try to
51
	# Since we've patched many .c files, the make process will try to
50
	# re-build the manpages by running `./bin --help`.  When doing a
52
	# re-build the manpages by running `./bin --help`.  When doing a
51
	# cross-compile, we can't do that since 'bin' isn't a native bin.
53
	# cross-compile, we can't do that since 'bin' isn't a native bin.
Lines 75-86 Link Here
75
	# kill/uptime - procps
77
	# kill/uptime - procps
76
	# groups/su   - shadow
78
	# groups/su   - shadow
77
	# hostname    - net-tools
79
	# hostname    - net-tools
80
	if [[ ${CHOST} == *-mint* ]]; then
81
		myconf="${myconf} --enable-install-program=arch,hostname,kill,uptime"
82
		myconf="${myconf} --enable-no-install-program=groups,su"
83
	else
84
		myconf="${myconf} --enable-install-program=arch"
85
		myconf="${myconf} --enable-no-install-program=groups,hostname,kill,su,uptime"
86
	fi
87
78
	econf \
88
	econf \
79
		--with-packager="Gentoo" \
89
		--with-packager="Gentoo" \
80
		--with-packager-version="${PVR} (p${PATCH_VER:-0})" \
90
		--with-packager-version="${PVR} (p${PATCH_VER:-0})" \
81
		--with-packager-bug-reports="http://bugs.gentoo.org/" \
91
		--with-packager-bug-reports="http://bugs.gentoo.org/" \
82
		--enable-install-program="arch" \
83
		--enable-no-install-program="groups,hostname,kill,su,uptime" \
84
		--enable-largefile \
92
		--enable-largefile \
85
		$(use caps || echo --disable-libcap) \
93
		$(use caps || echo --disable-libcap) \
86
		$(use_enable nls) \
94
		$(use_enable nls) \
Lines 105-111 Link Here
105
		for w in "$@" ; do
113
		for w in "$@" ; do
106
			ww="${T}/mount-wrappers/${w}"
114
			ww="${T}/mount-wrappers/${w}"
107
			cat <<-EOF > "${ww}"
115
			cat <<-EOF > "${ww}"
108
				#!/bin/sh
116
				#!${EPREFIX}/bin/sh
109
				exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
117
				exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P $w) "\$@"
110
			EOF
118
			EOF
111
			chmod a+rx "${ww}"
119
			chmod a+rx "${ww}"
Lines 127-138 Link Here
127
	insinto /etc
135
	insinto /etc
128
	newins src/dircolors.hin DIR_COLORS || die
136
	newins src/dircolors.hin DIR_COLORS || die
129
137
130
	if [[ ${USERLAND} == "GNU" ]] ; then
138
	if [[ ${USERLAND} == "GNU" || ${EPREFIX%/} != "" ]] ; then
131
		cd "${D}"/usr/bin
139
		cd "${ED}"/usr/bin
132
		dodir /bin
140
		dodir /bin
133
		# move critical binaries into /bin (required by FHS)
141
		# move critical binaries into /bin (required by FHS)
134
		local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
142
		local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
135
		           mkdir mknod mv pwd rm rmdir stty sync true uname"
143
		           mkdir mknod mv pwd rm rmdir stty sync true uname"
144
145
		[[ ${CHOST} == *-mint* ]] && fhs="${fhs} hostname"
146
136
		mv ${fhs} ../../bin/ || die "could not move fhs bins"
147
		mv ${fhs} ../../bin/ || die "could not move fhs bins"
137
		# move critical binaries into /bin (common scripts)
148
		# move critical binaries into /bin (common scripts)
138
		local com="basename chroot cut dir dirname du env expr head mkfifo
149
		local com="basename chroot cut dir dirname du env expr head mkfifo
Lines 145-151 Link Here
145
		done
156
		done
146
	else
157
	else
147
		# For now, drop the man pages, collides with the ones of the system.
158
		# For now, drop the man pages, collides with the ones of the system.
148
		rm -rf "${D}"/usr/share/man
159
		rm -rf "${ED}"/usr/share/man
149
	fi
160
	fi
150
}
161
}
151
162
Lines 155-169 Link Here
155
	ewarn "  changes, such as: source /etc/profile"
166
	ewarn "  changes, such as: source /etc/profile"
156
167
157
	# /bin/dircolors sometimes sticks around #224823
168
	# /bin/dircolors sometimes sticks around #224823
158
	if [ -e "${ROOT}/usr/bin/dircolors" ] && [ -e "${ROOT}/bin/dircolors" ] ; then
169
	if [ -e "${EROOT}/usr/bin/dircolors" ] && [ -e "${EROOT}/bin/dircolors" ] ; then
159
		if strings "${ROOT}/bin/dircolors" | grep -qs "GNU coreutils" ; then
170
		if strings "${EROOT}/bin/dircolors" | grep -qs "GNU coreutils" ; then
160
			einfo "Deleting orphaned GNU /bin/dircolors for you"
171
			einfo "Deleting orphaned GNU /bin/dircolors for you"
161
			rm -f "${ROOT}/bin/dircolors"
172
			rm -f "${EROOT}/bin/dircolors"
162
		fi
173
		fi
163
	fi
174
	fi
164
175
165
	# Help out users using experimental filesystems
176
	# Help out users using experimental filesystems
166
	if grep -qs btrfs "${ROOT}"/etc/fstab /proc/mounts ; then
177
	if grep -qs btrfs "${EROOT}"/etc/fstab /proc/mounts ; then
167
		case $(uname -r) in
178
		case $(uname -r) in
168
		2.6.[12][0-9]|2.6.3[0-7]*)
179
		2.6.[12][0-9]|2.6.3[0-7]*)
169
			ewarn "You are running a system with a buggy btrfs driver."
180
			ewarn "You are running a system with a buggy btrfs driver."

Return to bug 426322