public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] lsof with gentoo CFLAGS
@ 2001-06-28 22:48 Tod M. Neidt
  2001-06-28 22:58 ` Bruce A. Locke
  2001-06-28 23:43 ` Daniel Robbins
  0 siblings, 2 replies; 4+ messages in thread
From: Tod M. Neidt @ 2001-06-28 22:48 UTC (permalink / raw
  To: gentoo-dev@cvs.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

Hi!

g2boojum submitted a lsof ebuild.  I merged it and it seems to be
working fine.  I had been working on a lsof ebuild also, but g2boojum
handled the configure and wrapper archive in a more elegant way than I
was trying.  He mentioned in his dev-wiki post that he hadn't
incorporated the gentoo optimizations (CFLAGS) into the build yet, so I
modified his ebuild to do so.  This ebuild is attached and it also seems
to compile and merge fine.

One comment.  From the documentation, lsof appears to be sensitive to
the system kernel. It may require some kind of dependency so that if a
new kernel is merged, lsof gets rebuilt for that kernel.  I am not 100%
sure if that necessary though.

tod

[-- Attachment #2: lsof-4.56-r1.ebuild --]
[-- Type: text/plain, Size: 1262 bytes --]

# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Grant Goodyear <g2boojum@gentoo.org>
# /home/cvsroot/gentoo-x86/sys-apps/lsof/lsof-4.56.ebuild,v 1.1 2001/06/29 01:10:51 g2boojum Exp

P=lsof_4.56
A=${P}_W.tar.gz
S0=${WORKDIR}
S=${WORKDIR}/${P}
DESCRIPTION="Lists open files for running Unix processes"
SRC_URI="ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/${A}"
HOMEPAGE="http://"

DEPEND=""

src_unpack() {
    unpack ${A}
    cd ${S0}
    try tar xvf ${P}.tar
}

src_compile() {

    #interactive script: Enable HASSECURITY, WARNINGSTATE, and HASKERNIDCK
    #is there a way to avoid the "echo to a file + file read"?
    #Just piping in the results didn't seem to work.
    echo -e "y\ny\ny\nn\ny\ny\n" > junk
    ./Configure linux < junk
#Add gentoo CFLAGS from /etc/make.conf to DEBUG variable in Makefile
#The DEBUG variable seems to be the suggested place.
    sed -e "s/DEBUG=[[:blank:]]*-O/DEBUG=  ${CFLAGS}/" \
    Makefile > Makefile.new
    mv Makefile.new Makefile
    try make all

}

src_install () {

    doman lsof.8
    exeinto /bin/
    doexe lsof
    into /lib
    dolib lib/liblsof.a
    dodoc 00*
    insinto /usr/share/lsof/scripts
    doins scripts/*
}


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-06-29  5:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-28 22:48 [gentoo-dev] lsof with gentoo CFLAGS Tod M. Neidt
2001-06-28 22:58 ` Bruce A. Locke
2001-06-28 23:20   ` Tod M. Neidt
2001-06-28 23:43 ` Daniel Robbins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox