%%CONFIGURE_TARGET%% in Makefile and pkg-plist
Tomasz CEDRO
tomek at cedro.info
Tue Jan 5 03:37:03 UTC 2021
On Sun, Jan 3, 2021 at 8:41 PM Tomasz CEDRO wrote:
> Hello world :-)
> The new port is comms/limesuite. The pkg-plist line affected is:
> %%OCTAVE%%lib/octave/%%OCTAVE_VERSION%%/site/oct/%%CONFIGURE_TARGET%%/LimeSuite.oct
>
> The problem is as reported in [1]. First variable %%OCTAVE_VERSION%%
> gets replaced and taken from .include
> "../../math/octave/Makefile.version" (I would really prefer to see
> currently installed octave here). Second variable %%CONFIGURE_TARGET%%
> does not get replaced in make package or gets replaced with invalid
> value in stage (i.e. 12.1 on 12.2 platform) leading to invalid
> pkg-plist generation and then problems with make package.
Allright, mystery solved, that full path is provided by the
octave-config utility that is part of the Octave suite, this magic
path in Stage was taken from a CMAKE and provided by octave-config
binary build for pkg on 12.1 system, so we need to obtain this path as
well in Port Makefile (I found VAR!=exec very handy) and then
substitute that full path in a pkg-plist. Now our port fully adapts to
existing Octave Suite binary :-)
Makefile.diff:
-PLIST_SUB+= OCTAVE_VERSION=${OCTAVE_VERSION}
+OCTAVE_OCT_SITE_DIR!= (octave-config --oct-site-dir)
+OCTAVE_M_SITE_DIR!= (octave-config --m-site-dir)
+PLIST_SUB+= OCTAVE_OCT_SITE_DIR=${OCTAVE_OCT_SITE_DIR}
+PLIST_SUB+= OCTAVE_M_SITE_DIR=${OCTAVE_M_SITE_DIR}
pkg-plist.diff:
-%%OCTAVE%%lib/octave/%%OCTAVE_VERSION%%/site/oct/%%CONFIGURE_TARGET%%/LimeSuite.oct
-%%OCTAVE%%share/octave/%%OCTAVE_VERSION%%/site/m/LoadLimeSuite.m
+%%OCTAVE%%%%OCTAVE_OCT_SITE_DIR%%/LimeSuite.oct
+%%OCTAVE%%%%OCTAVE_M_SITE_DIR%%/LoadLimeSuite.m
CONFIGURE_TARGET is not even necessary here and works as expected it
just needs an assignment in a way:
PLIST_SUB+= CONFIGURE_TARGET=${CONFIGURE_TARGET}
Because at the moment we use this port mainly for debugging USB driver
problem I have also added and enabled by default DEBUG build option
that will generate binaries ready do debug. Original port stripped
them sorry and manual build with debug may be a blocker for testers.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252350
Feedback and Testing welcome Radio-Amateurs :-)
Happy New Year :-)
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
More information about the freebsd-questions
mailing list