diff options
author | dinoex <dinoex@FreeBSD.org> | 2006-11-26 19:59:57 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2006-11-26 19:59:57 +0800 |
commit | 2448d333adc44cf6af99c26a0cce5163872bdf72 (patch) | |
tree | 4f5580d61a556755916b553cc763650612246d70 /devel/cdk | |
parent | 0124b74a417f0b7ffa071ebf4a5bebdc16da084f (diff) | |
download | freebsd-ports-gnome-2448d333adc44cf6af99c26a0cce5163872bdf72.tar.gz freebsd-ports-gnome-2448d333adc44cf6af99c26a0cce5163872bdf72.tar.zst freebsd-ports-gnome-2448d333adc44cf6af99c26a0cce5163872bdf72.zip |
- fix build on FreeBSD5 and FreeBSD4
PR: 105149
Approved by: (maintainer timeout)
Diffstat (limited to 'devel/cdk')
-rw-r--r-- | devel/cdk/Makefile | 2 | ||||
-rw-r--r-- | devel/cdk/mancompress.mk | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/devel/cdk/Makefile b/devel/cdk/Makefile index c5b2459c24ae..c841037c6222 100644 --- a/devel/cdk/Makefile +++ b/devel/cdk/Makefile @@ -58,4 +58,6 @@ post-install: cd ${WRKSRC}/examples; \ ${FIND} . | ${CPIO} -pdm -R ${LIBOWN}:${LIBGRP} ${EXAMPLESDIR}/examples +.include "${.CURDIR}/mancompress.mk" + .include <bsd.port.post.mk> diff --git a/devel/cdk/mancompress.mk b/devel/cdk/mancompress.mk new file mode 100644 index 000000000000..f6f197a2e4f9 --- /dev/null +++ b/devel/cdk/mancompress.mk @@ -0,0 +1,25 @@ +# +# $FreeBSD$ +# +# this files is a workaround for the target in bsd.port.mk +# which breaks when the list of MLINKS gets > 32k +# + +# Compress (or uncompress) and symlink manpages. +compress-man:: + @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" + @_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE} + ${ECHO_CMD} '${MLINKS}' | \ + ${AWK} -v MAN="${MANPREFIX}/man/man3/" \ + '{ for (i=1; i<=NF; i+=2) \ + { print MAN $$i ".gz " MAN $$(i+1) ".gz" } }' | \ + while read regular link; do \ + ${ECHO_CMD} $${regular} $${link}; \ + ${RM} -f $${link%.gz}; ${RM} -f $${link%.gz}.gz; \ + ${LN} -fs `${ECHO_CMD} $${regular} $${link} | ${AWK} '{ \ + z=split($$1, a, /\//); x=split($$2, b, /\//); \ + while (a[i] == b[i]) i++; \ + for (q=i; q<x; q++) printf "../"; \ + for (; i<z; i++) printf a[i] "/"; printf a[z]; }'` $${link}; \ + done + |