depends_build port:doxygen and +universal (or +docs)

René J.V. Bertin rjvbertin at gmail.com
Mon Sep 26 13:25:56 PDT 2016


On Monday September 26 2016 05:00:44 Ryan Schmidt wrote:

> If you "sudo port install" some port that depends on doxygen, and you request variants doxygen provides:
> 
> * If doxygen is not installed, doxygen will be installed with the those variant.
> * If doxygen is already installed, it will not be reinstalled with those variants.

The thing is that that's not what I'm seeing. Maybe depends_build is different in that aspect than depends_lib?

> > I don't know if doxygen itself installs any libraries or headers; if not, it should use
> > 
> > 	installs_libs no

> I think that's what it should do. It installs bin/doxygen and then stuff in share.


It doesn't, but adding the statement to the doxygen portfile also doesn't do the trick for me. Of course I rebuilt and reinstalled doxygen. Still:
{{{
%>  port installed doxygen
The following ports are currently installed:
  doxygen @1.8.10_2+wizard (active)

%> port -v deps .dbus +x11+documentation (y|n)? no
Full Name: dbus @1.10.8_1+documentation+x11
Build Dependencies:   port:pkgconfig, port:autoconf, port:automake, port:libtool, port:doxygen
Library Dependencies: port:expat, port:xorg-libsm, port:xorg-libX11

%> port -nv configure dbus +x11+documentation
--->  Computing dependencies for dbus...
The following dependencies will be installed: 
 doxygen
 python27
Continue? [Y/n]: n
}}}

In the logfile, I see:

{{{
snip
:debug:main Searching for dependency: doxygen
:debug:main Found Dependency: receipt exists for doxygen
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/textproc/doxygen
:debug:main OS darwin/13.4.0 (Mac OS X 10.9) arch i386
:debug:main Re-registering default for configure.dir
:debug:main Re-registering default for build.dir
:debug:main Sourcing PortGroup cmake 1.0 from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/cmake-1.0.tcl
:debug:main adding the default universal variant
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
:debug:main Requested variant +documentation is not provided by port doxygen.
:debug:main Requested variant +x11 is not provided by port doxygen.
:debug:main Executing variant universal provides universal
:debug:main Running callback portconfigure::add_automatic_compiler_dependencies
:debug:main Finished running callback portconfigure::add_automatic_compiler_dependencies
:debug:main Running callback portbuild::add_automatic_buildsystem_dependencies
:debug:main Finished running callback portbuild::add_automatic_buildsystem_dependencies
snip
}}}

IOW, the only way I found to declare a build dependency that doesn't impose +universal is to make it conditional:

{{{
    if {![file exists ${prefix}/bin/doxygen]} {
        depends_build-append \
                port:doxygen
    }
}}}

that should do about exactly the same as a `depends_build-append path:bin/doxygen:doxygen`, except for the part where it wants to install (or reactivate) doxygen+universal when I install dbus+universal.

R.


More information about the macports-dev mailing list