Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2016 14:40:22 +0100
From:      =?UTF-8?Q?Fernando_Herrero_Carr=C3=B3n?= <elferdo@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   math/R and slave ports guidelines
Message-ID:  <CAMwkeZzLixeTB_fTSNvykiDifKNgt8u9k%2BN9wYGptz%2Ba%2ByP-mg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMwkeZzLixeTB_fTSNvykiDifKNgt8u9k%2BN9wYGptz%2Ba%2ByP-mg>