Depend on ${PORTSDIR}/foo WITH_OPTION

joris dedieu joris.dedieu at gmail.com
Thu May 20 06:39:28 UTC 2010


2010/5/20 joris dedieu <joris.dedieu at gmail.com>:
> 2010/5/19 Boris Samorodov <bsam at ipt.ru>:
>> On Wed, 19 May 2010 20:07:25 +0300 Ion-Mihai Tetcu wrote:
>>> On Wed, 19 May 2010 08:11:48 +0200
>>> joris dedieu <joris.dedieu at gmail.com> wrote:
>>
>>> > I would like to know if there is a way to tell a port that it depend
>>> > on an other port
>>> > but build with particulars options.
>>> >
>>> > Eg : port foo build depend on bar but won't build if bar is not build
>>> > with WITH_PARTICULAR.
>>> >
>>> > I  don't see anything to say that in bsd.port.mk, so before to
>>> > implement self made tests, I want to know if I miss something.
>>
>>> no, there isn't.
>>
>> Here is a workaround: create a port with needed options and use
>> that new port as a dependency. You may look at comms/gammy-python
>> as an example.
>
Ok thank for those replies.

I'm currently porting Mandriva Directory Server (http://mds.mandriva.org)

In source tree there are tow packages :
- mmc-core which provides a daemon tool (mmc-agent) written in python and
a web interface written in php.
- mds  which provides some plugins (mail, samba, squid ...) for both
the agent and the interface.

You can install the agent on a machine and the web ui in an other.
You can also have several agents connected to the same web-ui

As usual linux distros spilt it in many packages.

So I think I will do it this way :

mmc-agent -> install the agent
mmc-web  -> install the web interface

mds-agent -> install the base plugin and some optionnal depend on mmc-agent
mds-web  -> depend on mds-web

The problem I have is that it also provides :
- a plugin for openldap that won't work if openldap is not build with ppolicy
- a plugin for manage openssh ldap public key (that only will run if
security/openssh-portable is compiled with the lpk-patch

As it run depend I can just send a warning in pkg-message.

It also means that I will have 4 ports for only 2 tarballs.


Joris

>
>>
>> --
>> WBR, Boris Samorodov (bsam)
>> Research Engineer, http://www.ipt.ru Telephone & Internet SP
>> FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
>>
>


More information about the freebsd-ports mailing list