Opened 18 years ago

Closed 18 years ago

#6676 closed defect (invalid)

BUG: doxygen port fails to recognize that gs and tex are already installed

Reported by: moll@… Owned by: cssdev@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

The doxygen Portfile contains dependencies on gs and tex:

depends_lib bin:tex:teTeX bin:gs:ghostscript [...]

I have gs installed in /usr/local/bin and tex in /usr/local/teTeX/bin/powerpc-apple-darwin-current/tex. Both these directories are on my path (both as user and as root). If I try to install doxygen, it still insists on installing the teTeX and ghostscript ports as well.

Change History (5)

comment:1 Changed 18 years ago by mww@…

Owner: changed from darwinports-bugs@… to cssdev@…
Summary: doxygen port fails to recognize that gs and tex are already installedBUG: doxygen port fails to recognize that gs and tex are already installed

comment:2 Changed 18 years ago by cssdev@…

I wonder if this might be a problem with the DP base code. I performed a quick test by checking for a known file in /usr/local/bin. It seems like something is wrong with portutil's binaryInPath.

$ export PATH=/usr/local/bin:$PATH $ echo $PATH /usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Volumes/homepb/Users/css/local/bin:/usr/X11R6/bin:/Developer/Tools $ which see /usr/local/bin/see $ grep see Portfile depends_lib bin:see:see $ port -d build DEBUG: Changing to port directory: . DEBUG: Changing to port directory: . DEBUG: Requested variant powerpc is not provided by port checkdep. DEBUG: Requested variant darwin is not provided by port checkdep. DEBUG: Requested variant macosx is not provided by port checkdep. Error: Dependency 'see' not found. Error: /opt/local/bin/port: Status 1 encountered during processing. $ which see /usr/local/bin/see

To me, this seems to duplicate the problem that you have identified. The port command could not find /usr/local/bin/see even though it's clearly in my path as shown by the which output. I'll check to see if this might be a bigger issue.

comment:3 Changed 18 years ago by cssdev@…

Okay, I think I finally figured this out. DarwinPorts uses a hard-coded PATH that does not include /usr/local. The way to work around this is to overload the binpath variable in either ports.conf or .ports.conf. From darwinports.tcl:

if {![info exists binpath]} {

set env(PATH) "${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"

} else {

set env(PATH) "$binpath"

}

So, try adding this to your /opt/local/etc/ports/ports.conf:

binpath /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usrX11R6/bin

comment:4 Changed 18 years ago by moll@…

That works perfectly. Thanks! The binpath variable is not mentioned in the ports.conf(5) man page. That seems like a bug to me. I can't imagine that I am the only one who has some programs installed in /usr/local/bin or other directories not in the "standard" path.

comment:5 Changed 18 years ago by cssdev@…

Resolution: invalid
Status: newclosed

I filed the need for documenting binpath as BUG #6880. I'm glad to know that using binpath worked! Note that you might have unintended behavior when relying on binaries outside the system or darwinports trees, but that might be why binpath isn't documented.

Marking this bug closed INVALID since it's a dp base configuration issue rather than something specific to the doxygen port.

Note: See TracTickets for help on using tickets.