[Bug 181301] [NEW PORT] net/kamailio: Very fast and configurable open source SIP proxy

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Sep 10 14:26:38 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181301

--- Comment #18 from olivermahmoudi at gmail.com ---
(In reply to John Marino from comment #14)
> (In reply to olivermahmoudi from comment #13)
> > ### Version 1 
> > .if ${PORT_OPTIONS:MMYSQL}
> > BUILD_DEPENDS+=
> > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
> > RUN_DEPENDS+:=  ${BUILD_DEPENDS}
> > EXTRA_MODULES+= db_mysql
> > PLIST_SUB+=     MYSQL=""
> > .else
> > PLIST_SUB+=     MYSQL="@comment "
> > .endif
> > 
> > ### Version 2
> > OPTIONS_SUB=yes
> > .if ${PORT_OPTIONS:MMYSQL}
> > BUILD_DEPENDS+=
> > ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
> > RUN_DEPENDS+:=  ${BUILD_DEPENDS}
> > EXTRA_MODULES+= db_mysql
> > .endif
> > 
> > whereas:
> > Version 1 == Version 2
> > 
> > then I can see what you mean and could update things to Version 2 via
> > OPTIONS_SUB. What I would essentially be carving out is this bit:
> > 
> > PLIST_SUB+=     MYSQL=""
> > .else
> > PLIST_SUB+=     MYSQL="@comment "
> > 
> > and it would still work.
> > 
> > Is this the point you were trying to make?
> 
> yes, but you can go even further.  e.g. 
> 
> 
> ### Version 3
> OPTIONS_SUB=yes
> MYSQL_BUILD_DEPENDS=
> ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
> MYSQL_RUN_DEPENDS=
> ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql56-server
> .include <bsd.options.mk>
> .if ${PORT_OPTIONS:MMYSQL}
> EXTRA_MODULES+= db_mysql
> .endif
> 
> 
> 
> See?
> 
> (btw, the mailing list has no authority here)

Yeah, the penny has dropped. Where I got a little confused here, was the part
where I have several conditions to take care of inside the if statements at the
same time. A prove of the concept as outlined in the Porter's Handbook would be
to break one big if statement down into several smaller ones and then the
OPTIONS_SUB approach is truly equivalent.

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list