Index: lsof-4.85-r2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v --- lsof-4.85-r2.ebuild 24 Apr 2012 06:24:52 -0000 1.4 +++ lsof-4.85-r2.ebuild 24 Apr 2012 09:13:09 -0000 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.4 2012/04/24 06:24:52 jdhore Exp $ -EAPI="2" +EAPI="3" inherit eutils flag-o-matic toolchain-funcs @@ -15,7 +15,7 @@ LICENSE="lsof" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd" +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" IUSE="examples ipv6 rpc selinux static" RDEPEND="rpc? ( net-libs/libtirpc ) @@ -32,6 +32,7 @@ src_prepare() { epatch "${FILESDIR}"/${P}-arg.c.patch #388555 + epatch "${FILESDIR}"/${PN}-4.85-aixgcc.patch #405973 # convert `test -r header.h` into a compile test sed -i -r \ -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ @@ -39,7 +40,16 @@ Configure || die } -target() { usex kernel_FreeBSD freebsd linux ; } +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + src_configure() { use static && append-ldflags -static @@ -76,3 +86,13 @@ doman lsof.8 || die dodoc 00* } + +pkg_postinst() { + if [[ ${CHOST} == *-solaris* ]] ; then + einfo "Note: to use lsof on Solaris you need read permissions on" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" + elif [[ ${CHOST} == *-aix* ]] ; then + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" + fi +} Index: files/lsof-4.85-aixgcc.patch =================================================================== RCS file: files/lsof-4.85-aixgcc.patch --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/lsof-4.85-aixgcc.patch 24 Apr 2012 09:13:09 -0000