Index: lsof-4.85-r2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v retrieving revision 1.1 diff -u -r1.1 lsof-4.85-r2.ebuild --- lsof-4.85-r2.ebuild 15 Nov 2011 05:03:29 -0000 1.1 +++ lsof-4.85-r2.ebuild 13 Apr 2012 09:23: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.1 2011/11/15 05:03:29 vapier 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 ) @@ -39,9 +39,19 @@ 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 + use ppc-aix && append-ldflags -Wl,-bnolibpath append-cppflags $(usex rpc "$($(tc-getPKG_CONFIG) libtirpc --cflags)" -DHASNOTRPC) append-cppflags $(usex ipv6 -{D,U}HASIPv6) @@ -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 +}