Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 405973 | Differences between
and this patch

Collapse All | Expand All

(-)lsof-4.85-r2.ebuild (-3 / +23 lines)
Lines 2-8 Link Here
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-process/lsof/lsof-4.85-r2.ebuild,v 1.4 2012/04/24 06:24:52 jdhore Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.4 2012/04/24 06:24:52 jdhore Exp $
4
4
5
EAPI="2"
5
EAPI="3"
6
6
7
inherit eutils flag-o-matic toolchain-funcs
7
inherit eutils flag-o-matic toolchain-funcs
8
8
Lines 15-21 Link Here
15
15
16
LICENSE="lsof"
16
LICENSE="lsof"
17
SLOT="0"
17
SLOT="0"
18
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd"
18
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
19
IUSE="examples ipv6 rpc selinux static"
19
IUSE="examples ipv6 rpc selinux static"
20
20
21
RDEPEND="rpc? ( net-libs/libtirpc )
21
RDEPEND="rpc? ( net-libs/libtirpc )
Lines 32-37 Link Here
32
32
33
src_prepare() {
33
src_prepare() {
34
	epatch "${FILESDIR}"/${P}-arg.c.patch #388555
34
	epatch "${FILESDIR}"/${P}-arg.c.patch #388555
35
	epatch "${FILESDIR}"/${PN}-4.85-aixgcc.patch #405973
35
	# convert `test -r header.h` into a compile test
36
	# convert `test -r header.h` into a compile test
36
	sed -i -r \
37
	sed -i -r \
37
		-e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \
38
		-e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \
Lines 39-45 Link Here
39
		Configure || die
40
		Configure || die
40
}
41
}
41
42
42
target() { usex kernel_FreeBSD freebsd linux ; }
43
target() {
44
	case ${CHOST} in
45
		*-darwin*)  echo darwin  ;;
46
		*-freebsd*) echo freebsd ;;
47
		*-solaris*) echo solaris ;;
48
		*-aix*)     echo aixgcc  ;;
49
		*)          echo linux   ;;
50
	esac
51
}
52
43
src_configure() {
53
src_configure() {
44
	use static && append-ldflags -static
54
	use static && append-ldflags -static
45
55
Lines 76-78 Link Here
76
	doman lsof.8 || die
86
	doman lsof.8 || die
77
	dodoc 00*
87
	dodoc 00*
78
}
88
}
89
90
pkg_postinst() {
91
	if [[ ${CHOST} == *-solaris* ]] ; then
92
		einfo "Note: to use lsof on Solaris you need read permissions on"
93
		einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys"
94
	elif [[ ${CHOST} == *-aix* ]] ; then
95
		einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and"
96
		einfo "/dev/kmem, i.e. you need to be root, or to be in the group system"
97
	fi
98
}

Return to bug 405973