Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 648084 - sys-process/lsof: working ebuild & source patch for x64-macos
Summary: sys-process/lsof: working ebuild & source patch for x64-macos
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2018-02-19 07:16 UTC by Pengcheng Xu
Modified: 2018-03-27 09:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch (lsof-4.90_ebuild.patch,1.09 KB, patch)
2018-02-19 07:16 UTC, Pengcheng Xu
Details | Diff
source code patch (lsof-darwin_dfile_c.patch,408 bytes, patch)
2018-02-19 07:17 UTC, Pengcheng Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pengcheng Xu 2018-02-19 07:16:47 UTC
Created attachment 520084 [details, diff]
ebuild patch

I've adapted lsof-4.90 to x64-macos (on Prefix). The needed patches are attached.
Comment 1 Pengcheng Xu 2018-02-19 07:17:29 UTC
Created attachment 520086 [details, diff]
source code patch
Comment 2 Fabian Groffen gentoo-dev 2018-03-27 08:47:43 UTC
@base-system: how about the following ebuild patch?  The patchfile is the one attached.  Thanks!


index f22dd0eaae8..ed88d91b0d4 100644
--- a/sys-process/lsof/lsof-4.91.ebuild
+++ b/sys-process/lsof/lsof-4.91.ebuild
@@ -26,6 +26,7 @@ S="${WORKDIR}/${MY_P}/${MY_P}_src"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-4.85-cross.patch #432120
+       "${FILESDIR}"/${PN}-4.90-darwin-cppfix.patch #648084
 )
 
 src_unpack() {
@@ -66,6 +67,15 @@ src_configure() {
        append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H")
        append-cppflags $(usex ipv6 -{D,U}HASIPv6)
        [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # make sys/proc_info.h available in ${T} because of LSOF_INCLUDE
+               # dummy location -- Darwin needs this for a Configure check to
+               # succeed
+               if [[ -e /usr/include/sys/proc_info.h ]] ; then
+                       mkdir -p "${T}"/sys || die
+                       ( cd "${T}"/sys && ln -s /usr/include/sys/proc_info.h ) || die
+               fi
+       fi
 
        export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \
                $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)"
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-03-27 08:53:15 UTC
You may want to apply the same to lsof-4.91 which I added to portage a couple of minutes ago.
Feel free to commit.
Comment 4 Fabian Groffen gentoo-dev 2018-03-27 08:58:30 UTC
thanks, my patch is already against 4.91 :)
Comment 5 Larry the Git Cow gentoo-dev 2018-03-27 09:00:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96f1d755b39e80fc469c6a74d8d2a025307f4840

commit 96f1d755b39e80fc469c6a74d8d2a025307f4840
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-03-27 09:00:47 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-03-27 09:00:47 +0000

    sys-process/lsof: fix for Darwin, bug #648084
    
    This is based on the work by jsteward in bug #648084.
    
    Closes: https://bugs.gentoo.org/648084
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-process/lsof/files/lsof-4.90-darwin-cppfix.patch | 12 ++++++++++++
 sys-process/lsof/lsof-4.90.ebuild                    | 12 +++++++++++-
 sys-process/lsof/lsof-4.91.ebuild                    | 12 +++++++++++-
 3 files changed, 34 insertions(+), 2 deletions(-)