math/R and slave ports guidelines

Fernando Herrero Carrón elferdo at gmail.com
Sat Feb 13 13:42:48 UTC 2016


My proposal would be that the master port offers the options to link
against: none/ATLAS/openBLAS/netlib and that slave ports follow suit. Does
that sound reasonable?

2016-02-13 14:40 GMT+01:00 Fernando Herrero Carrón <elferdo at gmail.com>:

> Hi all,
>
> I am working on some upgrades to the Makefile of math/R and I have found
> that there are two slave ports depending on it: math/libR and
> math/libRmath. Now I have some questions about how slave ports should be
> handled.
>
> As it stands, the master port will only set some options *if* it is the
> master port itself being built and not one of the slaves. For example
> (math/R/Makefile:145):
>
> *.if !defined(LIBRMATH_SLAVEPORT)*
> .if ${PORT_OPTIONS:MATLAS}
> LIB_DEPENDS+=           libatlas.so:${PORTSDIR}/math/atlas
> BLAS?=                  ${LIBM} -lf77blas
> LAPACK?=                ${LIBM} -lalapack -lcblas
> .else
> BLAS?=                  no
> LAPACK?=                no
> .endif
> CONFIGURE_ARGS+=        --with-blas="${BLAS}" --with-lapack="${LAPACK}"
> .if ${BLAS} == "no" || ${LAPACK} == "no"
> PLIST_SUB+=             LAPACK=""
> .else
> PLIST_SUB+=             LAPACK="@comment "
> .endif
> [...]
>
> this fragment will only try compiling against ATLAS if it is not the
> math/libRmath port the one being compiled.
>
> In my opinion having the choice to link against
> ATLAS/openBLAS/netlib/none_of_them is interesting to any maths ports. Is
> there any reason why this specific slave port rejects it? Are there any
> general guidelines as to how options from master ports should be handled in
> slave ports? I haven't found any specific hints in the porter's handbook.
>
> Having a look at editors/emacs-nox11/Makefile (emacs-nox11 is a slave to
> emacs) I see the possibility of specifying OPTIONS_EXCLUDE, which seems a
> more reasonable place to handle such cases.
>
> Any help with this will be highly appreciated.
>
> Best,
> Fernando
>
>
>


More information about the freebsd-ports mailing list