| git.druid.rocks | index | druid520 | ports | ports/ | sysutils/ | help2man/ | add.sh |
ports/sysutils/help2man/add.sh
set -e
curl -LO https://ftp.gnu.org/gnu/help2man/help2man-1.49.3.tar.xz
tar xf help2man-1.49.3.tar.xz
mv help2man-1.49.3 help2man
cd help2man
# upstream bugs in Makefile.in's uninstall target: its info-file cleanup
# loop is missing the "do" keyword entirely, and the final "rm -f" list's
# last-but-one line is missing its line-continuation backslash (so make
# treats the next line as a separate recipe command instead of another
# rm argument, and the shell tries to literally execute a file path) --
# either one alone breaks any real "make uninstall".
perl -0777 -pi -e 's/(\$\(target\)-\*\.info; \\\n)(\s*test -f)/$1\t\tdo \\\n$2/' Makefile.in
perl -0777 -pi -e 's/(LC_MESSAGES\/\$\(target\)\.mo \\\n\t \$\(DESTDIR\)\$\(infodir\)\/\$\(target\)\.info)\n/$1 \\\n/' Makefile.in
./configure --prefix=$MP_PREFIX
make
make install
make clean || true