git: a99369a4becb - main - math/gap: Add test target, simplify post-build and post-install
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Feb 2022 00:27:25 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a99369a4becb9667f0aaf52a9706ff11398bf57d commit a99369a4becb9667f0aaf52a9706ff11398bf57d Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-02-17 00:05:11 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-02-17 00:27:20 +0000 math/gap: Add test target, simplify post-build and post-install --- math/gap/Makefile | 43 ++++++++++++++++++++++++++----------------- math/gap/files/test.g | 6 ++++++ 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/math/gap/Makefile b/math/gap/Makefile index ce7d31af1e39..348ee66c3d7d 100644 --- a/math/gap/Makefile +++ b/math/gap/Makefile @@ -67,32 +67,38 @@ pre-configure: .endfor post-build: - cd ${WRKSRC}/pkg/simpcomp && \ - ${SETENV} ${CONFIGURE_ENV} ${SH} configure \ - ${CONFIGURE_ARGS:N--with-*} && \ - ${MAKE} ${MAKEFLAGS} && \ - ${MAKE} ${MAKEFLAGS} install-strip && \ - ${RM} bistellar + @cd ${WRKSRC}/pkg/simpcomp && \ + ${SETENV} ${CONFIGURE_ENV} ${SH} configure \ + ${CONFIGURE_ARGS:N--with-*} && \ + ${MAKE} ${MAKEFLAGS} && \ + ${MAKE} ${MAKEFLAGS} install-strip && \ + ${RM} bistellar post-install: + # additional header ${INSTALL_DATA} ${WRKSRC}/gen/config.h ${STAGEDIR}${PREFIX}/include/gap - (cd ${WRKSRC} && \ - ./libtool --mode=install install gap ${STAGEDIR}${PREFIX}/bin/gap-bin) - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gap-bin ${STAGEDIR}${PREFIX}/lib/libgap.so.0.0.0 - (cd ${WRKSRC} && \ - ./libtool --mode=install install gac ${STAGEDIR}${PREFIX}/bin/gac) + # install gap binary and wrapper + ${INSTALL_PROGRAM} ${WRKSRC}/gap ${STAGEDIR}${PREFIX}/bin/gap-bin + ${INSTALL_SCRIPT} ${WRKSRC}/bin/gap ${STAGEDIR}${PREFIX}/bin + # strip + cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} bin/gap-bin lib/libgap.so.0.0.0 + # install gac executable + ${INSTALL_SCRIPT} ${WRKSRC}/gac ${STAGEDIR}${PREFIX}/bin/gac + # ${SED} -e "s:${WRKSRC}:${GAP_LIBDIR}:" ${WRKSRC}/bin/gap.sh \ > ${WRKSRC}/bin/gap - ${SED} -e "s:GAP_DIR=.*:GAP_DIR=${DATADIR}:" \ + ${SED} \ + -e "s:GAP_DIR=.*:GAP_DIR=${DATADIR}:" \ -e "s:GAP_EXE=.*:GAP_EXE=${PREFIX}/bin/gap-bin:" \ - -e "/^exec/s:/gap::" ${WRKSRC}/bin/gap.sh > ${WRKSRC}/bin/gap - ${INSTALL_SCRIPT} ${WRKSRC}/bin/gap ${STAGEDIR}${PREFIX}/bin + -e "/^exec/s:/gap::" ${WRKSRC}/bin/gap.sh \ + > ${WRKSRC}/bin/gap + # install packages ${MKDIR} ${STAGEDIR}${DATADIR}/pkg -.for subdir in doc etc gen grp lib tst sysinfo.gap - ${CP} -R ${WRKSRC}/${subdir} ${STAGEDIR}${DATADIR}/ +.for f in doc etc gen grp lib tst sysinfo.gap + ${CP} -R ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}/ .endfor .for p in ${MINPACK} ${ADD_PACK} - (cd ${WRKSRC}/pkg && ${CP} -R $$(ls -d ${p}*) ${STAGEDIR}${DATADIR}/pkg/) + cd ${WRKSRC}/pkg && ${CP} -R $$(ls -d ${p}*) ${STAGEDIR}${DATADIR}/pkg/ .endfor # correct paths in sysinfo.gap ${REINPLACE_CMD} -i '' -e ' \ @@ -100,4 +106,7 @@ post-install: s|^GAP_LIB_DIR=.*|GAP_LIB_DIR="${PREFIX}/lib"|; \ ' ${STAGEDIR}${DATADIR}/sysinfo.gap +do-test: + @cd ${WRKSRC} && ./gap ${FILESDIR}/test.g + .include <bsd.port.mk> diff --git a/math/gap/files/test.g b/math/gap/files/test.g new file mode 100644 index 000000000000..cbaeefdf7864 --- /dev/null +++ b/math/gap/files/test.g @@ -0,0 +1,6 @@ +## +## Test code is from https://www.gap-system.org/Download/ +## + +tst := Filename( DirectoriesLibrary("tst"), "testinstall.g" );; +Read(tst);