diff options
author | mat <mat@FreeBSD.org> | 2016-04-14 18:40:38 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2016-04-14 18:40:38 +0800 |
commit | e867fd01d087b9802b271aa04be2829602de1302 (patch) | |
tree | 2ad82e39a82eab0adffd000c7663ae76ef2d94ba /science | |
parent | ca1a3a16130d3683d12fa44026ac907825323a4f (diff) | |
download | freebsd-ports-graphics-e867fd01d087b9802b271aa04be2829602de1302.tar.gz freebsd-ports-graphics-e867fd01d087b9802b271aa04be2829602de1302.tar.zst freebsd-ports-graphics-e867fd01d087b9802b271aa04be2829602de1302.zip |
Don't leave dead symlinks when deinstalling. [1] (based on)
While there, move man pages to a place they can be used, and fix
shebangs.
PR: 206476 [1]
Submitted by: maintainer
Sponsored by: Absolight
Diffstat (limited to 'science')
-rw-r--r-- | science/p5-Mcstas-Tools/Makefile | 17 | ||||
-rw-r--r-- | science/p5-Mcstas-Tools/files/pkg-install.in | 23 | ||||
-rw-r--r-- | science/p5-Mcstas-Tools/pkg-plist | 83 |
3 files changed, 59 insertions, 64 deletions
diff --git a/science/p5-Mcstas-Tools/Makefile b/science/p5-Mcstas-Tools/Makefile index a1be901bf0e..7cdae3b726b 100644 --- a/science/p5-Mcstas-Tools/Makefile +++ b/science/p5-Mcstas-Tools/Makefile @@ -16,13 +16,22 @@ LICENSE= GPLv2 RUN_DEPENDS= p5-Tk>0:x11-toolkits/p5-Tk \ p5-PGPLOT>=2.21:graphics/p5-PGPLOT \ PDL>0:math/PDL \ - ${LOCALBASE}/bin/mcstas:science/mcstas + mcstas:science/mcstas -USES= cmake gmake perl5 +USES= cmake gmake perl5 shebangfix CMAKE_ARGS= -Denable_mcstas=1 GNU_CONFIGURE= yes +SHEBANG_FILES= ${EXECS:S/$/.pl/} -SUB_FILES= pkg-install -SUB_LIST= PORTVERSION=${PORTVERSION} +PLIST_SUB= PORTVERSION=${PORTVERSION} + +EXECS= mcdaemon mcdisplay mcdoc mcformatgui mcgui mcplot mcresplot mcrun mcstas2vitess + +post-install: + ${MV} ${STAGEDIR}${PREFIX}/mcstas/${PORTVERSION}/doc/man/man1/*.1 ${STAGEDIR}${PREFIX}/man/man1/ + ${RMDIR} -p ${STAGEDIR}${PREFIX}/mcstas/${PORTVERSION}/doc/man/man1 || : > /dev/null 2>&1 +.for target in ${EXECS} + ${LN} -s ${PREFIX}/mcstas/${PORTVERSION}/bin/${target} ${STAGEDIR}${PREFIX}/bin/${target} +.endfor .include <bsd.port.mk> diff --git a/science/p5-Mcstas-Tools/files/pkg-install.in b/science/p5-Mcstas-Tools/files/pkg-install.in deleted file mode 100644 index 493a9d5a5ed..00000000000 --- a/science/p5-Mcstas-Tools/files/pkg-install.in +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PKG_PREFIX=${PKG_PREFIX:-/usr/local} - -if [ $# -ne 2 ]; then - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 -fi - -execs="mcdaemon mcdisplay mcdoc mcformatgui mcgui mcplot mcresplot mcrun mcstas2vitess" - -case $2 in - POST-INSTALL) - if [ ! -f "${PKG_PREFIX}/bin" ]; then - echo "Installing link to executables in ${PKG_PREFIX}/bin."; - for target in ${execs}; do - ln -s ${PKG_PREFIX}/mcstas/%%PORTVERSION%%/bin/${target} ${PKG_PREFIX}/bin/${target}; - done - fi - ;; -esac - -exit 0 diff --git a/science/p5-Mcstas-Tools/pkg-plist b/science/p5-Mcstas-Tools/pkg-plist index d02f69063ae..0d518ffc4ff 100644 --- a/science/p5-Mcstas-Tools/pkg-plist +++ b/science/p5-Mcstas-Tools/pkg-plist @@ -1,37 +1,46 @@ -mcstas/2.2a/bin/mcdaemon -mcstas/2.2a/bin/mcdisplay -mcstas/2.2a/bin/mcdoc -mcstas/2.2a/bin/mcformatgui -mcstas/2.2a/bin/mcgui -mcstas/2.2a/bin/mcplot -mcstas/2.2a/bin/mcresplot -mcstas/2.2a/bin/mcrun -mcstas/2.2a/bin/mcstas2vitess -mcstas/2.2a/doc/man/man1/mcdisplay-2.2a.1 -mcstas/2.2a/doc/man/man1/mcdoc-2.2a.1 -mcstas/2.2a/doc/man/man1/mcgui-2.2a.1 -mcstas/2.2a/doc/man/man1/mcplot-2.2a.1 -mcstas/2.2a/doc/man/man1/mcrun-2.2a.1 -mcstas/2.2a/launchers/McStas.desktop -mcstas/2.2a/launchers/mcstas-pl.png -mcstas/2.2a/tools/Perl/launcher/mcstas-pl.png -mcstas/2.2a/tools/Perl/launcher/mcxtrace-pl.png -mcstas/2.2a/tools/Perl/matlab/CheckNeutNumber.m -mcstas/2.2a/tools/Perl/matlab/CheckTimeout.m -mcstas/2.2a/tools/Perl/matlab/PlotInstrument.m -mcstas/2.2a/tools/Perl/matlab/ReshapeTransform.m -mcstas/2.2a/tools/Perl/matlab/mcdisplay.m -mcstas/2.2a/tools/Perl/matlab/mcplot.m -mcstas/2.2a/tools/Perl/matlab/resume.m -mcstas/2.2a/tools/Perl/matlab/tomo_recon.m -mcstas/2.2a/tools/Perl/matlab/wait.m -mcstas/2.2a/tools/Perl/perl/mccode_config.perl -mcstas/2.2a/tools/Perl/perl/mccode_reconfigure -mcstas/2.2a/tools/Perl/perl/mcfrontlib.pl -mcstas/2.2a/tools/Perl/perl/mcfrontlib2D.pl -mcstas/2.2a/tools/Perl/perl/mcgnuplot.pl -mcstas/2.2a/tools/Perl/perl/mcguilib.pl -mcstas/2.2a/tools/Perl/perl/mcoptimlib.pl -mcstas/2.2a/tools/Perl/perl/mcplotlib.pl -mcstas/2.2a/tools/Perl/perl/mcrunlib.pl -mcstas/2.2a/tools/Perl/perl/mxguilib.pl +bin/mcdaemon +bin/mcdisplay +bin/mcdoc +bin/mcformatgui +bin/mcgui +bin/mcplot +bin/mcresplot +bin/mcrun +bin/mcstas2vitess +man/man1/mcdisplay-%%PORTVERSION%%.1.gz +man/man1/mcdoc-%%PORTVERSION%%.1.gz +man/man1/mcgui-%%PORTVERSION%%.1.gz +man/man1/mcplot-%%PORTVERSION%%.1.gz +man/man1/mcrun-%%PORTVERSION%%.1.gz +mcstas/%%PORTVERSION%%/bin/mcdaemon +mcstas/%%PORTVERSION%%/bin/mcdisplay +mcstas/%%PORTVERSION%%/bin/mcdoc +mcstas/%%PORTVERSION%%/bin/mcformatgui +mcstas/%%PORTVERSION%%/bin/mcgui +mcstas/%%PORTVERSION%%/bin/mcplot +mcstas/%%PORTVERSION%%/bin/mcresplot +mcstas/%%PORTVERSION%%/bin/mcrun +mcstas/%%PORTVERSION%%/bin/mcstas2vitess +mcstas/%%PORTVERSION%%/launchers/McStas.desktop +mcstas/%%PORTVERSION%%/launchers/mcstas-pl.png +mcstas/%%PORTVERSION%%/tools/Perl/launcher/mcstas-pl.png +mcstas/%%PORTVERSION%%/tools/Perl/launcher/mcxtrace-pl.png +mcstas/%%PORTVERSION%%/tools/Perl/matlab/CheckNeutNumber.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/CheckTimeout.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/PlotInstrument.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/ReshapeTransform.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/mcdisplay.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/mcplot.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/resume.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/tomo_recon.m +mcstas/%%PORTVERSION%%/tools/Perl/matlab/wait.m +mcstas/%%PORTVERSION%%/tools/Perl/perl/mccode_config.perl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mccode_reconfigure +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcfrontlib.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcfrontlib2D.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcgnuplot.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcguilib.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcoptimlib.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcplotlib.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mcrunlib.pl +mcstas/%%PORTVERSION%%/tools/Perl/perl/mxguilib.pl |