Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 2014 14:26:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 181301] [NEW PORT] net/kamailio: Very fast and configurable open source SIP proxy
Message-ID:  <bug-181301-13-UUZl4MXJCP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-181301-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-181301-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181301

--- Comment #18 from olivermahmoudi@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-181301-13-UUZl4MXJCP>