diff --git a/devel/shflags/Makefile b/devel/shflags/Makefile index 76ca0022a0c4..364d1753f43d 100644 --- a/devel/shflags/Makefile +++ b/devel/shflags/Makefile @@ -10,6 +10,12 @@ WWW= https://github.com/kward/shflags LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE +TEST_DEPENDS= bash:shells/bash \ + dash:shells/dash \ + ksh93:shells/ksh \ + mksh:shells/mksh \ + zsh:shells/zsh + NO_ARCH= yes NO_BUILD= yes @@ -18,7 +24,13 @@ PLIST_FILES= lib/shflags GH_ACCOUNT= kward USE_GITHUB= yes +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/test_runner + do-install: ${INSTALL_DATA} ${WRKSRC}/shflags ${STAGEDIR}${PREFIX}/lib/ +do-test: + cd ${WRKSRC} && ${SH} test_runner + .include diff --git a/devel/shflags/files/patch-test_runner b/devel/shflags/files/patch-test_runner new file mode 100644 index 000000000000..85e75e7b80af --- /dev/null +++ b/devel/shflags/files/patch-test_runner @@ -0,0 +1,11 @@ +--- test_runner.orig 2023-08-22 09:34:14 UTC ++++ test_runner +@@ -39,7 +39,7 @@ + RUNNER_LOADED=0 + + RUNNER_ARGV0=`basename "$0"` +-RUNNER_SHELLS='/bin/sh ash /bin/bash /bin/dash /bin/ksh /bin/mksh /bin/zsh' ++RUNNER_SHELLS='/bin/sh %%LOCALBASE%%/bin/bash %%LOCALBASE%%/bin/dash %%LOCALBASE%%/bin/ksh93 %%LOCALBASE%%/bin/mksh %%LOCALBASE%%/bin/zsh' + RUNNER_TEST_SUFFIX='_test.sh' + true; RUNNER_TRUE=$? + false; RUNNER_FALSE=$?