problem with multiple distfiles when updating p5-Mcstas-Tools

Hello,
I am maintaining a few ports that deal with neutron neutron and X-ray scattering simulations, but I've hit a snag:
Upstream has split the distribution into several distfiles which sometimes overlap in their content. The simplest case is a set of perl-based tools science/p5-McStas-Tools where the previously single distfile has been split into two.

Defining DISTFILES in the Makefile (attached) got me almost there. From upstream the installation directory ends up being /usr/local/mcstas/PORTVERSION/bin where a set of perl scripts end up. The idea is to create links in /usr/local/bin. I had to strip one level from the tarballs

It appears that my solution only works for scripts in the first distfile - When post-install tries to generate links to any of the scripts in the second one it complains that it cannot find it. The error I get from both make stage and make makeplist is as follows:
Code:
install -l rs -s /usr/home/erkn/Sandbox/p5-Mcstas-Tools/work/stage//usr/local/mcstas/2.5/bin/mcdaemon.pl /usr/home/erkn/Sandbox/p5-Mcstas-Tools/work/stage/usr/local/bin/mcdaemon.pl
install: /usr/home/erkn/Sandbox/p5-Mcstas-Tools/work/stage//usr/local/mcstas/2.5/bin/mcdaemon.pl: realpath: No such file or directory
*** Error code 71

If I switch the order of the files in DISTFILES I get the same error but now for a different script.

Both tarballs get extracted, the files are there to be linked.

I am probably missing some very simple point but I cannot figure it out - could someone help me out a bit? I've pasted the Makefile below:
Code:
# $FreeBSD: head/science/p5-Mcstas-Tools/Makefile 487272 2018-12-12 01:35:33Z gerald $

PORTNAME=    Mcstas-Tools
PORTVERSION=    2.5
CATEGORIES=    science
MASTER_SITES=    http://download.mcstas.org/${PORTNAME}-${PORTVERSION}/unix/
PKGNAMEPREFIX=    p5-
DISTFILES=    mcstas-tools-perl-${PORTVERSION}-src.tar.gz mcstas-tools-perl-cmdline-${PORTVERSION}-src.tar.gz

MAINTAINER=    erkn@fysik.dtu.dk
COMMENT=    Perl based tools for the McStas neutron ray tracing package

LICENSE=    GPLv2

RUN_DEPENDS=    p5-Tk>0:x11-toolkits/p5-Tk \
        p5-PGPLOT>=2.21:graphics/p5-PGPLOT    \
        PDL>0:math/PDL \
        mcstas:science/mcstas

USES=        cmake perl5 shebangfix

EXTRACT_AFTER_ARGS=    --strip-components 1
NO_WRKSUBDIR=    yes
CMAKE_ARGS=    -Denable_mcstas=1
SHEBANG_FILES=    ${EXECS}
MANDIRS=    ${PREFIX}/mcstas/${DISTVERSION}/doc/man/man1
PLIST_SUB=    PORTVERSION=${PORTVERSION}

EXECS=        mcdaemon.pl mcdisplay.pl mcdoc.pl mcformatgui.pl mcgui.pl mcplot.pl mcresplot.pl mcrun.pl mcstas2vitess.pl

post-install:
.for e in ${EXECS}
    ${RLN} -s ${STAGEDIR}/${PREFIX}/mcstas/${PORTVERSION}/bin/${e} ${STAGEDIR}${PREFIX}/bin/${e}
.endfor

.include <bsd.port.mk>


cheers and thanks in advance
Erik
 
Back
Top